logos-innovation-lab / waku-objects-playground

A simple waku chat application to play with and test waku objects
https://chat.wakuplay.im
Apache License 2.0
2 stars 1 forks source link

Detect if waku is disconnected and reconnect #282

Open agazso opened 1 year ago

lucille-bellepleure commented 1 year ago

https://forum.bubble.io/t/re-establishing-web-socket-for-pwa/249335

This is a known problem with PWA's, a workaround could be to implement the "pull down to refresh" gesture, or add an indicator in the app showing the waku connection status (which is the least fav solution).

https://stackoverflow.com/questions/75972895/ios-pwa-how-to-re-enable-pull-to-refresh

agazso commented 1 year ago

From here: https://github.com/logos-innovation-lab/waku-objects-playground/issues/283#issue-1841345075

@vojtechsimetka wrote:

If waku gets diconnected (especially in PWA when switching away and back to the app), it does not reconnect. According to @michelleplur iOS (and to some extend Android) do not suport reconnecting websockets.

I propose following TODOs:

vojtechsimetka commented 1 year ago

So I did some more testing and if I lose connection it does not write anything in the console in Chrome and when I "send" messages they appear to be sent but they are not. In Safari I see some error but it may be unrelated.

Chrome: Screenshot 2023-08-11 at 15 12 31

Safari: Screenshot 2023-08-11 at 15 10 48