Skip to content

[Due for payment 2026-01-13] [Due for payment 2025-12-17] [$250] Confirm page loads infinitely after opening scan shortcut and opening create manual from QAB #75046

Closed

Description

@nlemma

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.2.57-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #72714
Email or phone of affected tester (no customers): sjidonjdsoisdjsod2@gmail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.5 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an expense.
  4. Open primary receipt scan button.
  5. Close the RHP.
  6. Open FAB.
  7. Click Create expense under Quick action.
  8. Enter amount > Next.

Expected Result:

Confirm page will not load infinitely.

Actual Result:

Confirm page shows Scan confirm page when it is a manual expense and it loads infinitely.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7002428_1763011482052.10.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021993335218775137514
  • Upwork Job ID: 1993335218775137514
  • Last Price Increase: 2025-12-02
  • Automatic offers:
    • FitseTLT | Contributor | 109685468
Issue OwnerCurrent Issue Owner: @RachCHopkins

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 13, 2025
  2. melvin-bot commented on Nov 13, 2025

    @melvin-bot

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

  3. etCoderDysto commented on Nov 13, 2025

    @etCoderDysto
    Contributor

    Proposal

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

    Confirm page loads infinitely after opening scan shortcut and opening create manual from QAB

    What is the root cause of that problem?

    We show FullScreenLoadingIndicator when the draft transaction type is scan and when there is no receipt file

    {(isLoading || (isScanRequest(transaction) && !Object.values(receiptFiles).length)) && <FullScreenLoadingIndicator />}

    We initialize draft transaction with the new newIOUType
    initMoneyRequest({
    reportID,
    policy,
    isFromGlobalCreate: transaction?.isFromGlobalCreate ?? isFromGlobalCreate,
    currentIouRequestType: transaction?.iouRequestType,
    newIouRequestType: newIOUType,
    report,
    parentReport,
    currentDate,
    lastSelectedDistanceRates,
    currentUserPersonalDetails,

    we calculate newIOUType here. When shouldUseTab is true and when the previously selected tab is not perdiem we assign selectedTab (previously visited tab) to newIOUType which is scan
    const transactionRequestType = useMemo(() => {
    if (!transaction?.iouRequestType) {
    if (shouldUseTab) {
    if (selectedTab === CONST.TAB_REQUEST.PER_DIEM && !shouldShowPerDiemOption) {
    return undefined;
    }
    return selectedTab;
    }
    return CONST.IOU.REQUEST_TYPE.MANUAL;
    }
    return transaction.iouRequestType;

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

    We should make shouldUseTab false if the iouType type is sbumit

     const shouldUseTab = iouType !== CONST.IOU.TYPE.SEND && iouType !== CONST.IOU.TYPE.PAY && iouType !== CONST.IOU.TYPE.INVOICE && iouType !== CONST.IOU.TYPE.SUBMIT;
    

    const shouldUseTab = iouType !== CONST.IOU.TYPE.SEND && iouType !== CONST.IOU.TYPE.PAY && iouType !== CONST.IOU.TYPE.INVOICE;

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. FitseTLT commented on Nov 13, 2025

    @FitseTLT
    Contributor

    Proposal

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

    Confirm page loads infinitely after opening scan shortcut and opening create manual from QAB

    What is the root cause of that problem?

    When selectedTab was scan and we use QAB with manual request type set the selectedTab is updated from the current route

    Tab.setSelectedTab(id, newSelectedTab as SelectedTabRequest);

    but it happens too slow and this effect here is run with the transactionRequestType calculated from the old selectedTab which was scan
    useFocusEffect(
    useCallback(() => {
    // The test transaction can change the reportID of the transaction on the flow so we should prevent the reportID from being reverted again.
    if (transaction?.reportID === reportID || isLoadingSelectedTab || !transactionRequestType || prevTransactionReportID !== transaction?.reportID) {
    return;
    }
    resetIOUTypeIfChanged(transactionRequestType);

    so the transaction iouRequestType will be set to scan and when we reach the confirmation screen we will see loading because it is understood as scan request type transaction without receipt
    {(isLoading || (isScanRequest(transaction) && !Object.values(receiptFiles).length)) && <FullScreenLoadingIndicator />}

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

    The effect is suppose to run when there is a change of reportID but in our case it runs because the transaction data is still loading from onxy so we can avoid the effect here when the transaction data is still loading from onyx

    useFocusEffect(
    useCallback(() => {
    // The test transaction can change the reportID of the transaction on the flow so we should prevent the reportID from being reverted again.
    if (transaction?.reportID === reportID || isLoadingSelectedTab || !transactionRequestType || prevTransactionReportID !== transaction?.reportID) {
    return;
    }
    resetIOUTypeIfChanged(transactionRequestType);

        const isLoadingTransaction = isLoadingOnyxValue(transactionResult);
    
       // Clear out the temporary expense if the reportID in the URL has changed from the transaction's reportID.
        useFocusEffect(
            useCallback(() => {
                // The test transaction can change the reportID of the transaction on the flow so we should prevent the reportID from being reverted again.
                if (transaction?.reportID === reportID || isLoadingTransaction || isLoadingSelectedTab || !transactionRequestType || prevTransactionReportID !== transaction?.reportID) {
                    return;
                }
                resetIOUTypeIfChanged(transactionRequestType);
            }, [transaction?.reportID, reportID, resetIOUTypeIfChanged, isLoadingTransaction, transactionRequestType, isLoadingSelectedTab, prevTransactionReportID]),
        );
    

    Alternatively, just like we did here for the quick scan flow to solve a similar bug

    Tab.setSelectedTab(CONST.TAB.IOU_REQUEST_TYPE, CONST.IOU.REQUEST_TYPE.SCAN);

    we will need to set the tab here
    const requestType = getQuickActionRequestType(quickAction?.action, lastDistanceExpenseType);

     if (requestType) {
            Tab.setSelectedTab(CONST.TAB.IOU_REQUEST_TYPE, requestType);
        }
    

    so that the selected tab data is ready when we reach start page

    What alternative solutions did you explore? (Optional)

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 25, 2025
  6. changed the title [-]Confirm page loads infinitely after opening scan shortcut and opening create manual from QAB[/-] [+][$250] Confirm page loads infinitely after opening scan shortcut and opening create manual from QAB[/+] on Nov 25, 2025
  7. melvin-bot commented on Nov 25, 2025

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 25, 2025
  9. melvin-bot commented on Nov 25, 2025

    @melvin-bot

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

  10. 42 remaining items

  11. changed the title [-][Due for payment 2025-12-17] [$250] Confirm page loads infinitely after opening scan shortcut and opening create manual from QAB[/-] [+][Due for payment 2026-01-13] [Due for payment 2025-12-17] [$250] Confirm page loads infinitely after opening scan shortcut and opening create manual from QAB[/+] on Jan 6, 2026
  12. melvin-bot commented on Jan 6, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Jan 6, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.93-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-01-13. 🎊

    For reference, here are some details about the assignees on this issue:

  14. melvin-bot commented on Jan 6, 2026

    @melvin-bot

    @hoangzinh @RachCHopkins The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  15. RachCHopkins commented on Jan 12, 2026

    @RachCHopkins
    Contributor

    Checklist please @hoangzinh

  16. hoangzinh commented on Jan 12, 2026

    @hoangzinh
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: No offending PR. It's a new edge case that we haven't covered before

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue: https://github.com/Expensify/Expensify/issues/588168

    Regression Test Proposal

    Test:

    1. Go to workspace chat.
    2. Create a manual expense.
    3. Click on the primary receipt scan button.
    4. Close the RHP.
    5. Open FAB.
    6. Click Create expense under Quick action.
    7. Enter amount > Next.
    8. Verify that the Confirm page does not show a loading indicator.

    Do we agree 👍 or 👎

    Zapier Logs Run ID: 00040eee-fccd-afba-a9cc-ab90410c5ba4
  17. RachCHopkins commented on Jan 14, 2026

    @RachCHopkins
    Contributor

    Payment Summary:

    • Contributor: @FitseTLT to be paid $250 via Upwork
    • Contributor+: @hoangzinh to be paid $250 via NewDot Manual Request

    Upwork job here

  18. RachCHopkins commented on Jan 14, 2026

    @RachCHopkins
    Contributor

    Contributor has been paid, the contract has been completed, and the Upwork post has been closed.

    🟢 to @hoangzinh to request payment via newdot.

  19. garrettmknight commented on Jan 21, 2026

    @garrettmknight
    Contributor

    $250 approved for @hoangzinh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions