Fix navigation crash - #3853
Merged
Merged
Conversation
andreia-ferreira
requested a deployment
to
e2e-approval
July 22, 2026 12:41 — with
GitHub Actions
Waiting
andreia-ferreira
force-pushed
the
andreia/3846/fix-navigation-crash
branch
from
July 22, 2026 14:00
82fad4d to
c63b7cb
Compare
andreia-ferreira
requested a deployment
to
e2e-approval
July 22, 2026 14:01 — with
GitHub Actions
Waiting
andreia-ferreira
force-pushed
the
andreia/3846/fix-navigation-crash
branch
from
July 22, 2026 16:27
c63b7cb to
45cd1d9
Compare
andreia-ferreira
requested a deployment
to
e2e-approval
July 22, 2026 16:27 — with
GitHub Actions
Waiting
andreia-ferreira
requested a deployment
to
e2e-approval
July 22, 2026 17:45 — with
GitHub Actions
Waiting
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3853 +/- ##
============================================
+ Coverage 67.37% 67.40% +0.03%
- Complexity 1838 1840 +2
============================================
Files 407 407
Lines 10755 10759 +4
Branches 1418 1420 +2
============================================
+ Hits 7246 7252 +6
+ Misses 2763 2762 -1
+ Partials 746 745 -1
🚀 New features to boost your workflow:
|
andreia-ferreira
force-pushed
the
andreia/3846/fix-navigation-crash
branch
from
July 23, 2026 09:41
d5219ab to
c0ea35e
Compare
andreia-ferreira
requested a deployment
to
e2e-approval
July 23, 2026 09:41 — with
GitHub Actions
Waiting
andreia-ferreira
force-pushed
the
andreia/3846/fix-navigation-crash
branch
from
July 23, 2026 09:41
c0ea35e to
c7b4258
Compare
andreia-ferreira
requested a deployment
to
e2e-approval
July 23, 2026 09:41 — with
GitHub Actions
Waiting
andreia-ferreira
requested a deployment
to
e2e-approval
July 23, 2026 10:19 — with
GitHub Actions
Waiting
andreia-ferreira
marked this pull request as ready for review
July 23, 2026 10:32
andreia-ferreira
temporarily deployed
to
e2e-approval
July 23, 2026 10:32 — with
GitHub Actions
Inactive
shobhitagarwal1612
requested changes
Jul 23, 2026
andreia-ferreira
temporarily deployed
to
e2e-approval
July 24, 2026 08:06 — with
GitHub Actions
Inactive
shobhitagarwal1612
approved these changes
Jul 24, 2026
andreia-ferreira
temporarily deployed
to
e2e-approval
July 27, 2026 07:25 — with
GitHub Actions
Inactive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3846
The crash could be reproduced with the following steps:
1 - Enable 'Don't keep activities' on Developer Settings
2 - Turn off network connection
3 - Start data collection and complete a few tasks
4 - Put the app on the background
5 - Go back to Ground
6 - Crash
After the app was killed in the background,
MainViewModelwas recreated and immediately received the signed-in user again. When in offline mode, the MainVM would be recreated and get the user right away since there was no connection forupdateRemoteUserInfo. Offline this happened almost instantly, becauseupdateRemoteUserInforeturns early when there is no connection instead, navigation then proceeded to the Home screen, popping the restored back stack. So when the data collection screen tried to fetch its VM from the back stack it crashed.Now the MainActivity will only proceed with this rerouting if the user is still on startup or signIn screen so a restored screen is left alone.
There is also a small refactor changing
MainUiStatetoMainUiEffectsince it mostly works with one time events rather than a screen state.@shobhitagarwal1612 PTAL?