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

[PAID] [$250] Expense report - App crashes after exporting expense report to CSV in OD #45457

Closed
4 of 6 tasks
izarutskaya opened this issue Jul 16, 2024 · 29 comments
Closed
4 of 6 tasks
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

@izarutskaya
Copy link

izarutskaya commented Jul 16, 2024

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.0.7.4
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4728021
Email or phone of affected tester (no customers): applausetester+0716pm1@applaus.expensifail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

Precondition: user is a member of a workspace

  1. Go to https://staging.new.expensify.com/
    and log in as a member
  2. Navigate to the workspace chat
  3. Submit an expense
  4. Log in as an admin in incognito
  5. Open the workspace chat
  6. Approve the submitted expense report and pay elsewhere
  7. Log into OD as a member
  8. Open the paid report
  9. Select Export to > Default CSV
  10. Navigate to ND as a member and admin

Expected Result:

The system message the report was exported to CSV is added to the expense report, user can continue interact with the app

Actual Result:

The app crashes when navigating to ND as an admin and a blank page is displayed for a member

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6543500_1721107283699.Recording__599.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c1c4c7f4d69f1ec4
  • Upwork Job ID: 1813147807396768155
  • Last Price Increase: 2024-07-16
Issue OwnerCurrent Issue Owner: @strepanier03
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Jul 16, 2024
Copy link

melvin-bot bot commented Jul 16, 2024

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

Copy link

melvin-bot bot commented Jul 16, 2024

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

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.

@izarutskaya
Copy link
Author

We think this issue might be related to the #collect project.

@izarutskaya
Copy link
Author

Production

bandicam.2024-07-16.11-19-33-167.mp4

@lakchote
Copy link
Contributor

Demoting from blocker as it's an edge case (exporting a CSV in OD then trying to access it in ND) and shouldn't block other PRs . Also making it external.

@lakchote lakchote added External Added to denote the issue can be worked on by a contributor Daily KSv2 Help Wanted Apply this label when an issue is open to proposals by contributors and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 DeployBlocker Indicates it should block deploying the API labels Jul 16, 2024
@melvin-bot melvin-bot bot changed the title Expense report - App crashes after exporting expense report to CSV in OD [$250] Expense report - App crashes after exporting expense report to CSV in OD Jul 16, 2024
Copy link

melvin-bot bot commented Jul 16, 2024

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

Copy link

melvin-bot bot commented Jul 16, 2024

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

@tienifr
Copy link
Contributor

tienifr commented Jul 16, 2024

Proposal

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

The app crashes when navigating to ND as an admin and a blank page is displayed for a member

What is the root cause of that problem?

In

const resolution = originalMessage && 'resolution' in originalMessage ? originalMessage?.resolution : null;
, we use in operator to search in originalMessage. However originalMessage could be a string and it throws error because in is only supported for objects.

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

Update

const resolution = originalMessage && 'resolution' in originalMessage ? originalMessage?.resolution : null;

to

const resolution = originalMessage && typeof originalMessage === 'object' && 'resolution' in originalMessage ? originalMessage?.resolution : null;

So we proceed only if originalMessage is an object

What alternative solutions did you explore? (Optional)

In

const resolution = originalMessage && 'resolution' in originalMessage ? originalMessage?.resolution : null;
, Replace 'resolution' in originalMessage by originalMessage?.resolution. ?. is safe and will work for any data type of originalMessage

@lakchote
Copy link
Contributor

@jayeshmangwani please review @tienifr's proposal when you can, thanks!

@jayeshmangwani
Copy link
Contributor

Sure, in the next 30 minutes.

@jayeshmangwani
Copy link
Contributor

@tienifr's Proposal of adding the check typeof originalMessage === 'object' looks good to me. I've tested it, and it worked well. We can go with the proposal.
Screenshot 2024-07-16 at 6 46 07 PM

🎀 👀 🎀 C+ reviewed

@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Jul 18, 2024
@melvin-bot melvin-bot bot changed the title [$250] Expense report - App crashes after exporting expense report to CSV in OD [HOLD for payment 2024-07-25] [$250] Expense report - App crashes after exporting expense report to CSV in OD Jul 18, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 18, 2024
Copy link

melvin-bot bot commented Jul 18, 2024

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

Copy link

melvin-bot bot commented Jul 18, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.8-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 2024-07-25. 🎊

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

  • @jayeshmangwani requires payment through NewDot Manual Requests
  • @tienifr requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented Jul 18, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@jayeshmangwani] The PR that introduced the bug has been identified. Link to the PR:
  • [@jayeshmangwani] 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:
  • [@jayeshmangwani] A discussion in #expensify-bugs 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:
  • [@jayeshmangwani] Determine if we should create a regression test for this bug.
  • [@jayeshmangwani] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@strepanier03] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jul 19, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-07-25] [$250] Expense report - App crashes after exporting expense report to CSV in OD [HOLD for payment 2024-07-26] [HOLD for payment 2024-07-25] [$250] Expense report - App crashes after exporting expense report to CSV in OD Jul 19, 2024
Copy link

melvin-bot bot commented Jul 19, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.9-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 2024-07-26. 🎊

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

  • @jayeshmangwani requires payment through NewDot Manual Requests
  • @tienifr requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented Jul 19, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@jayeshmangwani] The PR that introduced the bug has been identified. Link to the PR:
  • [@jayeshmangwani] 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:
  • [@jayeshmangwani] A discussion in #expensify-bugs 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:
  • [@jayeshmangwani] Determine if we should create a regression test for this bug.
  • [@jayeshmangwani] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@strepanier03] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@jayeshmangwani
Copy link
Contributor

I'm not sure about adding this regression test for this issue, as it is a niche case when changes from ND and OD occur together.

But I am proposing the following if we decide to create it:

Regression Test Proposal

  1. As workspace member, submit an expense to a workspace
  2. As workspace admin, approve and pay the above expense
  3. As workspace member, go to OD, open the paid report
  4. Select Export to > Default CSV
  5. Go to ND, open the workspace chat
  6. Verify the app neither crashes nor displays blank page for workspace admin and member
  7. Verify that, system message the report was exported to CSV is added to the expense report

Do we agree 👍 or 👎

Copy link

melvin-bot bot commented Jul 26, 2024

Payment Summary

Upwork Job

BugZero Checklist (@strepanier03)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1813147807396768155/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@melvin-bot melvin-bot bot added the Overdue label Jul 26, 2024
@strepanier03
Copy link
Contributor

Payment Summary

@JmillsExpensify - Payment requests (2) incoming.

@JmillsExpensify
Copy link

$250 approved for @tienifr

@jayeshmangwani
Copy link
Contributor

@strepanier03 Issue can be closed. I will request on ND

Copy link

melvin-bot bot commented Jul 30, 2024

@JmillsExpensify, @strepanier03, @lakchote, @jayeshmangwani, @tienifr Whoops! This issue is 2 days overdue. Let's get this updated quick!

@strepanier03
Copy link
Contributor

Thanks all, closing now.

@melvin-bot melvin-bot bot removed the Overdue label Jul 30, 2024
@strepanier03 strepanier03 changed the title [HOLD for payment 2024-07-26] [HOLD for payment 2024-07-25] [$250] Expense report - App crashes after exporting expense report to CSV in OD [PAID] [$250] Expense report - App crashes after exporting expense report to CSV in OD Jul 30, 2024
@jayeshmangwani
Copy link
Contributor

Requested as per #45457 (comment)

@JmillsExpensify
Copy link

$250 approved for @tienifr

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
None yet
Development

No branches or pull requests

6 participants