mozilla-vpn-client
mozilla-vpn-client copied to clipboard
[foxfooding] VPN timer increments erratically
VPN timer increments erratically - would be consistent for ~20 seconds, pause for definitely longer than 1 second, increment by one second, increment two seconds the next time (Not consistent - sometimes would increment by one, sometimes would increment by two without the pause beforehand). Timer was at ~4.5 hours at this point
┆Issue is synchronized with this Jira Bug
➤ Peter deHaan commented:
Row 32 of https://docs.google.com/spreadsheets/d/1nnhaCKuosXdIRtimbS6SwMvt-SqMWwTsjLoFnBKugO4/edit#gid=0 ( https://docs.google.com/spreadsheets/d/1nnhaCKuosXdIRtimbS6SwMvt-SqMWwTsjLoFnBKugO4/edit#gid=0|smart-link )
➤ Lesley Norton commented:
Valentina Virlics we think this is fixed at least on iOS. Could you please verify this is reproducible/not reproducible. Thanks!
➤ Valentina Virlics commented:
Verified this while using 2.15.0 (2.202305231836) build on iOS 15.7.6.
The timer changes randomly after swipe kill. See .gif below.
!20230529_104403.mp4|width=720,height=1280!
➤ Santiago Andrigo commented:
Matt Cleinman Since you are on this topic, mind verifying if this is still happening? Seems like you might have fixed it in https://mozilla-hub.atlassian.net/browse/VPN-2991 ( https://mozilla-hub.atlassian.net/browse/VPN-2991|smart-link ).
➤ Matt Cleinman commented:
Santiago Andrigo There are two different root causes here:
- For long running VPN sessions with big jumps ones, like the one in Valentina Virlics's comment below: That’s a bug. It’s because when we restart the apps, we query iOS and Android daemon to see what the current time is. On Android, we save the start time in the daemon ourselves. However on iOS we use a property of the tunnel. However, that tunnel time would be reset every time there is a server switch (silent, user generated, etc.). So we need to be manually saving that time on iOS as well.
- For small hiccups - pausing for a second, incrementing 2 seconds, etc. - I believe this is due to the amount of work being done on the main thread. (It’s the same cause as why tapping a menu sometimes doesn’t load immediately, and has a small pause.) It would be more pronounced on older/slower machines. I don’t fully understand Qt’s threading model, but this would be a larger lift to fix up - yet an important one that would pay dividends on all our platforms.
I’ll treat this ticket as fixing reason #1. Happy to add this to this sprint or the next one.
➤ Matt Cleinman commented:
To be clear for QA, this ticket fixes the issue of “on iOS, when a server is switched (by the user or silently), the timer is wrong the next time the app cold opens”.
Steps to confirm fix:
- Start the VPN
- Wait 10 seconds or so
- Switch servers (timer will not reset)
- Hard quit the app
- Relaunch the app. The timer should still be counting up from the original connection time, but instead it's jumped back 10 seconds - to when the server switched.
➤ Valentina Virlics commented:
Matt Cleinman This cannot be verified due to the following blocker - https://mozilla-hub.atlassian.net/browse/VPN-6375 ( https://mozilla-hub.atlassian.net/browse/VPN-6375|smart-link ) .
➤ Valentina Virlics commented:
Verified this on iOS 16.6 while using Mozilla VPN 2.23 (2.202405152207) build.
After following below described steps, the VPN timer is the same as before the swipe kill.
➤ Matt Cleinman commented:
Valentina Virlics Yes, that is correct. (Apologies, step 5 in my comment below previously - I just deleted it - had a half sentence that made it more confusing, which was an artifact from the original repro steps for the bug.)