I know this question is old but I just encountered the same problem and wanted to post what I learned.
Did your audio player successfully load the audio? If the src="#" or if you gave the player the wrong path to the audio file the line of code you provided will give the error you mentioned.
I would suggest trying the following code where audioPlayer is the id of the audio element to perform a simple check that the audio file has indeed loaded:
if (!isNaN(aud.duration)) {
aud.currentTime = vid.currentTime;
}
But of course, if you're expecting the audio to have loaded, fix the path to the audio file