-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebSocket closed; The client-token could be invalidated, please re-login #129
Comments
I've some ideas why this is caused, probably the only thing that can be done is to add an automatic reconnect. |
It happens very frequently, sometimes every couple of minutes. I'd love for it to automatically reconnect |
@jmattheis With further testing, while this message is showing notifications still come through. Is there any troubleshooting/testing you'd like me to perform? |
Yeah, does gotify/server output any errors? The server logs to stdout. |
Caddy (v2) is set up simply as:
(run is the TLD if that matters) I can then access and use Gotify externally on https://gotify.mydomain.run My stdout logs don't go far enough at the time of writing this but I'll try to get the output when it happens soon. |
My guess would be that the connection read/write timeouts on server side and the connection will be closed. But this should be logged in gotify/server. |
Ok so I reproduced this by switching networks to/from 4G. My phone shows the WebSocket closed message but still receives notifications that are pushed to Gotify. The server logs show the following, you can see the message I posted at the bottom:
|
@PNRxA Could you try out this branch: https://github.com/gotify/android/tree/ws-close to check, if this fixes your problem? In case you've no android build environment ping me back and I'll build the apk for you. |
@jmattheis In my brief testing on this branch, it properly disconnected and reconnected after a minute then sent through the notifications. I'll send through an update in about 2 days of real world use to see how it goes. Appreciate the fast update |
@jmattheis I've had a couple app crashes with this new branch where the notification disappeared, here's the app logs after a crash. Battery optimisation is disabled and no background restrictions |
This looks pretty much like the OS has killed gotify. |
@jmattheis if that's the case, this branch has resolved this issue. I've had no further websocket problems and the reconnections have worked perfectly |
I observed same bug |
I'd like to add that I encountered this bug too, but noticed that it only happened after I updated to server 2.0.17. It used to work without issues on 2.0.15 |
@jmattheis are we able to merge the branch? |
@PNRxA yeah, sorry totally forgot this issue .__. |
Released in 2.0.14 |
I get this issue daily where this error message comes up. I fix it by going into the app and clicking the refresh button in the hamburger menu. It doesn't require another log in, it just refreshes and connects back to the websocket. I had a look through existing issues but couldn't find anything, is this a known problem?
Device: Pixel 4 XL
Android: 10 on latest security patch
Gotify Android version: 2.0.13 from Play Store
Battery optimisation turned off
Gotify Server: 2.0.17 docker behind caddy
The text was updated successfully, but these errors were encountered: