Skip to content

Error message persists and expense not completed on tapping Try again CTA #106331

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.33.0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #105041
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: iPhone 16/18.7.1
App Component: Money Requests

Action Performed:

Preconditions: Create new gmail account without + and with at least 1 workspace

Steps:

  1. Launch Hybrid app
  2. Open troubleshoot modal (tap 4 fingers on the screen) >> toggle on simulate poor internet connection
    3.Go to workspace chat >> scan a receipt to create an expense.
  3. Quickly tap 4 fingers on screen >> turn off simulate poor internet connection then turn on Simulate failing network requests
  4. Open the expense
  5. Turn Simulate failing network requests off.
  6. Tap Try again button

Expected Result:

After turning off Simulate failing network requests, expense should complete & the error row should dismiss after tapping Try again CTA

Actual Result:

Error message persists and expense not completed on tapping Try again CTA. Expense remain in Scanning status with the error message

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7307217_1794000353387.ScreenRecording_11-06-2026_15-29-29_1__1_.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Rizky Gunawan
Bug ID: 7307217

Issue OwnerCurrent Issue Owner: @rinej

Activity

  1. applause-bot commented on Nov 9, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/850cfa763f0ebf2b8b5e7bb924ab2b99ee19c1e9eef3ac955e9c2635eebe65ce

  2. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 9, 2026
  3. melvin-bot commented on Nov 9, 2026

    @melvin-bot

    @mountiny recently merged #105041, but they are OOO right now, so I'll auto-assign someone else.

  4. melvin-bot commented on Nov 9, 2026

    @melvin-bot

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

  5. github-actions commented on Nov 9, 2026

    @github-actions
    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.
  6. melvin-bot commented on Nov 9, 2026

    @melvin-bot

    @mountiny @eh2077 you have been assigned to this deploy blocker because you reviewed the offending PR: #105041

  7. melvin-bot commented on Nov 9, 2026

    @melvin-bot

    @adhorodyski you have been assigned to this deploy blocker because you authored the offending PR: #105041

  8. 6 remaining items

  9. mountiny commented on Nov 9, 2026

    @mountiny
    Contributor

    @MelvinBot can you try to find rca and fix?

  10. MelvinBot commented on Nov 9, 2026

    @MelvinBot
    Contributor

    I investigated further, but couldn’t establish the full RCA confidently enough to ship a fix.

    Two concrete retry-state gaps emerged:

    • Already-created expenses can remain locally “Scanning.” Retry rebuilds the receipt as SCAN_READY; when the server responds AlreadyCreated, the queue applies cleanup without refreshing authoritative receipt state. This can leave stale scanning state, but does not explain the persistent error by itself. Evidence: retry reconstruction, queue handling.
    • The separate HTTP-400 duplicate-response path drops the request without success/finally cleanup. That could leave pending/error state, but there’s no evidence this reproduction received that response. Evidence: response classification, queue branch.

    I also traced native receipt storage: ordinary capture, failure, and retry preserve the file correctly; I found no demonstrated deletion or URI mismatch.

    Blocker: the issue supplies no tester account or transaction ID, and log access was unavailable. Web cannot exercise this native-only retry. Consequently, neither conditional defect is confirmed as this issue’s cause.

    To unblock: provide the affected tester account, reproduction timestamp, transaction/report ID, and native [ReceiptRetry] logs plus the retry RequestMoney response. Those distinguish file/payload failure from duplicate-response reconciliation.

    No code changes or PR were created; I avoided presenting unrelated hardening as a verified fix.


    view run

  11. mountiny commented on Nov 10, 2026

    @mountiny
    Contributor

    @adhorodyski who cdan take this on? I think you have higher priority tasks with the receipts capturing failures

  12. adhorodyski commented on Nov 10, 2026

    @adhorodyski
    Contributor

    yeah I'll try looping in the team to find a volunteer

  13. rinej commented on Nov 12, 2026

    @rinej
    Contributor

    I looked into this. I couldn't reproduce it on the latest main on staging. I tried:

    • an expense added to an existing report
    • an expense that creates a new report in a new workspace
    • holding the original RequestMoney and turning "Simulate failing network requests" on while it was in flight (closest to the steps in the issue)
    • tapping Try again right after the first failure

    In every case, once the network failing was off the error went away for good.

    I see two possible explanations:

    1. The network simulation was still in effect when the retry's response came back. With the toggle turned on during the retry, I got exactly what the video shows: the error clears, comes back about 3s later and the expense stays in "Scanning…".

    ❓Applause team, could you share the account email you used and the date and time of the test? Then I can check the server logs for that session and confirm which of the two it was.

    1. The server rejected the request permanently. The app only treats Transaction already created. as success, for any other server error it shows the Try Again, even when retrying can't help.

    ❓For this one we might stop offering Try again when the server rejects the request permanently, BUT how will we know that the rejection is permanent? We will need to have the list of errors from the backend team or something

  14. rinej commented on Nov 12, 2026

    @rinej
    Contributor

    I also checked with claude Try again usage on production. In the example week (Oct 25 – Nov 1) there were 88 taps on 73 transactions. 6 transactions were retried more than once and 5 of those 6 had error which look like "permanent server error" ( I filtered out transactions id).

    Transaction Taps Server message
    1 6 New expenses cannot be added to this report.
    2 4 You do not have the permissions required to create expense on this policy.
    3 3 New expenses cannot be added to this report.
    4 3 New expenses cannot be added to this report.
    5 3 The accounts in this request are associated, you cannot request money from yourself.
    6 2 no server rejection logged

    So this might be potential errors to hide the Try Again button for the user

  15. mountiny commented on Nov 13, 2026

    @mountiny
    Contributor

    I asked again for a retest

  16. m-natarajan commented on Nov 13, 2026

    @m-natarajan

    Pass on iPhone 12/iOS 27.0.1/Build 9.5.37-1

    e06de71d-73d9-4827-9332-48d9531b40e6.mp4
  17. rinej commented on Nov 13, 2026

    @rinej
    Contributor

    Thank you @m-natarajan for retesting it! Looks like we can't reproduce it anymore

    From my research on the production logs, I have ideas for two follow-up PRs:

    1. Stop offering Try again for permanent server errors. Some rejections can never succeed on retry. Now the user gets Try again anyway, taps it and the error comes back every time without saying why. The idea is to show only Save (maybe plus the server's reason for those errors) and keep Try again for temporary failures (timeouts, network issues) (Ideally - if we could get some param from backend with the isRetryable flag, witout it we can still filter some of the errors)

    2. Log the result of every retry. Right now we only log that Try again was tapped, not how the retry ended. To find out, we have to match the transactionID between Sentry and VictoriaLogs by hand. Logging the result of each retry (success, already created, rejected, etc) and adding tags with retries in Sentry would make cases like this easier to track

    @mountiny what do you think, do we want to go in either direction? I can share draft PRs with the changes soon

  18. mountiny commented on Nov 13, 2026

    @mountiny
    Contributor

    Could the retrys spam a lot of logs? I would probably wait until we see this being an issue

  19. rinej commented on Nov 16, 2026

    @rinej
    Contributor

    It depends on the week. The result logging could double the retry logs. In a week like Oct 25 - Nov 1 that would be less then ~1k extra lines, but there are weeks like Nov 5–12 with ~8k retries, so it could add up. I agree we can park it until we have an issue with it.

    What about the first one (hiding Try again for permanent server errors and showing the reason)? Should we park it as well and wait to see IF it becomes a problem for the users?

  20. mountiny commented on Nov 17, 2026

    @mountiny
    Contributor

    Yeah lets focus elsewhere, I think these are really niche for now

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

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions