-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incorrect 'device verified' screen when app was opened with no network connection #3110
Fix incorrect 'device verified' screen when app was opened with no network connection #3110
Conversation
…n the user opened the app with no network connection. It turns out `encryptionService.verificationState()` runs a network request that will cause a deadlock when it fails. Also fixed another deadlock that caused the screen to remain blank sometimes after logging in, because DataStore got stuck when checking the `skipVerification` state for some reason I don't fully understand.
faaeff3
to
f421f94
Compare
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3110 +/- ##
========================================
Coverage 75.96% 75.96%
========================================
Files 1636 1636
Lines 38617 38618 +1
Branches 7463 7463
========================================
+ Hits 29335 29336 +1
Misses 5393 5393
Partials 3889 3889 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for fixing those annoying bugs!
Timber.d("Updating verification status: flow just finished") | ||
runCatching { | ||
encryptionService.waitForE2eeInitializationTasks() | ||
}.onSuccess { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe do something on failure?
Type of change
Content
skipVerification
preference. I'd rather just remove it, but it's needed as a workaround onAppMigration02
.Motivation and context
It turns out
encryptionService.verificationState()
runs a network request that will cause a deadlock when it fails and that will trigger a timeout that will assume your session needs to be verified.Also fixed another deadlock that caused the screen to remain blank sometimes after logging in, because DataStore got stuck when checking the
skipVerification
state for some reason I don't fully understand. We'll have to keep an eye on similar behaviours through the app.Tests
Tested devices
Checklist