waha icon indicating copy to clipboard operation
waha copied to clipboard

[GOWS] - Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

Open yeheskel2016 opened this issue 1 year ago • 11 comments

Describe the bug

After some hours that the session is up the log will start to fill with this errors

Version

2025.06.07

Steps

Just keep the session up and monitor the logs

Docker Logs

''' [17:56:48.362] INFO (WebhookSender/1): session:session_03yrw9 - Sending POST...

session=session_03yrw9 id=01JZ3J4R39W52AYZ2X5D3JJ7J3 event.id=evt_01jz3j4r39jjr83ptmfdz4jexs url=http://192.168.1.46:50000/webhook_whatsapp

[17:56:48.365] INFO (WebhookSender/1): session:session_03yrw9 - POST request was sent with status code: 200

reqId=263 req={"id":263,"method":"POST","url":"/api/sendSeen","query":{},"params":{"path":["api","sendSeen"]}} res={"statusCode":201} responseTime=2

[17:56:48.367] INFO (1): request completed

engine=gows

[18:38:21.279] ERROR (1): [Session/session_03yrw9/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

engine=gows

[18:38:21.697] INFO (1): [Session/session_03yrw9/Client] Successfully authenticated

engine=gows

[18:39:41.843] ERROR (1): [Session/session_b2cu2w/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

engine=gows

[18:39:42.429] INFO (1): [Session/session_b2cu2w/Client] Successfully authenticated

engine=gows

[19:31:12.834] ERROR (1): [Session/session_03yrw9/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

engine=gows

[19:31:13.276] INFO (1): [Session/session_03yrw9/Client] Successfully authenticated

engine=gows

[20:36:02.754] ERROR (1): [Session/session_b2cu2w/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

engine=gows

[20:36:03.491] INFO (1): [Session/session_b2cu2w/Client] Successfully authenticated

engine=gows

[20:37:26.231] ERROR (1): [Session/session_03yrw9/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

engine=gows

[20:37:26.897] INFO (1): [Session/session_03yrw9/Client] Successfully authenticated

engine=gows

[21:25:59.412] ERROR (1): [Session/session_b2cu2w/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

engine=gows

[21:26:00.083] INFO (1): [Session/session_b2cu2w/Client] Successfully authenticated

engine=gows

[21:36:03.310] WARN (1): [Session/session_03yrw9/Client] Received stream end frame

engine=gows

[21:36:03.310] WARN (1): [Session/session_03yrw9/Client] Got 503 stream error, assuming automatic reconnect will handle it

engine=gows

[21:36:03.455] ERROR (1): [Session/session_03yrw9/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

engine=gows

[21:36:03.884] INFO (1): [Session/session_03yrw9/Client] Successfully authenticated

engine=gows

[21:43:01.485] WARN (1): [Session/session_b2cu2w/Client] Received stream end frame

engine=gows

[21:43:01.485] WARN (1): [Session/session_b2cu2w/Client] Got 503 stream error, assuming automatic reconnect will handle it

engine=gows

[21:43:01.614] ERROR (1): [Session/session_b2cu2w/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

engine=gows

[21:43:02.248] INFO (1): [Session/session_b2cu2w/Client] Successfully authenticated

engine=gows

[21:49:18.805] WARN (1): [Session/session_b2cu2w/Client] Received stream end frame

engine=gows

[21:49:18.806] WARN (1): [Session/session_b2cu2w/Client] Got 503 stream error, assuming automatic reconnect will handle it

engine=gows

[21:49:18.917] ERROR (1): [Session/session_b2cu2w/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

engine=gows

[21:49:19.354] INFO (1): [Session/session_b2cu2w/Client] Successfully authenticated

engine=gows

[21:49:29.998] WARN (1): [Session/session_03yrw9/Client] Received stream end frame

engine=gows

[21:49:29.998] WARN (1): [Session/session_03yrw9/Client] Got 503 stream error, assuming automatic reconnect will handle it

engine=gows

[21:49:30.122] ERROR (1): [Session/session_03yrw9/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

engine=gows

[21:49:30.676] INFO (1): [Session/session_03yrw9/Client] Successfully authenticated

engine=gows

[23:25:32.636] ERROR (1): [Session/session_b2cu2w/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

engine=gows

[23:25:33.306] INFO (1): [Session/session_b2cu2w/Client] Successfully authenticated

engine=gows

[23:27:15.037] ERROR (1): [Session/session_03yrw9/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF

engine=gows

[23:27:15.887] INFO (1): [Session/session_03yrw9/Client] Successfully authenticated

reqId=264 req={"id":264,"method":"POST","url":"/api/sendSeen","query":{},"params":{"path":["api","sendSeen"]}} res={"statusCode":201} responseTime=2

[05:22:24.274] INFO (1): request completed

reqId=265 req={"id":265,"method":"POST","url":"/api/sendText","query":{},"params":{"path":["api","sendText"]}} res={"statusCode":201} responseTime=348 '''

