App: [HOLD for payment 2024-02-14] [$500] Long pressing "Go to Expensify Classic" option in Settings Crashes the App
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.32-2 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: @ishpaul777 Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1706307323470669
Action Performed:
- Go to settings
- Long press
Go to expensify classic
Expected Result:
App should not crash
Actual Result:
App crashed
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
https://github.com/Expensify/App/assets/38435837/6c15913f-349b-4db2-af94-f46ab99b7d42
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~017b2c107d082607ce
- Upwork Job ID: 1751947232616599552
- Last Price Increase: 2024-01-29
- Automatic offers:
- ishpaul777 | Contributor | 28134405
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Comments: 22 (11 by maintainers)
not overdue, we can close this now
$500 approved for @mananjadhav based on summary above.
I tried finding the root PR, the best one where we refactored the links in
InitialSettingsPageis this PR. @ishpaul777 if you could identify the offending PR?I don’t think we need a regression test for this one.
Proposal
Problem Statement
Users are experiencing app crashes when performing a long press on the “Go to Expensify Classic” option in Settings.
Root Cause
We are not using
Link.buildOldDotURLproperly in thegetDefaultMenuItemsin theInitialSettingsPage. The function returns a promise instead of a string, leading to unexpected behavior and crash.https://github.com/Expensify/App/blob/c5ca9a810b529cdc8b8fceb179e9cfc01061355a/src/pages/settings/InitialSettingsPage.js#L274
Proposed Solution
To address the problem, we should handle the link properly similar to what we have done for MenuItemList:
https://github.com/Expensify/App/blob/c5ca9a810b529cdc8b8fceb179e9cfc01061355a/src/pages/settings/InitialSettingsPage.js#L274
to:
https://github.com/Expensify/App/blob/c5ca9a810b529cdc8b8fceb179e9cfc01061355a/src/components/MenuItemList.tsx#L34-L40