Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.36k stars 2.79k forks source link

[HOLD for Payment 2024-09-06][$250] Navigation - black page when Navigating back from invited workspace chat #47049

Closed IuliiaHerets closed 3 weeks ago

IuliiaHerets commented 1 month ago

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: v9.0.18-0 Reproducible in staging?: Y Reproducible in production?: N Issue was found when executing this PR https://github.com/Expensify/App/pull/45390 Email or phone of affected tester (no customers): dave0123seife@gmail.com Issue reported by: Applause Internal Team

Action Performed:

  1. Log in as User A, an account that owns a workspace
  2. Invite B, a user that does not yet have an Expensify account
  3. Check B's email for the invitation
  4. Open the new.expensify.com link from the email in a different browser
  5. Navigate back from the workspace chat (On Web: decrease the window size so you can get the back button)

Expected Result:

Navigating back takes you to LHN

Actual Result:

Navigating back takes you to a black page

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/626d0aac-f69a-4b8a-a434-311b3af53191

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01502c96e8462645b6
  • Upwork Job ID: 1821576366200920163
  • Last Price Increase: 2024-08-15
  • Automatic offers:
    • rayane-djouah | Reviewer | 103586817
    • nkdengineer | Contributor | 103586819
Issue OwnerCurrent Issue Owner: @miljakljajic
melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

Triggered auto assignment to @miljakljajic (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.

github-actions[bot] commented 1 month ago

:wave: 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 commented 1 month ago

We think that this bug might be related to #vip-split

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month ago

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

luacmartins commented 1 month ago

Invite B, a user that does not yet have an Expensify account

I'm failing on this step, since I get a "404 Account not found" error from the API.

luacmartins commented 1 month ago

Managed to get through by using a gmail email, instead of expensifail. This also happens in prod, so NAB.

nkdengineer commented 1 month ago

Proposal

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

Navigating back takes you to a black page

What is the root cause of that problem?

We handle the exitTo navigation here

https://github.com/Expensify/App/blob/87c116bdb8a548011c82483fa28cc9f0051131fe/src/pages/ValidateLoginPage/index.tsx#L23-L24

In this function, we use navigate to go to the exitTo so the previous page is still in the stack navigation. Then when we click on the back button, the blank page appears now because the data is loaded https://github.com/Expensify/App/blob/87c116bdb8a548011c82483fa28cc9f0051131fe/src/libs/actions/Session/index.ts#L1004

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

We should use Navigation.goBack to remove the validation page in the navigation stack before we navigate to the exitTo page

Navigation.goBack();
Navigation.navigate(url); 

https://github.com/Expensify/App/blob/87c116bdb8a548011c82483fa28cc9f0051131fe/src/pages/ValidateLoginPage/index.tsx#L23-L24

What alternative solutions did you explore? (Optional)

Or we can use navigate with type up

Navigation.navigate(url, CONST.NAVIGATION.TYPE.UP); 

https://github.com/Expensify/App/blob/87c116bdb8a548011c82483fa28cc9f0051131fe/src/pages/ValidateLoginPage/index.tsx#L23-L24

rayane-djouah commented 1 month ago

@nkdengineer Are you still able to reproduce?

nkdengineer commented 1 month ago

@rayane-djouah Yes, I'm still able to reproduce. The detailed steps:

  1. As user A, invite user B who does not yet have an Expensify account
  2. Login as user B
  3. Check user B's invitation
  4. Open the Expensify URL in the invitation email
  5. Navigate back from the workspace chat (On Web: decrease the window size so you can get the back button)

https://github.com/user-attachments/assets/b1271457-121d-4722-8f53-6a003df50138

rayane-djouah commented 1 month ago

@nkdengineer - Unable to reproduce, am I missing anything?

https://github.com/user-attachments/assets/8e378610-1e04-4b7d-b21a-de8b76b57841

nkdengineer commented 1 month ago

@rayane-djouah After inviting user B, you need to login as user B first before opening the invitation URL to reproduce this bug.

melvin-bot[bot] commented 1 month ago

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

rayane-djouah commented 1 month ago

@nkdengineer - I see, I’m now able to reproduce the issue. Could you please explain why the bug occurs when the user is signed in but not when the user is not signed in?

nkdengineer commented 1 month ago

@rayane-djouah That is because ValidateLoginPage is on both PublicScreen and AuthScreen. If the user is not signed in we run signInWithValidateCode logic in ValidateLoginPage of PublicScreen. After this is successful the user moves to the AuthScreen then ValidateLoginPage isn't in the stack navigator.

rayane-djouah commented 1 month ago

@nkdengineer's proposal looks good to me.

:ribbon::eyes::ribbon: C+ reviewed

melvin-bot[bot] commented 1 month ago

Current assignee @luacmartins is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

melvin-bot[bot] commented 1 month ago

πŸ“£ @rayane-djouah πŸŽ‰ An offer has been automatically sent to your Upwork account for the Reviewer role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job

melvin-bot[bot] commented 1 month ago

πŸ“£ @nkdengineer πŸŽ‰ An offer has been automatically sent to your Upwork account for the Contributor role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review πŸ§‘β€πŸ’» Keep in mind: Code of Conduct | Contributing πŸ“–

rayane-djouah commented 1 month ago

⚠️ We just got confirmation on Slack that the Deploy Checklist: New Expensify 2024-08-26 which includes the PR of this issue was only deployed to production in Deploy Checklist: New Expensify 2024-08-28. More context on why this happened can be found in this Slack thread and this Slack comment.

Given the context above, this issue should be on [HOLD for Payment 2024-09-6] according to production deploy from Deploy Checklist: New Expensify 2024-08-28.

cc @miljakljajic

miljakljajic commented 4 weeks ago

both offers have been accepted and will be paid on the 6th

miljakljajic commented 3 weeks ago

Both contracts paid and ended