music-metadata-browser: RangeError: offset is not uint
Hi there,
I’m loving music-metadata-browser. Nice work!
Every so often, though, when processing a file, it throws an error like the below for certain songs:
RangeError: offset is not uint
at checkOffset (index.js:1165)
at Uint8Array.readUInt32LE (index.js:1218)
at ID3v24TagMapper.postMap (ID3v24TagMapper.js:173)
at ID3v24TagMapper.mapGenericTag (GenericTagMapper.js:78)
at CombinedTagMapper.mapTag (CombinedTagMapper.js:42)
at MetadataCollector.toCommon (MetadataCollector.js:239)
at MetadataCollector.addTag (MetadataCollector.js:102)
at ID3v2Parser.addTag (ID3v2Parser.js:195)
at ID3v2Parser.parseId3Data (ID3v2Parser.js:189)
When I say “certain songs” I mean mp3 files, and that the error is consistent, in that it will always happen for some files and it will never happen on others.
What are some things to look at with regards to the file to determine why a problematic file is causing the error?
I’ve read through issue #15 but couldn’t quite figure out how to troubleshoot the issue.
I dropped some of the files in question on the Audio Tag Analyzer, and compared those to “known good” files, but I’m not seeing thing that sticks out.
Any advice would be greatly appreciated.
P.S. I’m using "music-metadata-browser": "^1.1.1" in a create-react-app
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 31 (15 by maintainers)
Commits related to this issue
- Borewit/music-metadata-browser#28, #1 Enforce buffer 5.2.1 using yarn resolution — committed to Borewit/music-metadata-react by Borewit 5 years ago
- Borewit/music-metadata-browser#28 Add explicit 0 offset to prevent error using feross/buffer v4 — committed to Borewit/music-metadata by Borewit 5 years ago
- #28 Update music-metadata to 4.2.3 — committed to Borewit/music-metadata-browser by Borewit 5 years ago
- Bump music-metadata-browser Bump version to resolve issue https://github.com/Borewit/music-metadata-browser/issues/28 — committed to wavesmp/wavesmp by osoriano 5 years ago
Workaround released in music-metadata-browser v1.2.2.
Does this work for you guys, without the yarn buffer resolution?
Hi @Borewit , thanks for your continued efforts on this cool project.
I just removed node_modules, removed buffer from packages.json, removed yarn.lock, and bumped mm-b to v1.2.2, then did a clean npm install.
I also removed the shim bits in the app.
And… 🎉 !
Excellent. Yes, I did a fresh install to my dumb project with the update of music-metadata-browser to 1.2.2, without the yarn buffer resolution and confirm that it works.
Now I can continue using npm without having to install yarn. Big thanks.
I managed to fix my React app, using yarn package manager, in PR: Borewit/music-metadata-react#2
Hi @Borewit sorry for the delay, I got distracted.
Please find a (hopefully) clean repo here.
My flailing can be found at /src/App.js on line 28
I look forward to your insight on how to do the shim right.