chatwoot icon indicating copy to clipboard operation
chatwoot copied to clipboard

on iOS devices - websocket connection is not re-established in the chat widget on window focus

Open fobos531 opened this issue 3 years ago • 2 comments

Describe the bug

When integrating the chat widget, I noticed an issue on iOS where the websocket connection used by the chat widget is not re-established when the browser loses and regains focus. This leads to inconsistent behaviour where messages that were sent while the browser was out of focus and then regains it don't appear UNTIL you reload the website.

To Reproduce

Steps to reproduce the behavior:

  1. Start a conversation on mobile Safari on iOS using the web widget.
  2. Move the browser to the background, or try switching to another app
  3. Reply from the agent dashboard to yourself
  4. On the phone, return to the website where web widget is used and you'll notice that the the messages you sent from the dashboard aren't there. You have to reload the website for these messages to pop up.

This issue doesn't appear 100% percent of the time, but it DOES appear fairly often

Expected behavior

WebSocket connection should be re-established when the iOS mobile browser loses and regains focus.

Screenshots

N/A

Browser logs

N/A

Server logs

N/A

Environment

Self hosted heroku installation.

Desktop (please complete the following information): N/A

Smartphone (please complete the following information):

  • Device: iPhone 12
  • OS: iOS 15.4
  • Browser Safari
  • Version latest

fobos531 avatar Mar 30 '22 11:03 fobos531

Having the same problem. It quite affects the user experience on iOS devices.

fifi98 avatar May 14 '22 20:05 fifi98

@fobos531 @fifi98 Thanks for reporting. We will take a look

sojan-official avatar May 23 '22 21:05 sojan-official