Skip to content

[Due for payment 2026-04-14] Expense - Odometer photo is closed immediately after clicking rotate #86355

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: v9.3.44-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: #85105
Email or phone of affected tester (no customers): applausetester+piyoh@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Windows 11 / Chrome
App Component: Money Requests

Action Performed:

Preconditions: Logged in to expensifail account

Steps:

  1. Click FAB and choose "Track distance"
  2. Navigate to Odometer tab, fill the start reading, end reading, and add a photo to the end reading
  3. Click next to the confirmation page
    4.Click "distance" field
  4. Click the photo that just uploaded on the end reading
  5. Click "rotate"
    7, Open the odometer end photo again
  6. Click "rotate"

Expected Result:

in step 6, odometer end photo should stay still after clicking rotate without closed immediately, just like clicking rotate in step 8.

Actual Result:

in step 6, Odometer end photo is closed immediately after clicking rotate for the first time

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Video.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @jakubkalinski0

Activity

  1. Julesssss commented on Mar 25, 2026

    @Julesssss
    Contributor

    Not a blocker, but we'll get this resolved.

  2. jakubkalinski0 commented on Mar 25, 2026

    @jakubkalinski0
    Member

    I believe I already know why is that happening. Current version on main doesn't yet have the backup transaction implemented. That's basically what's blocking us from safely editing values/images in "Distance" from confirmation screen. When we rotate a photo we basically create a completely new image which gets new blob URL. When we change the single photo we call setMoneyRequestOdometerImage in TransactionReceiptModalContent, which not only saves the new image to ONYX but also takes care of cleaning stale blob URLs and immediately calls revokeOdometerImageUri. When that happens this useEffect in IOURequestStepConfirmation re-runs and verifies that the receipt isn't actually properly working (it's checking on the old receipt as the new Odometer Image wasn't yet set as a new receipt). When it detects the corrupted receipt it calls navigateToStartMoneyRequestStep and this way we land on Odometer tab once again.

    // When the component mounts, if there is a receipt, see if the image can be read from the disk. If not, redirect the user to the starting step of the flow.
    // This is because until the request is saved, the receipt file is only stored in the browsers memory as a blob:// and if the browser is refreshed, then
    // the image ceases to exist. The best way for the user to recover from this is to start over from the start of the request process.
    // skip this in case user is moving the transaction as the receipt path will be valid in that case
    useEffect(() => {
    let newReceiptFiles: Record<string, Receipt> = {};
    let isScanFilesCanBeRead = true;
    Promise.all(
    transactions.map((item) => {
    const itemReceiptFilename = item.receipt?.filename;
    const itemReceiptPath = item.receipt?.source;
    const itemReceiptType = item.receipt?.type;
    const isLocalFile = isLocalFileFileUtils(itemReceiptPath);
    if (!isLocalFile) {
    if (item.receipt) {
    newReceiptFiles = {...newReceiptFiles, [item.transactionID]: item.receipt};
    }
    return Promise.resolve();
    }
    const onSuccess = (file: File) => {
    const receipt: Receipt = file;
    if (item?.receipt?.isTestReceipt) {
    receipt.isTestReceipt = true;
    receipt.state = CONST.IOU.RECEIPT_STATE.SCAN_COMPLETE;
    } else if (item?.receipt?.isTestDriveReceipt) {
    receipt.isTestDriveReceipt = true;
    receipt.state = CONST.IOU.RECEIPT_STATE.SCAN_COMPLETE;
    } else {
    receipt.state = file && requestType === CONST.IOU.REQUEST_TYPE.MANUAL ? CONST.IOU.RECEIPT_STATE.OPEN : CONST.IOU.RECEIPT_STATE.SCAN_READY;
    }
    newReceiptFiles = {...newReceiptFiles, [item.transactionID]: receipt};
    };
    const onFailure = () => {
    isScanFilesCanBeRead = false;
    if (initialTransactionID === item.transactionID) {
    setMoneyRequestReceipt(item.transactionID, '', '', true, '');
    }
    };
    return validateReceiptFile(itemReceiptFilename, itemReceiptPath, itemReceiptType, onSuccess, onFailure) ?? Promise.resolve();
    }),
    ).then(() => {
    if (isScanFilesCanBeRead) {
    setReceiptFiles(newReceiptFiles);
    return;
    }
    if (requestType === CONST.IOU.REQUEST_TYPE.MANUAL) {
    Navigation.navigate(ROUTES.MONEY_REQUEST_STEP_SCAN.getRoute(CONST.IOU.ACTION.CREATE, iouType, initialTransactionID, reportID, Navigation.getActiveRouteWithoutParams()));
    return;
    }
    removeDraftTransactionsByIDs(draftTransactionIDs, true);
    navigateToStartMoneyRequestStep(requestType, iouType, initialTransactionID, reportID);
    });
    }, [requestType, iouType, initialTransactionID, reportID, action, report, transactions, participants]);

  3. jakubkalinski0 commented on Mar 25, 2026

    @jakubkalinski0
    Member

    TLDR this will be resolved here -> [Odometer] Add backup transaction for purpose of editing from confirmation. We can tag this issue under the PR and add it as a test case but besides that I don't think a separate fix is needed here

    @Julesssss Should I link it in the PR description and add test steps?

  4. DylanDylann commented on Mar 26, 2026

    @DylanDylann
    Contributor

    @Julesssss Should I link it in the PR description and add test steps?

    Let's do it

  5. Julesssss commented on Mar 26, 2026

    @Julesssss
    Contributor

    Should I link it in the PR description and add test steps?

    Yeah, thanks for doing that.

  6. added
    ReviewingHas a PR in review
    and removed on Apr 2, 2026
  7. 1 remaining item

  8. DylanDylann commented on Apr 3, 2026

    @DylanDylann
    Contributor

    @Julesssss Could you close this issue?

  9. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Apr 7, 2026
  10. changed the title [-]Expense - Odometer photo is closed immediately after clicking rotate[/-] [+][Due for payment 2026-04-14] Expense - Odometer photo is closed immediately after clicking rotate[/+] on Apr 7, 2026
  11. melvin-bot commented on Apr 7, 2026

    @melvin-bot

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

  12. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.52-9 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-04-14. 🎊

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

  13. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

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

Metadata

Metadata

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions