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

error on node v22.1.0 #5880

Open
xlc opened this issue May 15, 2024 · 2 comments
Open

error on node v22.1.0 #5880

xlc opened this issue May 15, 2024 · 2 comments
Assignees

Comments

@xlc
Copy link
Contributor

xlc commented May 15, 2024

node:internal/event_target:1095
  process.nextTick(() => { throw err; });
                           ^

TypeError: Cannot read properties of null (reading 'length')
    at WebSocket.__internal__onSocketMessage (file:///Users/xiliangchen/projects/acala/chopsticks/node_modules/@polkadot/rpc-provider/ws/index.js:392:40)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:821:20)
    at WebSocket.dispatchEvent (node:internal/event_target:756:26)
    at fireEvent (node:internal/deps/undici/undici:10966:14)
    at websocketMessageReceived (node:internal/deps/undici/undici:10988:7)
    at ByteParser.run (node:internal/deps/undici/undici:11439:17)
    at ByteParser._write (node:internal/deps/undici/undici:11315:14)
    at writeOrBuffer (node:internal/streams/writable:564:12)
    at _write (node:internal/streams/writable:493:10)
    at Writable.write (node:internal/streams/writable:502:10)

Node.js v22.1.0

failed on this line

const bytesRecv = message.data.length;

the message is

MessageEvent {
  type: 'message',
  defaultPrevented: false,
  cancelable: false,
  timeStamp: 1240.624208
}

and message.data is null for some reason

to reproduce, run chopsticks on nodejs v22.1.0
Original issue AcalaNetwork/chopsticks#753

@TarikGul
Copy link
Member

Not surprised node v22 is giving some issues, but also happy to start working on giving it support.

@TarikGul
Copy link
Member

This will most likely not be a fast fix, but I will do my best to get it resolved soon!

@TarikGul TarikGul self-assigned this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants