Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2025-01-13] [HOLD for payment 2025-01-07] [$250] Track Expense - Website crashes when submitting a track expense. #54605

Closed
3 of 8 tasks
IuliiaHerets opened this issue Dec 27, 2024 · 29 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Dec 27, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.79-0
Reproducible in staging?: Yes
Reproducible in production?: No
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 - Android 12 - Chrome / Windows 10 - Chrome
App Component: Chat Report View

Action Performed:

  1. Open the staging.new.expensify.com website.
  2. Open Self DM.
  3. Tap on "+" button and select "Create Expense"
  4. Complete the expense creation flow.

Expected Result:

After creating a track expense, the user should land on self DM again and the expense details should be visible on the chat.

Actual Result:

Website crashes after submitting a track expense.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6702794_1735282391342!log.txt

Bug6702794_1735281424305.Track_Crash.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021872615001903986307
  • Upwork Job ID: 1872615001903986307
  • Last Price Increase: 2024-12-27
  • Automatic offers:
    • brunovjk | Contributor | 105477339
    • nkdengineer | Contributor | 105477345
Issue OwnerCurrent Issue Owner: @slafortune
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Dec 27, 2024
Copy link

melvin-bot bot commented Dec 27, 2024

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

Copy link

melvin-bot bot commented Dec 27, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Dec 27, 2024
Copy link

melvin-bot bot commented Dec 27, 2024

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Dec 27, 2024
Copy link
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.

@nkdengineer
Copy link
Contributor

Proposal

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

Website crashes after submitting a track expense.

What is the root cause of that problem?

We removed the fallback here then the app crashes when the chatReportID is changed from an empty string to an exist ID.

const [chatReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${chatReportID}`);

chatReportID={ReportActionsUtils.getOriginalMessage(action)?.IOUReportID ? report?.chatReportID ?? '' : reportID}

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

Bring the fallback ID back

const [chatReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${chatReportID}`);

Or when we create the track expense we should set IOUReportID of the IOU action as 0 in optimistic data since BE also returns like this.

chatReportID={ReportActionsUtils.getOriginalMessage(action)?.IOUReportID ? report?.chatReportID ?? '' : reportID}

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

What alternative solutions did you explore? (Optional)

NA

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.

@nkuoch
Copy link
Contributor

nkuoch commented Dec 27, 2024

@brunovjk can you review this above proposal?

@brunovjk
Copy link
Contributor

Sure!

@brunovjk
Copy link
Contributor

@nkdengineer Your proposal makes sense to me. I’ve brought back the fallback ID using CONST.DEFAULT_NUMBER_ID here, and it resolves this specific issue.

However, in the original PR, we made changes in other locations to align with the new 'default-value-for-inexistent-ids' rule. I’m concerned these changes might have unintentionally impacted other flows, that I may not have considered, potentially leading to regressions like this one. Do you see other lines with useOnyx or related logic where we should reintroduce CONST.DEFAULT_NUMBER_ID in the MoneyRequestPreviewContent.tsx? Thank you

@nkdengineer
Copy link
Contributor

Do you see other lines with useOnyx or related logic where we should reintroduce CONST.DEFAULT_NUMBER_ID in the MoneyRequestPreviewContent.tsx? Thank you

Bring the fallback ID back

@brunovjk The crash app will happen for the collect onyx keys then when I mentioned Bring the fallback ID that mean we need to update this for all useOnyx that connects with collection keys in MoneyRequestPreviewContent.

@nkdengineer
Copy link
Contributor

chatReportID={ReportActionsUtils.getOriginalMessage(action)?.IOUReportID ? report?.chatReportID ?? '' : reportID}

Or we should fallback here to -1 instead of empty string.

@brunovjk
Copy link
Contributor

Great! Thanks @nkdengineer, I think we can go with their proposal.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 27, 2024

Current assignee @nkuoch is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@brunovjk
Copy link
Contributor

oops, I added 🎀 out of habit

@nkuoch nkuoch added the External Added to denote the issue can be worked on by a contributor label Dec 27, 2024
@melvin-bot melvin-bot bot changed the title Track Expense - Website crashes when submitting a track expense. [$250] Track Expense - Website crashes when submitting a track expense. Dec 27, 2024
Copy link

melvin-bot bot commented Dec 27, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021872615001903986307

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 27, 2024
Copy link

melvin-bot bot commented Dec 27, 2024

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

@jasperhuangg
Copy link
Contributor

Tests well! Thanks for the fix

@jasperhuangg jasperhuangg removed the DeployBlockerCash This issue or pull request should block deployment label Dec 27, 2024
@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Dec 31, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Dec 31, 2024
@melvin-bot melvin-bot bot changed the title [$250] Track Expense - Website crashes when submitting a track expense. [HOLD for payment 2025-01-07] [$250] Track Expense - Website crashes when submitting a track expense. Dec 31, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 31, 2024
Copy link

melvin-bot bot commented Dec 31, 2024

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

Copy link

melvin-bot bot commented Dec 31, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.79-5 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 2025-01-07. 🎊

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

Copy link

melvin-bot bot commented Dec 31, 2024

@brunovjk @slafortune @brunovjk 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]

@brunovjk
Copy link
Contributor

brunovjk commented Jan 6, 2025

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other: Applause Internal Team
  • [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: Feat: Add placeholder thumbnail to expenses with no receipt #52848 (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:

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

    I don't believe a dedicated regression test is necessary for this case. The fix has been applied, and any further issues should surface quickly in future testing cycles.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jan 6, 2025
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2025-01-07] [$250] Track Expense - Website crashes when submitting a track expense. [HOLD for payment 2025-01-13] [HOLD for payment 2025-01-07] [$250] Track Expense - Website crashes when submitting a track expense. Jan 6, 2025
Copy link

melvin-bot bot commented Jan 6, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.80-6 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 2025-01-13. 🎊

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

Copy link

melvin-bot bot commented Jan 6, 2025

@brunovjk @slafortune @brunovjk 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]

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 7, 2025
@garrettmknight garrettmknight moved this from Bugs and Follow Up Issues to Hold for Payment in [#whatsnext] #expense Jan 7, 2025
@melvin-bot melvin-bot bot added the Overdue label Jan 9, 2025
Copy link

melvin-bot bot commented Jan 10, 2025

@nkuoch, @slafortune, @brunovjk, @nkdengineer Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Jan 14, 2025

@nkuoch, @slafortune, @brunovjk, @nkdengineer Still overdue 6 days?! Let's take care of this!

@slafortune
Copy link
Contributor

All paid 👍

@github-project-automation github-project-automation bot moved this from Hold for Payment to Done in [#whatsnext] #expense Jan 14, 2025
@melvin-bot melvin-bot bot removed the Overdue label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
Status: Done
Development

No branches or pull requests

7 participants