Additional context

Using Postgres as the DB, after this errors we still able to interact with the sessions and for example send messages through it and so on.. it's just when this errors are happening, if I had the sessions in Online state, they will become offline (for some reason in GOWS unlike with NOWB there is no default Online status when session is up, so I manually set the state in my apps to Online, but when this issue is happening this will make them Offline and I wont even know it ;-( )

yeheskel2016 avatar Jul 02 '25 05:07 yeheskel2016

same to how to fix this?

patron:PLUS

hsxonz avatar Jul 02 '25 06:07 hsxonz

Hi! Could you try to update to 2025.7.3 and see how it goes? https://waha.devlike.pro/docs/overview/changelog/#20257

patron:PRO

devlikepro avatar Jul 03 '25 10:07 devlikepro

Am out of sub to the plus so cant atm, but thanks for the quick fix I will try test it manually next week ;-)

yeheskel2016 avatar Jul 03 '25 12:07 yeheskel2016

Not fixed,

[12:52:20.270] INFO (1): request completed {"reqId":504,"req":{"id":504,"method":"POST","url":"/api/sendText","query":{},"params":{"path":["api","sendText"]}},"res":{"statusCode":201},"responseTime":194} [14:43:27.204] ERROR (1): [Session/session_03yrw9/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF {"engine":"gows"} [14:43:27.880] INFO (1): [Session/session_03yrw9/Client] Successfully authenticated {"engine":"gows"} [16:38:41.264] ERROR (1): [Session/session_03yrw9/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF {"engine":"gows"} [16:38:41.908] INFO (1): [Session/session_03yrw9/Client] Successfully authenticated {"engine":"gows"}

yeheskel2016 avatar Jul 10 '25 17:07 yeheskel2016

Can it be reopened?

yeheskel2016 avatar Jul 19 '25 15:07 yeheskel2016

@yeheskel2016 what docker image do you use?

patron:PRO

devlikepro avatar Jul 21 '25 09:07 devlikepro

The 04/07 one.. Relevant fix should be in but seems not working yet..

yeheskel2016 avatar Jul 21 '25 09:07 yeheskel2016

It's less happening from previous versions but it still does for example Today -

[12:59:42.045] INFO (1): request completed {"reqId":158,"req":{"id":158,"method":"POST","url":"/api/sendSeen","query":{},"params":{"path":["api","sendSeen"]}},"res":{"statusCode":201},"responseTime":2} [15:25:44.826] ERROR (1): [Session/session_b2cu2w/Client/Socket] Error reading from websocket: websocket: close 1006 (abnormal closure): unexpected EOF {"engine":"gows"} [15:25:45.281] INFO (1): [Session/session_b2cu2w/Client] Successfully authenticated {"engine":"gows"}

And because GOWS not having a way to set default presence as online when coming back alive it just making my apps looks with presence offline, its' not like this error is really interuppting working, it recover from it but just sucks as it causing the presence to reset.

yeheskel2016 avatar Jul 21 '25 16:07 yeheskel2016

I'm currently experiencing the same issue described here with the GOW engine—specifically the WebSocket closure (code 1006) and the unexpected EOF.

I was wondering if there's any update or estimated timeline for a fix. Really appreciate all your work on this project!

I am running in the last version (no tags): image: devlikeapro/waha-plus

Thanks in advance.

patron:PLUS

alanlengruber avatar Jul 28 '25 19:07 alanlengruber

I am running in the last version

@alanlengruber what version exactly? "last" can be old if you don't pull the image manually

patron:PRO

devlikepro avatar Jul 29 '25 03:07 devlikepro

Right now I'm using devlikeapro/waha-plus:gows-2025.7.10

patron:PLUS

alanlengruber avatar Jul 31 '25 03:07 alanlengruber