Skip to content
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 crash when popping persona creation flow. #1121

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

jakub-rdx
Copy link
Contributor

Description

Crash hapened when user was on persona confirmation screen, popping screen to get back to the flow that started persona creation. Stacktrace says that current screen when crash occured is persona selection in dapp request handling flow. I was not able to reproduce, but it is clear from the report that it happened at getBackStackEntry(ROUTE_CREATE_PERSONA) which throws if route is not on the backstack. Wrapped calls to getBackStackEntry in runCatching, and if we can't find root screen of the flow for some reason (entry == null), just pop current screen.

How to test

  1. I tried regular persona creation flow in dApp request handling - couldn't reproduce
  2. While being at persona creation confirmation screen, moved app to the background, simulated process death with adb shell am kill <package_name> and re-opened app from the Recent - still, was not able to crash the wallet.

Any feedback on potential way of reproducing is welcomed

Copy link
Contributor

@sergiupuhalschi-rdx sergiupuhalschi-rdx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't reproduce the crash. The fix looks good and it will definitely prevent it from happening.

@@ -32,12 +33,14 @@ fun NavController.personaInfoScreen() {

@Suppress("SwallowedException")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suppress annotation can now be removed I think.

@jakub-rdx jakub-rdx merged commit 274b761 into main Aug 6, 2024
6 checks passed
@jakub-rdx jakub-rdx deleted the fix/ABW-3668-pop-persona-creation-crash branch August 6, 2024 08:07
Copy link

sonarcloud bot commented Aug 6, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 40%)

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants