OptimalBits / bull

Premium Queue package for handling distributed jobs and messages in NodeJS.
Other
15.58k stars 1.43k forks source link

Encountering RangeError [ERR_BUFFER_OUT_OF_BOUNDS] When Creating Jobs in Bull on Node.js v23 #2782

Closed aryamohanan closed 3 weeks ago

aryamohanan commented 3 weeks ago

Description

We are encountering an error in Bull on Node.js v23. while attempting to create jobs, which results in the following error message:

RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: "length" is outside of buffer bounds
at Buffer.utf8Write (node:internal/buffer:1066:13)
at Packr.encodeUtf8 (node_modules/msgpackr/dist/node.cjs:1202:18)
at pack (node_modules/msgpackr/dist/node.cjs:1491:15)
at Packr.pack.encode (node_modules/msgpackr/dist/node.cjs:1300:6)
at Object.addJob (node_modules/bull/lib/scripts.js:40:7)
at addJob (node_modules/bull/lib/job.js:83:18)
at node_modules/bull/lib/job.js:97:14 {
code: 'ERR_BUFFER_OUT_OF_BOUNDS'
}

The error appears to originate from the msgpackr library, which Bull utilizes for data serialization.

Bull Version

4.16.3

Node.js Version

v23

Additional Information

This issue seems to be resolved in msgpackr version 1.1.2. You can find more details in the commit. Please refer to the related issue here.

manast commented 3 weeks ago

:tada: This issue has been resolved in version 4.16.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: