Closed arv-fazriansyah closed 11 months ago
When does it gives you this? Upon starting it or somewhere else?
I have a similiar error or pretty much the same actually:
error: {
name: 'Error',
message: 'Unexpected server response: 200',
stack: 'Error: Unexpected server response: 200\n' +
' at ClientRequest.<anonymous> (/home/ubuntu/sydney/node_modules/ws/lib/websocket.js:888:7)\n' +
' at ClientRequest.emit (node:events:512:28)\n' +
' at ClientRequest.emit (node:domain:489:12)\n' +
' at HTTPParser.parserOnIncomingClient (node:_http_client:694:27)\n' +
' at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)\n' +
' at TLSSocket.socketOnData (node:_http_client:536:22)\n' +
' at TLSSocket.emit (node:events:512:28)\n' +
' at TLSSocket.emit (node:domain:489:12)\n' +
' at addChunk (node:internal/streams/readable:324:12)\n' +
' at readableAddChunk (node:internal/streams/readable:297:9)\n' +
' at TLSSocket.Readable.push (node:internal/streams/readable:234:10)\n' +
' at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)'
it does this after receiving a message/every message. Right now nothing seems to help and sydney doesn't work for me.
Node -v is 19.7.0 puppeteer 21.1.0
However it seems like theres an issue with "ws". Im on oracle cloud server right now maybe this is a vps issue. More specifically either an issue with Server Configuration: The server might not be correctly set up to handle WebSocket connections. or the Endpoint URL which I have not checked yet. also possible proxy issues which is not the case for me. And finally i think any discrepancy in library or dependencies can also cause this: There might be conflicts or issues with the versions.
Can you guys test it again? I updated some stuffs that should fix this
{ error: { name: 'Error', message: 'Unexpected server response: 200', stack: 'Error: Unexpected server response: 200\n' + ' at ClientRequest. (C:\Fazriansyah\sydney-whatsapp-chatbot\node_modules\ws\lib\websocket.js:888:7)\n' +
' at ClientRequest.emit (node:events:512:28)\n' +
' at ClientRequest.emit (node:domain:489:12)\n' +
' at HTTPParser.parserOnIncomingClient (node:_http_client:694:27)\n' +
' at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)\n' +
' at TLSSocket.socketOnData (node:_http_client:536:22)\n' + ' at TLSSocket.emit (node:events:512:28)\n' + ' at TLSSocket.emit (node:domain:489:12)\n' + ' at addChunk (node:internal/streams/readable:324:12)\n' + ' at readableAddChunk (node:internal/streams/readable:297:9)\n' +
' at TLSSocket.Readable.push (node:internal/streams/readable:234:10)\n' + ' at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)'
}