WAppAI / assistant

A WhatsApp chatbot that leverages Bing AI's and others LLMs conversational capabilities.
MIT License
92 stars 30 forks source link

Unexpected server response: 200 #136

Closed arv-fazriansyah closed 11 months ago

arv-fazriansyah commented 1 year ago

{ 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)'
}

Luisotee commented 1 year ago

When does it gives you this? Upon starting it or somewhere else?

MikeBivins commented 1 year ago

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.

Luisotee commented 1 year ago

Can you guys test it again? I updated some stuffs that should fix this