-
Notifications
You must be signed in to change notification settings - Fork 3k
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
iOS / Android - After sign out of an account redirects user to resend link page #4595
Comments
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
|
Triggered auto assignment to @iwiznia ( |
@kidroca is investigating. We suspect #4509 caused this and if so we will probably revert. Context https://expensify.slack.com/archives/C01GTK53T8Q/p1628776131244300 |
Revert PR sent |
I think I've found the real issue
Line 231 in b4cdc79
For some reason we still have And ultimately we have App/src/pages/signin/SignInPage.js Line 86 in b4cdc79
I'm investigating why we have |
Ok, this seems to be what's going on: function redirectToSignInApp/src/libs/actions/SignInRedirect.js Lines 50 to 54 in b4cdc79
When we're redirected to sign in we're first setting
With the new LRU cache from the PR we've just reverted the With the old connection based cache strategy, we don't have This looks like to be a problem with Onyx and cache, and might happen with any cache strategy due to how |
As for the bug App/src/libs/actions/SignInRedirect.js Lines 48 to 63 in b4cdc79
Like so: // When we clear storage we clear the auth token as well, and are redirected to Login
Onyx.clear().then(() => {
if (preferredLocale) {
Onyx.set(ONYXKEYS.NVP_PREFERRED_LOCALE, preferredLocale);
}
if (errorMessage) {
Onyx.set(ONYXKEYS.SESSION, {error: errorMessage});
}
if (activeClients && activeClients.length > 0) {
Onyx.set(ONYXKEYS.ACTIVE_CLIENTS, activeClients);
}
}); Or if you worry that something else might preserve the Onyx.clear()
.then(() => Onyx.set(ONYXKEYS.SESSION, {authToken: null}))
.then(() => ...); @iwiznia Android.Emulator.-.Pixel_2_API_29_5554.2021-08-12.21-07-17.mp4It looks like it was caused by the same but the calls happened in different order |
Nice, thanks for the investigation and fix! |
hmmm curious, why did the bug only happen in android? |
I thought it happened on both iOS and Android ?
|
Retest on Android was a pass 🎉 Closing the issue. |
@kidroca Is it possible your PR caused this issue? #4971 See investigation by @parasharrajat here: #4971 (comment) |
Yes, I think the proposed solution is ok, and we just need something to trigger the storage event by in other tabs setting a key AFAIK Onyx.clear should trigger the storage event, not sure why it doesn't... |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
After sign out user redirected to Sign in page
Actual Result:
After sign out user redirected to Resend link page
NOTE: Tapping the "resend link" CTA in iOS crashes the app and does nothing in Android.
Workaround:
Unknown
Platform:
Version Number:
1.0.85-0 (Android)
1.0.84-5 (iOS)
Logs: https://stackoverflow.com/c/expensify/questions/4856
**Notes/Photos/Videos:
Issue occurs with both gmail and expenifail accounts
Bug5189768_Screen_Recording_20210811-210830_Expensifycash.mp4
GTLJ3693.MP4
Expensify/Expensify Issue URL:
View all open jobs on Upwork
The text was updated successfully, but these errors were encountered: