Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Upgrate from nodejs 21 to nodejs 22 throws RangeError #2747

Closed
dimonnwc3 opened this issue Sep 2, 2024 · 2 comments
Closed

[Bug]: Upgrate from nodejs 21 to nodejs 22 throws RangeError #2747

dimonnwc3 opened this issue Sep 2, 2024 · 2 comments

Comments

@dimonnwc3
Copy link

dimonnwc3 commented Sep 2, 2024

Version

5.12.12

Platform

NodeJS

What happened?

Everything worked fine using nodejs 21, but after upgrade to nodejs 22, add method in flowProducer throws an error. Likely job.add does the same as it's used internally according to stack trace.

How to reproduce.

call flowProducer.add method

Relevant log output

RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: "length" is outside of buffer bounds
    at proto.utf8Write (node:internal/buffer:1066:13)
    at Packr.encodeUtf8 (/app/node_modules/msgpackr/pack.js:31:18)
    at pack (/app/node_modules/msgpackr/pack.js:320:15)
    at packArray (/app/node_modules/msgpackr/pack.js:234:5)
    at pack (/app/node_modules/msgpackr/pack.js:420:7)
    at Packr.pack.encode (/app/node_modules/msgpackr/pack.js:129:6)
    at Scripts.addStandardJob (/app/node_modules/bullmq/src/classes/scripts.ts:158:15)
    at Scripts.addJob (/app/node_modules/bullmq/src/classes/scripts.ts:219:27)
    at Job.addJob (/app/node_modules/bullmq/src/classes/job.ts:1189:25)
    at FlowProducer.addNode (/app/node_modules/bullmq/src/classes/flow-producer.ts:333:11) {
  code: 'ERR_BUFFER_OUT_OF_BOUNDS'
}


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@dimonnwc3 dimonnwc3 added the bug Something isn't working label Sep 2, 2024
@dimonnwc3 dimonnwc3 changed the title [Bug]: Upgrate from nodejs 21 to nodejs 22 throws RangeError using [Bug]: Upgrate from nodejs 21 to nodejs 22 throws RangeError Sep 2, 2024
@dimonnwc3
Copy link
Author

FYI: seems issue is in nodejs itself, here is relevant issue: nodejs/node#54518

@manast manast removed the bug Something isn't working label Sep 2, 2024
@manast
Copy link
Contributor

manast commented Sep 2, 2024

We only support NodeJS versions LTS, LTS-1 and LTS-2. Version 22 is thus not supported as it is not LTS.

@manast manast closed this as completed Sep 2, 2024
github-actions bot pushed a commit that referenced this issue Nov 5, 2024
## [5.23.1](v5.23.0...v5.23.1) (2024-11-05)

### Bug Fixes

* **deps:** bump msgpackr to 1.1.2 to resolve ERR_BUFFER_OUT_OF_BOUNDS error ([#2882](#2882)) ref [#2747](#2747) ([4d2136c](4d2136c))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants