Skip to content

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

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com 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

Activity

  1. OSBotify commented on Sep 27, 2023

    @OSBotify
    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.
  2. melvin-bot commented on Sep 27, 2023

    @melvin-bot

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

  3. AndrewGable commented on Sep 27, 2023

    @AndrewGable
    Contributor

    Able to reproduce on staging, not on production

  4. AndrewGable commented on Sep 27, 2023

    @AndrewGable
    Contributor

    @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)
    
  5. AndrewGable commented on Sep 27, 2023

    @AndrewGable
    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.

  6. luacmartins commented on Sep 28, 2023

    @luacmartins
    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.

  7. luacmartins commented on Sep 28, 2023

    @luacmartins
    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.

  8. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Sep 28, 2023
  9. 5 remaining items

  10. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 3, 2023
  11. melvin-bot commented on Oct 3, 2023

    @melvin-bot

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

  12. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 3, 2023
  13. melvin-bot commented on Oct 3, 2023

    @melvin-bot

    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
  14. changed the title [-]Request - Unable to request money after a refresh[/-] [+][$500] Request - Unable to request money after a refresh[/+] on Oct 3, 2023
  15. melvin-bot commented on Oct 3, 2023

    @melvin-bot
  16. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Oct 3, 2023
  17. melvin-bot commented on Oct 3, 2023

    @melvin-bot

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

  18. DylanDylann commented on Oct 3, 2023

    @DylanDylann
    Contributor

    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)

  19. luacmartins commented on Oct 3, 2023

    @luacmartins
    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

  20. DylanDylann commented on Oct 3, 2023

    @DylanDylann
    Contributor

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

  21. luacmartins commented on Oct 3, 2023

    @luacmartins
    Contributor

    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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions