Skip to content

Recent breaking changes to websockets/ws break websockify.js #16

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

Closed
samfrances opened this issue May 17, 2017 · 1 comment
Closed

Recent breaking changes to websockets/ws break websockify.js #16

samfrances opened this issue May 17, 2017 · 1 comment

Comments

@samfrances
Copy link
Contributor

See: websockets/ws#1099

The client.upgradeReq property has been removed in the ws module, leading websockify.js to crash at https://github.com/novnc/websockify/blob/master/other/js/websockify.js#L31

Error message:

WebSocket settings:
    - proxying from :6080 to localhost:5900
    - Running in unencrypted HTTP (ws://) mode
/home/sam/websockify_node/websockify.js:31
    console.log(client.upgradeReq.url);
                                 ^

TypeError: Cannot read property 'url' of undefined
    at WebSocketServer.new_client (/home/sam/websockify_node/w
ebsockify.js:31:34)
    at emitTwo (events.js:106:13)
    at WebSocketServer.emit (events.js:191:7)
    at handleUpgrade (/home/sam/websockify_node/node_modules/w
s/lib/WebSocketServer.js:88:16)
    at WebSocketServer.completeUpgrade (/home/sam/websockify_n
ode/node_modules/ws/lib/WebSocketServer.js:270:5)
    at WebSocketServer.handleUpgrade (/home/sam/websockify_nod
e/node_modules/ws/lib/WebSocketServer.js:197:10)
    at Server.WebSocketServer._ultron.on (/home/sam/websockify
_node/node_modules/ws/lib/WebSocketServer.js:87:14)
    at emitThree (events.js:116:13)
    at Server.emit (events.js:194:7)
    at onParserExecuteCommon (_http_server.js:409:14)
@samfrances
Copy link
Contributor Author

I have posted a pull request which ought to fix this bug. novnc/websockify#281

@samhed samhed transferred this issue from novnc/websockify Jul 12, 2019
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