You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently investigated an issue where our app would get stuck at splashscreen for some users. I'm now convinced I can reproduce the issue.
When you enable "use network-provided time zone" in Android (settings > system > date&time) , initialization of TimeMachine fails with the following stacktrace:
I/flutter (26553): ----------------FIREBASE CRASHLYTICS----------------
I/flutter (26553): Null check operator used on a null value
I/flutter (26553):
I/flutter (26553): #0 TimeMachine.initialize
package:time_machine/…/platforms/vm.dart:95
I/flutter (26553): <asynchronous suspension>
I/flutter (26553): #1 main.<anonymous closure>
package:***/main.dart:115
I/flutter (26553): <asynchronous suspension>
I/flutter (26553): #2 main
package:***/main.dart:110
I/flutter (26553): <asynchronous suspension>
pointing to vm.dart:93 ff.:
var local = timeZoneOverride != null ? await tzdb.getZoneOrNull(timeZoneOverride) : await _figureOutTimeZone(tzdb);
// todo: cache local more directly? (this is indirect caching)
TzdbIndex.localId = local!.id; // <-- baaang
When you set a location instead, everything works. I can't say whether this is an issue for iOS too but we did have user reports with a similar crash pattern.
It looks local can be null when network-provided time fails or timezone is set to GMT. In that case, we can't use null operator.
I don't really know TimeMachine well enough yet to suggest a solution but I still wanted to bring this your attention.
The text was updated successfully, but these errors were encountered:
We've hit this with Android Play store testing where some of the test devices have uncommon/undefined time zone names. I don't know if TimeMachine could provide a reasonable fallback default. We have implemented our own fallback to UTC (which is always defined) when the initialize throws an exception:
Hi guys,
I recently investigated an issue where our app would get stuck at splashscreen for some users. I'm now convinced I can reproduce the issue.
When you enable "use network-provided time zone" in Android (settings > system > date&time) , initialization of TimeMachine fails with the following stacktrace:
pointing to vm.dart:93 ff.:
When you set a location instead, everything works. I can't say whether this is an issue for iOS too but we did have user reports with a similar crash pattern.
It looks local can be null when network-provided time fails or timezone is set to GMT. In that case, we can't use null operator.
I don't really know TimeMachine well enough yet to suggest a solution but I still wanted to bring this your attention.
The text was updated successfully, but these errors were encountered: