aldinokemal / go-whatsapp-web-multidevice

API for Whatsapp Web Multi Device Version, Support UI & Webhook
MIT License
581 stars 245 forks source link

🐞 websocket exhausted #179

Closed dippreneurlab closed 2 months ago

dippreneurlab commented 2 months ago

What happened?

after run the go file

- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Fiber v2.52.4 β”‚ β”‚ http://127.0.0.1:3000 β”‚ β”‚ (bound on host 0.0.0.0 and port 3000) β”‚ β”‚ β”‚ β”‚ Handlers ............ 42 Processes ........... 1 β”‚ β”‚ Prefork ....... Disabled PID .............. 6565 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

08:48:58.054 [Client ERROR] Client outdated (405) connect failure (client version: 2.2412.50) 08:48:58.137 [Client/Socket ERROR] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF ^Csignal: interrupt

Reproduction Steps

1. logout the account from my mobile
2. restarted the server

Relevant log output

No response

Screenshots or Additional Context

No response

Application Version

1.0.0

Verification

devabdulharis commented 2 months ago

how to fix ?

dippreneurlab commented 2 months ago

reinstall the service

peektoseen commented 2 months ago

This error still exist in v4.17.0 For me - it happen every time after 3 minute 33 seconds from start:

$ date -u && docker run aldinokemal2104/go-whatsapp-web-multidevice
Wed Aug 28 08:01:37 AM UTC 2024

 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” 
 β”‚                   Fiber v2.52.5                   β”‚ 
 β”‚               http://127.0.0.1:3000               β”‚ 
 β”‚       (bound on host 0.0.0.0 and port 3000)       β”‚ 
 β”‚                                                   β”‚ 
 β”‚ Handlers ............ 48  Processes ........... 1 β”‚ 
 β”‚ Prefork ....... Disabled  PID ................. 1 β”‚ 
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ 

08:05:10.602 [Client/Socket ERROR] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

Same behavior with compiled version:

$ date -u && TZ=UTC ./whatsapp 
Wed Aug 28 08:09:22 AM UTC 2024

 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” 
 β”‚                   Fiber v2.52.5                   β”‚ 
 β”‚               http://127.0.0.1:3000               β”‚ 
 β”‚       (bound on host 0.0.0.0 and port 3000)       β”‚ 
 β”‚                                                   β”‚ 
 β”‚ Handlers ............ 48  Processes ........... 1 β”‚ 
 β”‚ Prefork ....... Disabled  PID ............ 165928 β”‚ 
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ 

08:12:55.356 [Client/Socket ERROR] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

Same with basic usage:

$ date -u && TZ=UTC go run main.go
Wed Aug 28 08:15:51 AM UTC 2024

 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” 
 β”‚                   Fiber v2.52.5                   β”‚ 
 β”‚               http://127.0.0.1:3000               β”‚ 
 β”‚       (bound on host 0.0.0.0 and port 3000)       β”‚ 
 β”‚                                                   β”‚ 
 β”‚ Handlers ............ 48  Processes ........... 1 β”‚ 
 β”‚ Prefork ....... Disabled  PID ............ 168354 β”‚ 
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ 

08:19:24.519 [Client/Socket ERROR] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF
peektoseen commented 2 months ago

@dippreneurlab , please, reopen this issue.

peektoseen commented 2 months ago

Workarround: You can use /app/reconnect method and login after that. Or add /app/reconnect to run by cron every 3 minutes.

dippreneurlab commented 2 months ago

I think. this issue will occur if the user disconnects it from the phone first instead of the server.

peektoseen commented 2 months ago

This happens even without the phone. If you just run the project, the socket will disconnect after 3 minutes 33 seconds.

Аfter successful login everything works fine and the socket no longer disconnects.