aadsm / jsmediatags

Media Tags Reader (ID3, MP4, FLAC)
Other
748 stars 128 forks source link

Offset <..> hasn't been loaded yet. #69

Closed pioug closed 7 years ago

pioug commented 7 years ago
{ type: 'parseData',
  info: 'Offset 70666 hasn\'t been loaded yet.' }

I am facing this issue with few files. I am using 3.6.2. I pushed a test case here: https://github.com/aadsm/jsmediatags/compare/master...pioug:issue?expand=1.

I saw that you fixed similar errors recently with different solutions (https://github.com/aadsm/jsmediatags/issues/58, https://github.com/aadsm/jsmediatags/issues/49). So I am better asking you first before digging in the code 🤔

aadsm commented 7 years ago

@pioug, the link you provide doesn't point me to the test case, can you update it so I can have access to the music file and fix the issue?

pioug commented 7 years ago

I just realized that the parsing works well in the browser but not in Node. It may be easier to solve than I thought.

What is the best solution to provide you a test case for Node? So far, I forked your project https://github.com/pioug/jsmediatags/tree/master and added the test files in /issue. You can run the script via node issue/.

Link to browser version: https://pioug.github.io/jsmediatags/issue/index.html.

Thanks a lot for the weekend support! I will check the build pipeline to see if we can add the source maps somewhere.

Update:

aadsm commented 7 years ago

This is an interesting case, it looks like cry.mp3 has a 2 byte padding at the end of the tag but it doesn't have an extended header declaring padding size. I'll add a sanity check to detect this issue.

pioug commented 7 years ago

Awesome support! It works perfectly now. jsmediatags parses my +30 GB library without flinching 😛 Thanks a lot!