RangeError: "size" argument must not be larger than 2147483647
See original GitHub issueI’m getting the following error when trying to read tags from a 9.7MB MP3:
RangeError: "size" argument must not be larger than 2147483647
at Function.Buffer.alloc (buffer.js:229:3)
at new Buffer (buffer.js:152:19)
at NodeID3.getTagsFromBuffer (.../node_modules/node-id3/index.js:318:31)
at NodeID3.read (.../node_modules/node-id3/index.js:226:25)
at Object.<anonymous> (.../index.js:40:24)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
Snippet:
const file = 'sample.mp3'
const buf = fs.readFileSync(file)
console.log(buf.length)
// 9673454
try {
let tags = NodeID3.read(file)
} catch (err) {
console.log(err)
}
Environment:
- OSX - 10.12.6
- Node - 8.5.0
- node-id3 - 0.1.3
Update:
I added console.log(bodyFrameHeader.toString('utf8', 0, 4) + ' ' + bodyFrameSize)
to try to debug what was flagging the size limit; here’s the output:
TPE2 29
TPOS 9
WCOP 17
WOAR 40
TLEN 4
TMED 29
TXXX 29
TXXX 31
TXXX 39
TXXX 59
TXXX 31
TXXX 37
TXXX 25
GEOB 100
TXXX 31
GEOB 110
PRIV 334456
�� 3363242937
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
RangeError: "size" argument must not be larger than #368
But I just upgraded to 0.7.4 and got this error message: RangeError: "size" argument must not be larger than 2147483...
Read more >Javascript Read large files failed - Stack Overflow
Hi @robertklep, I am writing a CLI app, where I need to parse a big JSON file, and respond to the user. ·...
Read more >Developers - RangeError: "size" argument must not be larger than -
This was a one time error. So I'm just gonna put it here as an FYI instead of a thorough report due to...
Read more >Node.js Error Handling - ERR_BUFFER_TOO_LARGE
An ERR_BUFFER_TOO_LARGE error indicates that an attempt was made to instantiate or allocate a Buffer object of a size exceeding the current ...
Read more >Node.js v6.2.0 Documentation
Passing a number as the first argument to Buffer() (e.g. new Buffer(10) ), allocates a new Buffer object of the specified size. The...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed https://github.com/Zazama/node-id3/commit/d16530a2364f2b4b34104ef5b2c08c4bd906b57e and published to npm with 0.1.6
Great! Thanks for the quick fix 😃