ably / ably-js

Javascript, Node, Typescript, React, React Native client library SDK for Ably realtime messaging service
https://ably.com/download
Apache License 2.0
317 stars 56 forks source link

Some users aren't receiving updates/messages via the Browser JS implementation of Ably #703

Open markcoxsmith opened 3 years ago

markcoxsmith commented 3 years ago

Customer Comments I've got an issue where some users aren't receiving updates via the Browser JS implementation of Ably.. It's been causing us issues for some weeks now so I've put some extra logging into try and work out what's going on. I now send out a heartbeat message once a minute and our client browsers are reporting back if they don't see one within the last 70 seconds. They appear to miss a heartbeat or two but then catch up or receive the next heartbeat (haven't worked out which yet). Now admittedly it's a small sample so far, but all of the 10 occurrences in the last hour have been in Safari (iOS and MacOS). Are there any known issues with Safari or gotchas that you can think might be affecting us?

{ "message": "'[ccHeartbeat] Heartbeat missed. Occurrence #2, Ably status:connected'", "context": { "context": "Javascript", "userId": , "ip":, "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1" }, "level": 200, "level_name": "INFO", "channel": "app", "datetime": "2020-12-01T00:08:08.637716+00:00", "extra": {}} { "message": "'[ccHeartbeat] Heartbeat missed. Occurrence #1, '", "context": { "context": "Javascript", "userId": , "ip": , "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/86.0.4240.93 Mobile/15E148 Safari/604.1" }, "level": 200, "level_name": "INFO", "channel": "app", "datetime": "2020-12-01T00:13:51.949866+00:00", "extra": {}} { "message": "'[ccHeartbeat] Heartbeat missed. Occurrence #2, '", "context": { "context": "Javascript", "userId": , "ip": , "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Mobile/15E148 Safari/604.1" }, "level": 200, "level_name": "INFO", "channel": "app", "datetime": "2020-12-01T00:23:37.911062+00:00", "extra": {}} { "message": "'[ccHeartbeat] Heartbeat missed. Occurrence #1, {\"drift\":137,\"jsInstalled\":1606782293,\"ably.installed\":1606782293,\"ably.status\":\"connected\",\"ably.received\":1606782304,\"xhtmlGenerated\":1606782290,\"version\":\"3.64.6\"}'", "context": { "context": "Javascript", "userId": , "ip": , "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Mobile/15E148 Safari/604.1" }, "level": 200, "level_name": "INFO", "channel": "app", "datetime": "2020-12-01T00:27:20.124962+00:00", "extra": {}}

┆Issue is synchronized with this Jira Bug by Unito

awmcclain commented 3 years ago

We're also seeing this with Safari -- occasionally presence callbacks won't fire or presence subscriptions won't be sent on Safari. It's extremely intermittent, but we think it may have to do with Safari shutting down javascript when it's not focused.