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

[$500] Request - Unable to request money after a refresh #28320

Closed
3 of 6 tasks
kbecciv opened this issue Sep 27, 2023 · 17 comments
Closed
3 of 6 tasks

[$500] Request - Unable to request money after a refresh #28320

kbecciv opened this issue Sep 27, 2023 · 17 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 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

Comments

@kbecciv
Copy link

kbecciv commented Sep 27, 2023

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


Action Performed:

  1. Click on FAB > Request money > Scan
  2. Upload a receipt > Choose a user
  3. Refresh the page
  4. Click on the Request Button

Expected Result:

Able to request money after the refresh

Actual Result:

Unable to request money after the refresh

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Build: v1.3.74-2
Reproducible in staging?: y
Reproducible in production?: n
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
Notes/Photos/Videos: Any additional supporting documentation

XRecorder_27092023_070354.mp4
T151mac.Request.Money-1.mp4
Screen_Recording_20230927_115408_Chrome.mp4
Recording.4775.mp4

Expensify/Expensify Issue URL:
Issue reported by: @daveSeife
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695786807078109

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0178e49860d663e0a4
  • Upwork Job ID: 1709206608423825408
  • Last Price Increase: 2023-10-03
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Sep 27, 2023
@OSBotify
Copy link
Contributor

👋 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.

@melvin-bot
Copy link

melvin-bot bot commented Sep 27, 2023

Triggered auto assignment to @AndrewGable (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@AndrewGable
Copy link
Contributor

Able to reproduce on staging, not on production

@AndrewGable
Copy link
Contributor

AndrewGable commented Sep 27, 2023

@luacmartins @danieldoglas -Reverting #27224 fixes the issue, it seems to be on this line:

https://github.com/Expensify/App/blob/main/src/pages/iou/steps/MoneyRequestConfirmPage.js#L222

Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'state')
    at eval (MoneyRequestConfirmPage.js:153:1)

@AndrewGable
Copy link
Contributor

Going to let @luacmartins decide if he wants to CP a fix or CP a revert here, happy to help but don't want to spin up a revert if we want to move this forward.

@luacmartins
Copy link
Contributor

I don't think this is a blocker. Although you can proceed with the flow on prod, the request also fails with 405 invalid amount because the local blob receipt file is gone after the refresh. Additionally, I think we already fixed it on main since I'm getting redirected back to the receipt selector page upon refresh. Trying to find where we fixed it though to be sure.

@luacmartins
Copy link
Contributor

I'm not really sure what changed, but I'm always hitting this code on main and being navigated back to the receipt selector.

I'm gonna demote this to NAB since the request also fails on prod (on a different line but same root cause). I'll verify that this is resolved on staging after the next deploy.

@luacmartins luacmartins added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Sep 28, 2023
@melvin-bot melvin-bot bot added the Overdue label Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

@AndrewGable, @luacmartins Eep! 4 days overdue now. Issues have feelings too...

@luacmartins
Copy link
Contributor

It seems like the latest deploy did not fix the issue and the user is no longer redirected to the beginning of the flow. I think we can make this external since it's a navigation issue.

@melvin-bot melvin-bot bot removed the Overdue label Oct 3, 2023
@luacmartins luacmartins added the Bug Something is broken. Auto assigns a BugZero manager. label Oct 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

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

@luacmartins luacmartins added the External Added to denote the issue can be worked on by a contributor label Oct 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

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

@melvin-bot melvin-bot bot changed the title Request - Unable to request money after a refresh [$500] Request - Unable to request money after a refresh Oct 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 3, 2023

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

@DylanDylann
Copy link
Contributor

DylanDylann commented Oct 3, 2023

Proposal

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

Request - Unable to request money after a refresh

What is the root cause of that problem?

const receipt = file;
receipt.state = file && isManualRequestDM ? CONST.IOU.RECEIPT_STATE.OPEN : CONST.IOU.RECEIPT_STATE.SCANREADY;

When reloading file will be undefined and receipt also be undefined so the App can't read state of undefined

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

we should check if receipt is object before reading state attribute

What alternative solutions did you explore? (Optional)

@luacmartins
Copy link
Contributor

Thanks for the proposal @DylanDylann. I think a better solution in this case would be to redirect the user back to the receipt selector, since submitting the request with an undefined file will also result in an API error

@DylanDylann
Copy link
Contributor

DylanDylann commented Oct 3, 2023

@luacmartins It seems this issue and #28347 have same RCA. Could you also check this comment

@luacmartins
Copy link
Contributor

luacmartins commented Oct 3, 2023

Thanks for the link @DylanDylann. I agree that they have the same RCA. I'm gonna close this issue in favor of #28347 since it has more details and it was also reported first in Slack

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. Daily KSv2 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
Projects
None yet
Development

No branches or pull requests

7 participants