traccar / traccar-manager-ios

Traccar Manager for iOS
https://www.traccar.org/manager
Apache License 2.0
109 stars 193 forks source link

IOS App with version 5.0 not updating location #45

Open timmcmic opened 2 years ago

timmcmic commented 2 years ago

Launch IOS App and validate that modern interface is displayed.

Select a device from the devices menu.

Compare device on IOS to web interface.

Vehicle lags several seconds to + minutes behind active tracking on the web interface.

Vehicle location does not update when reselecting the unit.

App does eventually refresh but tracking does not appear to be as aggressive as old version.

tananaev commented 2 years ago

Do you happen to have a large number of devices? Because location updates are always done via WebSocket, so there should be no delay. By the way, check if WebSocket connection is working for you.

timmcmic commented 2 years ago

We have 5 devices. Websockets appear to be working from what i can tell - certainly not an area of expertise. I am seeing the lag across three different mobile IOS devices as well as the vehicle not updating after the device is awoken and a unit is selected. You can select the unit over and over and it does not update without resetting the application.

tananaev commented 2 years ago

Are you using modern or legacy app?

timmcmic commented 2 years ago

Using traccar manager on the iphone appears to be rendering the modern app by default. I had not switched back to the legacy app on the mobile devices.

The web interface tracks fine which is what i'm using for comparison.

tananaev commented 2 years ago

Web interface on the same phone works fine?

timmcmic commented 2 years ago

I did not try tracking it through the browser on the phone - I can try but then I cannot side by side on the same device.

tananaev commented 2 years ago

You can still compare to the working one, right? To see if it works.

timmcmic commented 2 years ago

Got it - standby - I'll see if I can get some ambulances moving and test.

timmcmic commented 2 years ago

Ok - so I went through and rebooted and attempted a repro. The app did pretty well. What I was able to reproduce was changing focus to a different app - then reopening the app and showing that the unit does not update automatically and did not refresh when clicking on the unit.

I have a video if you have somewhere to send a link.

tananaev commented 2 years ago

You should be able to upload the video here directly. Did it work correctly in the legacy app?

timmcmic commented 2 years ago

In the mobile IOS app - how do I go ahead and change to the legacy interface?

tananaev commented 2 years ago

On the login screen there's a button to switch.

timmcmic commented 2 years ago

Ok - give me a few minutes. I'm already logged in on the mobile app i'll log out and give it a go.

timmcmic commented 2 years ago

Ok found it - it looks like a refresh button in the top right hand corner so it was not obvious sorry.

timmcmic commented 2 years ago

Followed the same steps on the repro - two devices. One iphone using the modern interface one ipad using the legacy. Both of them did the same thing. Take the apps out of focus and switch to - for example mail. Wait - bring the apps back in focus. The unit that was originally selected does not move. Reselect the unit from either the unit selection in modern or the table in legacy. The unit does not change location. App must be exited and come back in.

On a PC with the modern web interface running (not the host running traccar) the issue does not reproduce.

timmcmic commented 2 years ago

https://www.icloud.com/photos/#038apGTh1VAY7l0u4WNU347Wg

tananaev commented 2 years ago

OK, it sounds like the issue is not really related to version 5.0 of Traccar then. If it works the same way in the legacy app.

timmcmic commented 2 years ago

We were running 4.6 two days ago with no issues. Did a backup of the database, backup the conf file, uninstalled and installed version 5.0. We did not have the same issue prior to upgrading. Thoughts?

tananaev commented 2 years ago

I'm pretty sure nothing changed since 4.6 in terms of live location updates. Can you record a video with the old version showing that it's working in the same conditions?

timmcmic commented 2 years ago

I'd have to spin up another server - we only have one. Let me see what I can do. Either way - is what we're seeing expected behavior regardless of version?

tananaev commented 2 years ago

I suspect the issue has something to do with the way iOS system handles background. It probably kills some JavaScript execution or network connections when you background the app. But then it won't work on old versions either. That's why I'm curious how it worked there.

timmcmic commented 2 years ago

Ok cool - and maybe i'm just totally imagining it. We have it running constantly in our supervisors truck and switch between it an our dispatch application but have never noticed the issue until this recent uprgade work. I'm going to see if i can snapshot the machine and then revert.