twofas / 2fas-ios

Source code for 2FAS iOS app
GNU General Public License v3.0
549 stars 38 forks source link

Codes in widget are not updated #14

Closed warwickmm closed 1 year ago

warwickmm commented 1 year ago

The codes that are displayed in the iOS widget are sometimes not updated. When this happens, the countdown timer also indicates that something is wrong. The display is truncated but i see 26:, which seems to indicate that over 30 seconds has elapsed.

I'm not sure how to reproduce this, but I've noticed it every day since I installed. Eventually it does fix itself, but I'm not sure what actions prompt this.

adocyn commented 1 year ago

Hi @warwickmm ,

We've observed that sometimes. The whole concept of iOS widget is a weird thing because you have a low limit of refresh events you can use. It's low, but not explicit and it does change by the version or e.g. battery state. We're basically abusing that by scheduling a change every half a minute and providing system with a list of states for up to 12 hours. It usually works but sometimes it does not. Unfortunately it's out of our hands. We can only create a list of states containing a token, name of the service, time of change, pass is to the system and hope for the best. Not ideal.

Anyway could you let me know what size of the widget, how many services and what iOS version and device you have?

warwickmm commented 1 year ago

Thanks, @adocyn. This was observed with the large widget on an iPhone 12 mini running iOS 16.4. There are no other widgets running.

I've never encountered this type of issue with the Authy widget over the past 2 years, so perhaps there's some path to getting this working more reliably on iOS.

warwickmm commented 12 months ago

Hello, just wondering if there's been any update to mitigate this. By my estimate, the widget codes are stale around 80-90% of the time. Since I don't see many other mention of this issue, am I the only one experiencing this?