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

Travel - Expensify Travel page opens with delay, "Something went wrong" error #46971

Closed
1 of 6 tasks
IuliiaHerets opened this issue Aug 7, 2024 · 22 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

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: 9.0.17-1
Reproducible in staging?: Y
Reproducible in production?: N
Issue reported by: Applause Internal Team

Issue found when executing PR: #46333

Action Performed:

  1. Account B: Navigate to https://staging.new.expensify.com/
    in Chrome incognito
  2. Account B: Log in with a new expensifail account
  3. Account A: Navigate to https://staging.new.expensify.com/
    in Chrome
  4. Account A: Log in with a new expensifail account
  5. Account B: Create a workspace
  6. Account B: Navigate to Account settings - Workspaces - Created workspace - Members
  7. Account B: Click on "+ Invite member"
  8. Account B: Invite account A
  9. Account A: Navigate to FAB - Book travel
  10. Account A: Click on the "Book travel" button
  11. Account A: Type "123" into Address line 1 and choose any of the suggested addresses
  12. Account A: Click on the "Save" button
  13. Account A: Click on the "Book travel" button
  14. Account A: Click insode the TOS checkbox
  15. Account A: Click on the "Continue" button a few times until the Travel page opens

Expected Result:

Expensify Travel page should open instantly. The "Before we continue..." RHP should close in ND.

Actual Result:

Expensify Travel page opens with a delay of 3-4 seconds. "Something went wrong. Please try again later." error message appears above the "Continue" button after clicking it a few times.

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

Bug6564343_1723032067955.1.mp4

View all open jobs on GitHub

@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Aug 7, 2024
Copy link

melvin-bot bot commented Aug 7, 2024

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

Copy link

melvin-bot bot commented Aug 7, 2024

Triggered auto assignment to @puneetlath (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
Contributor

github-actions bot commented Aug 7, 2024

👋 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

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

@nyomanjyotisa
Copy link
Contributor

Proposal

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

Expensify Travel page opens with delay, "Something went wrong" error

What is the root cause of that problem?

We don't disable the button and show loading indicator while waiting API response here

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

Add isLoading?: boolean; here

Set isLoading to true on optimisticData here
Then set isLoading to false on successData and failureData

Pass isLoading on the button here

const [travelSetting] = useOnyx(ONYXKEYS.NVP_TRAVEL_SETTINGS);

...

isLoading={travelSetting?.isLoading}

What alternative solutions did you explore? (Optional)

@trjExpensify
Copy link
Contributor

@shubham1206agra @rushatgabhane @stitesExpensify this deploy blocker was created when executing this PR: #46333

@trjExpensify
Copy link
Contributor

Also, @puneetlath @AndrewGable travel is behind a beta, so I think we can demote this as a deploy blocker.

@puneetlath puneetlath added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API Hourly KSv2 labels Aug 7, 2024
@melvin-bot melvin-bot bot added the Overdue label Aug 9, 2024
@stitesExpensify
Copy link
Contributor

@rushatgabhane are you taking a look at this?

@melvin-bot melvin-bot bot removed the Overdue label Aug 9, 2024
@rushatgabhane
Copy link
Member

@stitesExpensify i cannot reproduce this

@melvin-bot melvin-bot bot added the Overdue label Aug 12, 2024
@stitesExpensify
Copy link
Contributor

@IuliiaHerets can you please try this again with a brand new account?

@melvin-bot melvin-bot bot removed the Overdue label Aug 12, 2024
@IuliiaHerets
Copy link
Author

@stitesExpensify our team will check this and I will get back to you with the actual result.

@IuliiaHerets
Copy link
Author

@stitesExpensify QA Team still can reproduce the issue

bandicam.2024-08-13.12-20-06-953.mp4

@rushatgabhane
Copy link
Member

@stitesExpensify the authCide is being returned.

So I'm guessing after clicking book travel multiple times, the final API call was successful

Is it possible that the policy has not been provisioned on spotnana?

@stitesExpensify sorry im not able to figure out what could be causing this bug. I think we'll have to see the logs

@stitesExpensify
Copy link
Contributor

Click on the "Continue" button a few times until the Travel page opens

Based on this I'm thinking that it has something to do with the temporary auth tokens that we use to log in on spotnana. IMO the best solution is to disable the button and show a loading indicator until we get a response from the request so that:

  1. The user knows something is happening and doesn't get frustrated
  2. We don't allow sending a bunch of provision requests all at once

Thoughts @Expensify/design ?

@dubielzyk-expensify
Copy link
Contributor

Hmm. Yeah I don't mind the idea of turning it into a spinner button while it's loading. That being said we can also limit the requests being sent without telling the user or changing the button. I think I'm still leaning towards doing the loading button for this:

CleanShot 2024-08-14 at 09 41 08@2x

Keen to hear what the other designers think though

@shawnborton
Copy link
Contributor

Yup, I agree with that Jon.

@dannymcclain
Copy link
Contributor

Same!

@rushatgabhane
Copy link
Member

sounds good 👍

Will add a loading state to the button

@melvin-bot melvin-bot bot added the Overdue label Aug 16, 2024
Copy link

melvin-bot bot commented Aug 19, 2024

@puneetlath, @rushatgabhane, @stitesExpensify Huh... This is 4 days overdue. Who can take care of this?

@puneetlath
Copy link
Contributor

How's it going @rushatgabhane?

@melvin-bot melvin-bot bot removed the Overdue label Aug 19, 2024
Copy link

melvin-bot bot commented Aug 21, 2024

@puneetlath @rushatgabhane @stitesExpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Aug 21, 2024
@rushatgabhane
Copy link
Member

we're good to close this. pr on production last month

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. Engineering Reviewing Has a PR in review Weekly KSv2
Projects
Development

No branches or pull requests

10 participants