Skip to content

[$500] Android - Settings - App crashes when changing device font size and then tapping on Profile icon #32515

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.8-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Launch New Expensify app
  2. Background the app
  3. Change the device font size
  4. Return to the app
  5. Tap on the profile icon

Expected Result:

App does not crash

Actual Result:

App crashes

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6302273_1701804101481.Screen_Recording_20231206_002437_New_Expensify.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01977dd9f154104e64
  • Upwork Job ID: 1732120049690255360
  • Last Price Increase: 2023-12-05

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 5, 2023
  2. melvin-bot commented on Dec 5, 2023

    @melvin-bot

    Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. changed the title [-]Android - Settings - App crashes when changing device font size and then tapping on Profile icon[/-] [+][$500] Android - Settings - App crashes when changing device font size and then tapping on Profile icon[/+] on Dec 5, 2023
  4. melvin-bot commented on Dec 5, 2023

    @melvin-bot
  5. melvin-bot commented on Dec 5, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 5, 2023
  7. melvin-bot commented on Dec 5, 2023

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (External)

  8. bernhardoj commented on Dec 5, 2023

    @bernhardoj
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    After changing the device font size, coming back to the app and open the Setting page, the app crashes.

    What is the root cause of that problem?

    The crash stack trace shows that the error comes from an undefined root state.

    } else if (action.payload.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR && rootState.routes.at(-1)?.name !== NAVIGATORS.RIGHT_MODAL_NAVIGATOR) {
    action.type = CONST.NAVIGATION.ACTION_TYPE.PUSH;
    }

    After we change the font device, it's normal that the app is restarted, but somehow this makes the root state becomes undefined

    What changes do you think we should make in order to solve the problem?

    Safely access the root state.

    -rootState.routes.at(-1)?.name
    +rootState?.routes.at(-1)?.name

    Just like we did with getTopmostReportId.

    function getTopmostReportId(state: NavigationState | NavigationState<RootStackParamList> | PartialState<NavigationState>): string | undefined {
    if (!state) {
    return;
    }

  9. allroundexperts commented on Dec 6, 2023

    @allroundexperts
    Contributor

    @bernhardoj's proposal looks good!

    🎀 👀 🎀 C+ reviewed

  10. melvin-bot commented on Dec 6, 2023

    @melvin-bot

    Triggered auto assignment to @iwiznia, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  11. 7 remaining items

  12. iwiznia commented on Dec 6, 2023

    @iwiznia
    Contributor

    I think @situchan fixed it yesterday #32525. But, it seems like he missed to change it in /src/libs/Navigation/Navigation.ts.

    Ah ok, given it's the same error, I think @situchan should fix it as part of that other issue, agree?

  13. allroundexperts commented on Dec 10, 2023

    @allroundexperts
    Contributor

    Are you still able to reproduce crash on latest main?

    Seems to be fixed on the latest main. I can also no longer reproduce this today. @suneox I see you had posted a proposal recently. Can you reproduce it?

  14. suneox commented on Dec 11, 2023

    @suneox
    Contributor

    @allroundexperts

    Currently it not happens on latest main but the root cause doesn't resolve.

    My fix was not fixing the root cause, but just to avoid crash. As seen in typing, rootState is not optional so should not be undefined

    My proposal can be resolve the root cause

  15. melvin-bot commented on Dec 14, 2023

    @melvin-bot

    @iwiznia, @allroundexperts, @bfitzexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  16. iwiznia commented on Dec 14, 2023

    @iwiznia
    Contributor

    @allroundexperts do you agree we should make the fix @suneox proposes?

  17. bfitzexpensify commented on Dec 17, 2023

    @bfitzexpensify
    Contributor

    Bump @allroundexperts - do you think the fix suggested by @suneox is worthwhile, even though this particular bug is no longer happening?

  18. situchan commented on Dec 17, 2023

    @situchan
    Contributor

    I think we can close this as no longer crash happening. If any critical issue happens in the future with the same root cause, we can always reopen.

  19. suneox commented on Dec 17, 2023

    @suneox
    Contributor

    Let me check another places same with this issue I'll feedback on tomorrow

  20. melvin-bot commented on Dec 19, 2023

    @melvin-bot

    @iwiznia @allroundexperts @bfitzexpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  21. bfitzexpensify commented on Dec 19, 2023

    @bfitzexpensify
    Contributor

    Any updated thoughts @suneox?

  22. suneox commented on Dec 20, 2023

    @suneox
    Contributor

    Any updated thoughts @suneox?

    I have tested and could not found any issue related with the root cause for this issue

  23. bfitzexpensify commented on Dec 20, 2023

    @bfitzexpensify
    Contributor

    Thanks @suneox. OK, let's close this one out then.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions