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 2024-01-31] [$500] Android - IOU-App crashes on request money with new user on deleting request. #33800

Closed
1 of 6 tasks
izarutskaya opened this issue Dec 30, 2023 · 25 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 External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Dec 30, 2023

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: 1.4.20-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation: @

Action Performed:

  1. Launch app
  2. Tap fab---request money---manual
  3. Enter an amount
  4. Tap next
  5. Select a new user
  6. Tap request
  7. Tap on IOU created to open IOU details page
  8. Tap 3 dots on top right and note header is greyed out
  9. Tap delete request and confirm delete

Expected Result:

App must not crash on request money with new user on deleting request.

Actual Result:

App crashes on request money with new user on deleting request.

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

Bug6328968_1703921841380.crash.mp4

log crash.txt

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017ebef5d4acfc8b7d
  • Upwork Job ID: 1741172356572065792
  • Last Price Increase: 2023-12-30
  • Automatic offers:
    • aimane-chnaif | Reviewer | 28101997
    • abzokhattab | Contributor | 28101998
@izarutskaya izarutskaya added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 30, 2023
Copy link

melvin-bot bot commented Dec 30, 2023

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

@melvin-bot melvin-bot bot changed the title Android - IOU-App crashes on request money with new user on deleting request. [$500] Android - IOU-App crashes on request money with new user on deleting request. Dec 30, 2023
Copy link

melvin-bot bot commented Dec 30, 2023

Triggered auto assignment to @sakluger (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

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

melvin-bot bot commented Dec 30, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Dec 30, 2023

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

Copy link

melvin-bot bot commented Dec 30, 2023

📣 @rashidkarim11! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@abzokhattab
Copy link
Contributor

abzokhattab commented Dec 30, 2023

Proposal

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

App crashes on request money with new user on deleting request.

What is the root cause of that problem?

the parentReportActions object below is undefined when deleting a request for new users:

}),
withOnyx({
transaction: {
key: ({report, parentReportActions}) => {
const parentReportAction = parentReportActions[report.parentReportActionID];
const transactionID = lodashGet(parentReportAction, ['originalMessage', 'IOUTransactionID'], 0);
return `${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`;
},
},

Here is the error log:

Screenshot 2023-12-30 at 11 54 22 PM

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

Inside the transaction object, we need to add a default value for the parentReportActions to prevent accessing an undefined value

key: ({report, parentReportActions}) => {

to

            key: ({report, parentReportActions = {}}) => {

OR alternativly we can use lodashGet to safely access the parentReportActions object same as we do in the MoneyRequestHeader:

withOnyx({
transaction: {
key: ({report, parentReportActions}) => {
const parentReportAction = lodashGet(parentReportActions, [report.parentReportActionID]);
return `${ONYXKEYS.COLLECTION.TRANSACTION}${lodashGet(parentReportAction, 'originalMessage.IOUTransactionID', 0)}`;
},
},
}),

POC

Screen.Recording.2023-12-31.at.12.13.53.AM.mov

@rashidkarim11
Copy link

Contributor details
Your Expensify account email: rashidkarim35.76@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~0150aa8a8cbde87533

Copy link

melvin-bot bot commented Dec 30, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@melvin-bot melvin-bot bot added the Overdue label Jan 1, 2024
@sakluger
Copy link
Contributor

sakluger commented Jan 2, 2024

This looks like a duplicate of #33295 so I am going to close in favor of that one. The only difference is the platform, but the behavior is exactly the same.

@abzokhattab if you think your proposal will solve the other issue, could you please repost your proposal on #33295? Thanks!

@sakluger sakluger closed this as completed Jan 2, 2024
@melvin-bot melvin-bot bot removed the Overdue label Jan 2, 2024
@abzokhattab
Copy link
Contributor

@sakluger I am not able to reproduce the other issue

#33295 (comment)

lets see if it's fixed we can open this one again ..

but the behavior is exactly the same.

not really .. the attached video there shows "hmm it's not here" page not a compiler error as it's currently happening in android

@abzokhattab
Copy link
Contributor

abzokhattab commented Jan 4, 2024

@sakluger @aimane-chnaif Hey again, the other issue is not reproducible anymore and got closed ...

#33295 (comment)

however the current issue is still reproducible

again i believe the two issues are different, here we have a compiler error in anrdroid not hmm its not here which is a different error

@abzokhattab
Copy link
Contributor

@sakluger @aimane-chnaif @izarutskaya

Just a reminder, the other issue is closed and still, this one is reproducible on the latest build (v1.4.22-3):

Screen.Recording.2024-01-08.at.5.17.45.PM.mov

@aimane-chnaif
Copy link
Contributor

aimane-chnaif commented Jan 8, 2024

@sakluger let's re-open

@abzokhattab
Copy link
Contributor

abzokhattab commented Jan 15, 2024

@sakluger kindly reminder!

cc. @mountiny

@mountiny mountiny reopened this Jan 15, 2024
@aimane-chnaif
Copy link
Contributor

aimane-chnaif commented Jan 15, 2024

@abzokhattab I have one more case of crash (check video for repro step). Happening on ReportScreen.
Let's fix this as well. Solution is same as in MoneyRequestView.

Proposal: #33800 (comment)

Screenshot 2024-01-15 at 3 32 37 PM
Screen.Recording.2024-01-15.at.3.31.12.PM.mov

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Jan 15, 2024

Triggered auto assignment to @cristipaval, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 15, 2024
Copy link

melvin-bot bot commented Jan 15, 2024

📣 @aimane-chnaif 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Jan 15, 2024

📣 @abzokhattab 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@cristipaval
Copy link
Contributor

Thanks @aimane-chnaif for flagging the other crash as well!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jan 17, 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 Jan 24, 2024
@melvin-bot melvin-bot bot changed the title [$500] Android - IOU-App crashes on request money with new user on deleting request. [HOLD for payment 2024-01-31] [$500] Android - IOU-App crashes on request money with new user on deleting request. Jan 24, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 24, 2024
Copy link

melvin-bot bot commented Jan 24, 2024

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

Copy link

melvin-bot bot commented Jan 24, 2024

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

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

Copy link

melvin-bot bot commented Jan 24, 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:

  • [@aimane-chnaif] The PR that introduced the bug has been identified. Link to the PR:
  • [@aimane-chnaif] 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:
  • [@aimane-chnaif] 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:
  • [@aimane-chnaif] Determine if we should create a regression test for this bug.
  • [@aimane-chnaif] 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.
  • [@sakluger] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 30, 2024
@sakluger
Copy link
Contributor

Hey @aimane-chnaif, can you please complete the BZ checklist so I can close the issue out after payment tomorrow? Thanks!

@aimane-chnaif
Copy link
Contributor

@sakluger
Copy link
Contributor

All paid out, thanks everyone!

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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants