realtime data not working in iPhone
-
I've got data that updates every five minutes. On the iPhone the page just stops. receiving realtime data. My customer says for him he has to login/out. I'm not certain if it is due to expired sessions. But I can honestly say that realtime data stops. This also means that when wanting to view status information, the data doesn't update. I can turn the screen off and on and the socket connection on the iPhone stops. If i always ensure the page stays active in chrome, then realtime continues. Once the screen shuts off, no more socket. I can click and view other dashboard pages, but the data doesn't come through, so just blank templates where data should be displayed.
I don't have these issues on Android.
Hope this makes sense.Fox
-
@mattfox said in realtime data not working in iPhone:
On the iPhone the page just stops. receiving realtime data.
Under what conditions? After how long?
@mattfox said in realtime data not working in iPhone:
My customer says for him he has to login/out. I'm not certain if it is due to expired sessions. But I can honestly say that realtime data stops.
If you have an iPhone can you please verify yourself. Sessions by default expire after 48 hours I believe so I doubt its that.
@mattfox said in realtime data not working in iPhone:
I can turn the screen off and on and the socket connection on the iPhone stops
This is to be expected.
@mattfox said in realtime data not working in iPhone:
Once the screen shuts off, no more socket.
Again this is expected. What should happen though is that the socket will reconnect and you will start getting live value updates again.
I am still not clear if you are seeing different behavior in Chrone on iOS verses Safari on iOS. I doubt there will be differences as they both use the Safari browser engine.
-
Again this is expected. What should happen though is that the socket will reconnect and you will start getting live value updates again.
Except this doesn't happen on the iPhone.
I don't know how long, all I have to do is log in to the dashboard and wait and after a while it stops. I don't currently have the tools required to debug and give you a definite answer. It'd be easier if it were Android because I could use the adb linked to google.chrome dev console. I can only give what I've found at the moment. I've got a bad feeling it is an apple thing and that there is no fix.
-
OK, I will try and get hold of a coworkers iPhone and reproduce.
edit. Just noticed you are using 3.5. Definitely upgrade to 3.6 and try that. However I will still test this out on iPhone on 3.6 and see if I find something.
-
Many thanks Jared, Craig confirmed he could replicate it but he didn't state whether or not it was the latest version or not.
-
@mattfox said in realtime data not working in iPhone:
hen wanting to view status information, the
I tested this on 3.6. If I lock the screen, then unlock after some time, there are no updates. To get an update I swipe down which refreshes the page. It does not require me to log back in.
-
Thanks Craig, I think my customer logs out and in out of frustration. He's saved the mango page to his home screen so it behaves like an app. He is likely unaware that dragging from the top causes a refresh.
-
Hi Jared, just giving this a bump and wondering if you were able to replicate this issue
Fox
-
@mattfox said in realtime data not working in iPhone:
Hi Jared, just giving this a bump and wondering if you were able to replicate this issue
Fox
@CraigWeb has confirmed it for me. Its on my list to investigate.
-
I somehow think there may not be a 'heartbeat' to ensure the pointvalues websocket stays alive, what can I generate from the server without storing the value to make all clients who log in subscribe to this through mango and update it every 20-30 seconds to ensure the connection doesn't drop?
If I have enough systems updating at minute intervals, they all cause the timeout to be pushed back. Problem is a lot of my other sensors update at 5-15 minute intervals.
Any further suggestions are welcome. -
@mattfox said in realtime data not working in iPhone:
I somehow think there may not be a 'heartbeat' to ensure the pointvalues websocket stays alive
There is. It uses the WebSocket ping/pong mechanism. We send a ping packet every 10s by default, it is configurable via the
web.websocket.pingTimeoutMs
env property. If we do not receive a pong response the server closes the WebSocket. The client should re-open the WebSocket immediately if the tab is active. -
@MattFox I found a problem in the logic around the client (UI) reconnecting after a WebSocket closes. I think this is probably what you were seeing. I'll get a new UI module out soon, I also made some backend changes but I think the UI module fix will address your symptoms.
-
Excellent, nicely identified Jared!
@jared-wiltshire are these changes I can implement myself to save me having to do any major upgrades? -
@mattfox said in realtime data not working in iPhone:
are these changes I can implement myself to save me having to do any major upgrades?
No they are not. I will be releasing a UI module for 3.7.x
-
Darn it ok, I'll see about doing system upgrades early next year when the pressure is reduced.
-
-
@Jared-Wiltshire Has this been resolved? I am running v4.0.0 beta.14 and noticed that the real-time data in Watchlist and dashboard is not showing up on iPhone's Safari or Chrome.
-
This problem is not uncommon on iPhones, so here's what you should do. If you are still experiencing this problem, you need to reboot your device. If this does not help, then try to clean the file cache because this sometimes makes a difference. The third option involves the use of services from priorityunlock.com, which has a cool ability to unlock devices. Personally, really helped me figure out my iPhone so that you can have success in this case. Try all the options and tell me what worked for you.