Skip to content

[Awaiting Checklist] [Due for payment 2025-12-11] [$250] Expense - Download button on eReceipt opens not here page in another tab, crashes on Android #75045

Closed

Description

@jponikarchuk

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: #36030
Email or phone of affected tester (no customers): applausetester+ccardfeed@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.5 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Workspace has card transactions with eReceipt.
  1. Go to staging.new.expensify.com
  2. Go to Reports > Expenses.
  3. Open a card transaction that has eReceipt.
  4. Click on the eReceipt.
  5. Click Download button.

Expected Result:

Download button should be disabled since we cannot download eReceipt (according to #36030).

Actual Result:

Download button is shown on eReceipt, which opens not here page in another tab.

On Android app, it crashes.
On iOS app, it shows attachment cannot be downloaded.

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

1.mp4
2.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021990495208154396643
  • Upwork Job ID: 1990495208154396643
  • Last Price Increase: 2025-11-17
  • Automatic offers:
    • etCoderDysto | Contributor | 109556799
Issue OwnerCurrent Issue Owner: @garrettmknight

Activity

  1. added
    Daily
    Bug
    on Nov 13, 2025
  2. melvin-bot commented on Nov 13, 2025

    @melvin-bot

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

    Expense - Download button on eReceipt opens not here page in another tab, crashes on Android

    What is the root cause of that problem?

    We are not checking if the receipt is eReceipt before showing download button here

    const shouldShowDownloadButton = useMemo(() => {
    const isValidContext = !isEmptyObject(report) || type === CONST.ATTACHMENT_TYPE.SEARCH;
    if (!isValidContext || isErrorInAttachment(source)) {
    return false;
    }
    return !!onDownloadAttachment && isDownloadButtonReadyToBeShown && !shouldShowNotFoundPage && !isOffline && !isLocalSource && isAttachmentLoaded?.(source);
    }, [isAttachmentLoaded, isDownloadButtonReadyToBeShown, isErrorInAttachment, isLocalSource, isOffline, onDownloadAttachment, report, shouldShowNotFoundPage, source, type]);

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

    We should check if the transaction is eReceipt before showing the download button

     const isEReceipt = transaction && !hasReceiptSource(transaction) && hasEReceipt(transaction);
    
        const shouldShowDownloadButton = useMemo(() => {
            const isValidContext = !isEmptyObject(report) || type === CONST.ATTACHMENT_TYPE.SEARCH;
            if (!isValidContext || isErrorInAttachment(source) || isEReceipt) {
                return false;
            }
    
            return !!onDownloadAttachment && isDownloadButtonReadyToBeShown && !shouldShowNotFoundPage && !isOffline && !isLocalSource && isAttachmentLoaded?.(source);
        }, [isAttachmentLoaded, isDownloadButtonReadyToBeShown, isErrorInAttachment, isLocalSource, isOffline, onDownloadAttachment, report, shouldShowNotFoundPage, source, type, isEReceipt]);
    
    

    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. added
    External
    on Nov 17, 2025
  5. melvin-bot commented on Nov 17, 2025

    @melvin-bot
  6. changed the title [-]Expense - Download button on eReceipt opens not here page in another tab, crashes on Android[/-] [+][$250] Expense - Download button on eReceipt opens not here page in another tab, crashes on Android[/+] on Nov 17, 2025
  7. added
    Help Wanted
    on Nov 17, 2025
  8. melvin-bot commented on Nov 17, 2025

    @melvin-bot

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

  9. rojiphil commented on Nov 20, 2025

    @rojiphil
    Contributor

    @etCoderDysto proposal LGTM i.e. returning shouldShowDownloadButton with false to prevent display of Download button when eReceipt exists for a transaction.
    🎀👀🎀 C+ reviewed

  10. 25 remaining items

  11. garrettmknight commented on Dec 19, 2025

    @garrettmknight
    Contributor

    Payment Summary

  12. changed the title [-][Due for payment 2025-12-11] [$250] Expense - Download button on eReceipt opens not here page in another tab, crashes on Android[/-] [+][Awaiting Checklist] [Due for payment 2025-12-11] [$250] Expense - Download button on eReceipt opens not here page in another tab, crashes on Android[/+] on Dec 19, 2025
  13. garrettmknight commented on Dec 19, 2025

    @garrettmknight
    Contributor

    @rojiphil please complete the checklist when you get a chance, thanks!

  14. rojiphil commented on Dec 19, 2025

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

    • [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: Not Required. The existing checklist is good enough to capture such issues.

    • [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.

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

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    1. Go to staging.new.expensify.com
    2. Go to Reports > Expenses.
    3. Open a card transaction that has eReceipt.
    4. Click on the eReceipt.
    5. Verify that you don't see download button

    Do we agree 👍 or 👎

  15. rojiphil commented on Dec 19, 2025

    @rojiphil
    Contributor

    please complete the checklist when you get a chance, thanks!

    @garrettmknight BZ Checklist done.

  16. melvin-bot commented on Dec 22, 2025

    @melvin-bot

    @garrettmknight Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  17. melvin-bot commented on Dec 24, 2025

    @melvin-bot

    @garrettmknight Huh... This is 4 days overdue. Who can take care of this?

  18. melvin-bot commented on Dec 27, 2025

    @melvin-bot

    @garrettmknight Still overdue 6 days?! Let's take care of this!

  19. quinthar commented on Jan 17, 2026

    @quinthar
    Contributor

    approved $250 to @rojiphil

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions