papercups-io / papercups

Open-source live customer chat
https://app.papercups.io/demo
MIT License
5.77k stars 525 forks source link

Dashboard websocket disconnects and doesn't load new messages after a long period #774

Closed cheeseblubber closed 3 years ago

cheeseblubber commented 3 years ago

Describe the bug Dashboard doesn't load new messages after a certain amount of time. If you send a message in to the account it doesn't load until you refresh

In the JS console it loads websocket errors

Screen Shot 2021-04-22 at 7 25 04 PM

To Reproduce Steps to reproduce the behavior:

  1. Load dashboard either app.papercups.io or localhost
  2. Put your computer to sleep and revisit after x minutes (Not sure the actual minutes I would start with 15) I've seen it definitely happen after an hour
  3. See console error

Expected behavior The dashboard should either refresh the websockets or prompt the user to refresh the page.

Ideally it should refresh the websockets but if it is too difficult prompting for a refresh is a good temporary work around

Additional context The way I've reproduced it is by closing my Mac and keeping the dashboard open. I've reproduced it after an hour being away during lunch. It should disconnect with less time.

cheeseblubber commented 3 years ago

Got a good bandaid for the time being but will keep the issue opened for the time being until we fix it for good.