Closed dv336699 closed 1 year ago
Hi! Have you tried to logout from a session and scan QR again?
@allburov Sorry I didn't make myself clear at first, the server crash when I try to call http://127.0.0.1:3000/api/sessions/stop
Got it, could you try to use POST /api/sessions/logout instead? It by passes some checks and logout session immediately. The flow would be
@allburov I managed to reproduce the bug.
whatsapp-http-api-plus | node:events:492
whatsapp-http-api-plus | throw er; // Unhandled 'error' event
whatsapp-http-api-plus | ^
whatsapp-http-api-plus |
whatsapp-http-api-plus | Error: WebSocket was closed before the connection was established
whatsapp-http-api-plus | at WebSocket.close (/app/node_modules/ws/lib/websocket.js:285:7)
whatsapp-http-api-plus | at WebSocketClient.close (/app/node_modules/@adiwajshing/baileys/lib/Socket/Client/web-socket-client.js:53:21)
whatsapp-http-api-plus | at WhatsappSessionNoWebPlus.stop (/app/dist/core/session.noweb.core.js:131:22)
whatsapp-http-api-plus | at SessionManagerPlus.stop (/app/dist/plus/manager.plus.js:138:23)
whatsapp-http-api-plus | at SessionsController.stop (/app/dist/api/sessions.controller.js:32:28)
whatsapp-http-api-plus | at /app/node_modules/@nestjs/core/router/router-execution-context.js:38:29
whatsapp-http-api-plus | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
whatsapp-http-api-plus | at async /app/node_modules/@nestjs/core/router/router-execution-context.js:46:28
whatsapp-http-api-plus | at async /app/node_modules/@nestjs/core/router/router-proxy.js:9:17
whatsapp-http-api-plus | Emitted 'error' event on WebSocketClient instance at:
whatsapp-http-api-plus | at WebSocket.<anonymous> (/app/node_modules/@adiwajshing/baileys/lib/Socket/Client/web-socket-client.js:46:100)
whatsapp-http-api-plus | at WebSocket.emit (node:events:514:28)
whatsapp-http-api-plus | at WebSocket.emit (node:domain:489:12)
whatsapp-http-api-plus | at emitErrorAndClose (/app/node_modules/ws/lib/websocket.js:1008:13)
whatsapp-http-api-plus | at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
whatsapp-http-api-plus |
whatsapp-http-api-plus | Node.js v20.5.1
whatsapp-http-api-plus |
whatsapp-http-api-plus | error Command failed with exit code 1.
whatsapp-http-api-plus | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
whatsapp-http-api-plus exited with code 1
Got it, thank you for the detailed steps, we'll look at this!
Weird, this what happened with my session when I stop it before scanning QR code
[Nest] 54081 - 09/03/2023, 5:50:17 PM LOG [SessionManager] Stopping default session...
[Nest] 54081 - 09/03/2023, 5:50:17 PM LOG [SessionManager] "default" has been stopped.
Thanks for looking into this I have uploaded another fresh container and it seems to be working as expected, on the other server I had this issue, there were about 40 sessions, it could be a corrupted file or something, if it happens again, I'll let you know.
Thanks
I have just updated to WAHA Plus to make sure it was an issue with the version, so I'm using the latest version as at today. I'm using WAHA Plus with Docker.
Yesterday all of my sessions have stopped working.
Whenever I try to stop a session, I get the following error