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

PS4 error on socket disconnect #13

Closed
stevenewing opened this issue Mar 15, 2021 · 1 comment
Closed

PS4 error on socket disconnect #13

stevenewing opened this issue Mar 15, 2021 · 1 comment

Comments

@stevenewing
Copy link

stevenewing commented Mar 15, 2021

Hello,

Thank you for the great alternative to weinre.

We are using this across many different media platforms with great success but we are having issues using this on PlayStation 4

When the websocket disconnects we get the following error:

2021-03-05 11:09:26 client djV3YN disconnected
events.js:292
      throw er; // Unhandled 'error' event
      ^

RangeError: Invalid WebSocket frame: RSV1 must be clear
    at Receiver.getInfo (/usr/local/lib/node_modules/chii/node_modules/ws/lib/receiver.js:178:14)
    at Receiver.startLoop (/usr/local/lib/node_modules/chii/node_modules/ws/lib/receiver.js:131:22)
    at Receiver._write (/usr/local/lib/node_modules/chii/node_modules/ws/lib/receiver.js:78:10)
    at doWrite (_stream_writable.js:403:12)
    at writeOrBuffer (_stream_writable.js:387:5)
    at Receiver.Writable.write (_stream_writable.js:318:11)
    at Socket.socketOnData (/usr/local/lib/node_modules/chii/node_modules/ws/lib/websocket.js:900:35)
    at Socket.emit (events.js:315:20)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:271:9)
Emitted 'error' event on WebSocket instance at:
    at Receiver.receiverOnError (/usr/local/lib/node_modules/chii/node_modules/ws/lib/websocket.js:805:13)
    at Receiver.emit (events.js:315:20)
    at errorOrDestroy (internal/streams/destroy.js:108:12)
    at onwriteError (_stream_writable.js:418:5)
    at onwrite (_stream_writable.js:445:5)
    at Receiver.startLoop (/usr/local/lib/node_modules/chii/node_modules/ws/lib/receiver.js:152:5)
    at Receiver._write (/usr/local/lib/node_modules/chii/node_modules/ws/lib/receiver.js:78:10)
    [... lines matching original stack trace ...]
    at Receiver.Writable.write (_stream_writable.js:318:11) {
  [Symbol(status-code)]: 1002
}
error Command failed with exit code 1.

All of our other platforms either reconnect automatically or can be reconnected manually through dev tools

Adding ws.on('error', ...) might help to resolve this issue and make chii more stable with error handling

surunzi added a commit that referenced this issue Jul 31, 2022
@surunzi
Copy link
Member

surunzi commented Jul 31, 2022

ws.on('error', ...) is added, thanks for reporting the issue.

@surunzi surunzi closed this as completed Jul 31, 2022
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