tulir / whatsmeow

Go library for the WhatsApp web multidevice API
https://go.mau.fi/whatsmeow
Mozilla Public License 2.0
2.11k stars 390 forks source link

failed to get device list: failed to send usync query: frame socket is closed #414

Open danchengash opened 1 year ago

danchengash commented 1 year ago

I keep getting this error and i have to restart my http server for the connection to come back. How can i counter this

floodwm commented 1 year ago

Need more information, e.g. your code

danchengash commented 1 year ago

I have used the code in the example.

This happens when i leave my WhatsApp running on the server for quite some time.

Then it stops sending messages by throwing that error message. And when I restart the server it works fine.

On Fri, 30 Jun 2023, 23:15 floodwm @.***> wrote:

Need more information, e.g. your code

— Reply to this email directly, view it on GitHub https://github.com/tulir/whatsmeow/issues/414#issuecomment-1615151261, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKZLCXK6IKCDKVFZ4MVOJJTXN4XXDANCNFSM6AAAAAAZZZWKBE . You are receiving this because you authored the thread.Message ID: @.***>

BastianOrth2 commented 1 year ago

Having sometimes a similar issue, after restart it works again in general.

Today the service works for 2 of 6 numbers i'm running the service with but the rest gets : failed to get device list: failed to send usync query: websocket not connected

zealyong commented 1 year ago

Having sometimes a similar issue, after restart it works again in general.

Today the service works for 2 of 6 numbers i'm running the service with but the rest gets : failed to get device list: failed to send usync query: websocket not connected

I'm having the same problem. When the exception (whatsmeow.ErrNotConnected) is caught , just calling cli.Disconnect() and cli.Connect() will solve it.

azickri commented 8 months ago

Having sometimes a similar issue, after restart it works again in general. Today the service works for 2 of 6 numbers i'm running the service with but the rest gets : failed to get device list: failed to send usync query: websocket not connected

I'm having the same problem. When the exception (whatsmeow.ErrNotConnected) is caught , just calling cli.Disconnect() and cli.Connect() will solve it.

How can listen that exception? in events is not show