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

Unexpected Server Response 200 #87

Open
kriebgui1 opened this issue Dec 29, 2024 · 2 comments
Open

Unexpected Server Response 200 #87

kriebgui1 opened this issue Dec 29, 2024 · 2 comments

Comments

@kriebgui1
Copy link

2024-12-29T17:05:03.236Z UniFi-Error:SharedProtectWebSocket connect(): this.ws.on(error: Error: Unexpected server response: 200

at ClientRequest.<anonymous> (/data/node_modules/node-red-contrib-unifi-os/node_modules/ws/lib/websocket.js:913:7)

at ClientRequest.emit (node:events:518:28)

at HTTPParser.parserOnIncomingClient (node:_http_client:702:27)

at HTTPParser.parserOnHeadersComplete (node:_http_common:118:17)

at TLSSocket.socketOnData (node:_http_client:544:22)

at TLSSocket.emit (node:events:518:28)

at addChunk (node:internal/streams/readable:561:12)

at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)

at Readable.push (node:internal/streams/readable:392:5)

at TLSWrap.onStreamRead (node:internal/stream_base_commons:191:23)
@Shaquu
Copy link
Member

Shaquu commented Jan 5, 2025

@marcus-j-davies @crxporter can you help?

@marcus-j-davies
Copy link
Member

marcus-j-davies commented Jan 5, 2025

Getting a 200 response for a web socket is not valid, it should be 101 ... Switching Protocol.

Seems like some strange Protect behaviour 🤷‍♂️

Have never seen this response for a web socket, so what are you connecting to exactly?
The ws node package (that we use) received something its not supposed to

Unifi have been changing a lot lately, and efforts are now going towards using the official API (web hooks)

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

3 participants