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

[$125] Hybrid app - Book travel - App back button on country list directly returns to Expensify Classic #58026

Open
2 of 8 tasks
IuliiaHerets opened this issue Mar 7, 2025 · 13 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Hourly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Mar 7, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.1.10-1
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: iPhone 15 Pro Max / iOS 18.3
App Component: Other

Action Performed:

Precondition:

  • Account has at least one default group workspace.
  • The default workspace does not have address.
  1. Launch hybrid app.
  2. Go to Settings.
  3. Tap Switch to Expensify Classic.
  4. Open menu.
  5. Tap Travel.
  6. Tap Book travel.
  7. Tap Country.
  8. Tap app back button.

Expected Result:

App back button on country list will return to Company address page.

Actual Result:

App back button on country list directly returns to Expensify Classic instead of address page.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6764123_1741360594251.ScreenRecording_03-07-2025_23-11-54_1.1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021898504489447041059
  • Upwork Job ID: 1898504489447041059
  • Last Price Increase: 2025-03-08
Issue OwnerCurrent Issue Owner: @ZhenjaHorbach
@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment labels Mar 7, 2025
Copy link

melvin-bot bot commented Mar 7, 2025

Triggered auto assignment to @sonialiap (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Mar 7, 2025

Triggered auto assignment to @yuwenmemon (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@melvin-bot melvin-bot bot added the Daily KSv2 label Mar 7, 2025
Copy link

melvin-bot bot commented Mar 7, 2025

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Mar 7, 2025
Copy link
Contributor

github-actions bot commented Mar 7, 2025

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@IuliiaHerets
Copy link
Author

Not repro on prod with build via App Store/Play Market

ScreenRecording_03-08-2025.00-21-08_1.MP4

@samranahm
Copy link

Proposal

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

Hybrid app - Book travel - App back button on country list directly returns to Expensify Classic

What is the root cause of that problem?

We are getting the back to route from route

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

<HeaderWithBackButton
title={translate('common.country')}
shouldShowBackButton
onBackButtonPress={() => {
const backTo = route.params.backTo ?? '';

we should update it to

 Navigation.goBack();

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Mar 8, 2025
@melvin-bot melvin-bot bot changed the title Hybrid app - Book travel - App back button on country list directly returns to Expensify Classic [$250] Hybrid app - Book travel - App back button on country list directly returns to Expensify Classic Mar 8, 2025
Copy link

melvin-bot bot commented Mar 8, 2025

Job added to Upwork: https://www.upwork.com/jobs/~021898504489447041059

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 8, 2025
Copy link

melvin-bot bot commented Mar 8, 2025

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

@mountiny
Copy link
Contributor

mountiny commented Mar 8, 2025

@samranahm What PR does this blocker come from?

@mountiny mountiny changed the title [$250] Hybrid app - Book travel - App back button on country list directly returns to Expensify Classic [$125] Hybrid app - Book travel - App back button on country list directly returns to Expensify Classic Mar 8, 2025
Copy link

melvin-bot bot commented Mar 8, 2025

Upwork job price has been updated to $125

@samranahm
Copy link

@mountiny I'm OOO currently, I'll update here as soon as I return

@MarkAndrew123
Copy link

MarkAndrew123 commented Mar 9, 2025

Contributor details
Your Expensify account email: [email protected]
Upwork Profile Link:https://www.upwork.com/freelancers/~0176a625518080b215
Hello Guys, I've done a quick review of this issue and codebase. In the countrySelectionPage, we have:

const backTo = route.params.backTo ?? '';
const backToRoute = backTo ? `${backTo}?country=${currentCountry}` : '';
Navigation.goBack(backToRoute as Route, { compareParams: false });

so basically the possible error in this navigation back approach is the improper handling of empty route parameters basically When backTo is empty, the code constructs an empty string route (backToRoute = '') and passes it to Navigation.goBack(). This causes the navigation system to attempt to find a matching route with an empty identifier rather than executing a standard back operation.
and this approach is kinda incorrect be cause an incorrect or non matching route resolution means the navigation jumps to a random location instead of the previous screen , so alternatively we could could use an if statement to explicitly structure our goback function , this if statement basically checks for an empty backto case and it uses a random navigation.goback just to structure routing to it's original adress. so basically this only apply route parameters when an actual destination is specified.
I hope this was helpful or insightful

Copy link

melvin-bot bot commented Mar 9, 2025

📣 @MarkAndrew123! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Hourly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants