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]: Invalid WebSocket Frame: RSV1 must be clear #1541

Closed
vacekj opened this issue Feb 8, 2024 · 3 comments
Closed

[Bug]: Invalid WebSocket Frame: RSV1 must be clear #1541

vacekj opened this issue Feb 8, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@vacekj
Copy link

vacekj commented Feb 8, 2024

Version

System:
    OS: macOS 14.2.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 7.05 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Brave Browser: 121.1.62.156
    Chrome: 121.0.6167.139
    Safari: 17.2.1
  npmPackages:
    @rsbuild/core: ^0.4.1 => 0.4.1 
    @rsbuild/plugin-react: ^0.3.11 => 0.3.11 
    @rsbuild/plugin-svgr: ^0.3.11 => 0.3.11

Details

The dev server crashes with the message:

node:events:497
      throw er; // Unhandled 'error' event
      ^

RangeError: Invalid WebSocket frame: RSV1 must be clear
    at Receiver.getInfo (/Users/vacekj/Programming/grants-round/node_modules/.pnpm/@rsbuild+core@0.4.1/node_modules/@rsbuild/core/compiled/ws/index.js:1:15302)
    at Receiver.startLoop (/Users/vacekj/Programming/grants-round/node_modules/.pnpm/@rsbuild+core@0.4.1/node_modules/@rsbuild/core/compiled/ws/index.js:1:14714)
    at Receiver._write (/Users/vacekj/Programming/grants-round/node_modules/.pnpm/@rsbuild+core@0.4.1/node_modules/@rsbuild/core/compiled/ws/index.js:1:14114)
    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)
    at Socket.socketOnData (/Users/vacekj/Programming/grants-round/node_modules/.pnpm/@rsbuild+core@0.4.1/node_modules/@rsbuild/core/compiled/ws/index.js:1:48239)
    at Socket.emit (node:events:519:28)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
Emitted 'error' event on WebSocket instance at:
    at Receiver.receiverOnError (/Users/vacekj/Programming/grants-round/node_modules/.pnpm/@rsbuild+core@0.4.1/node_modules/@rsbuild/core/compiled/ws/index.js:1:47301)
    at Receiver.emit (node:events:519:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: 'WS_ERR_UNEXPECTED_RSV_1',
  [Symbol(status-code)]: 1002
}

Node.js v21.6.0

Reproduce link

https://github.com/gitcoinco/grants-stack

Reproduce Steps

download the repo, branch performance
go to packages/round-manager
pnpm i && pnpm rsbuild dev
visit the site in browser and wait for a few minutes
observe the dev server crashing and the error message.

@vacekj vacekj added the bug Something isn't working label Feb 8, 2024
@xc2
Copy link
Collaborator

xc2 commented Feb 8, 2024

would you please try serving on port 8081 or any port other than 8080?

@vacekj
Copy link
Author

vacekj commented Feb 8, 2024

This indeed fixes it, I guess it was some other application conflicting with it. Maybe some IRC client, from my brief google search. Defaulting the port to 3000 is fine.

@vacekj vacekj closed this as completed Feb 8, 2024
@chenjiahan
Copy link
Member

Default server port to 3000 in Rsbuild v0.6.0: #1970 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants