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

[$1000] iOS/mWeb - The app crashes when requesting money from someone with a chat history or no prior chat #28054

Closed
1 of 6 tasks
izarutskaya opened this issue Sep 23, 2023 · 17 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@izarutskaya
Copy link

izarutskaya commented Sep 23, 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!


Issue found when executing #27739

Action Performed:

Prerequisites: Must be performed on a small screen.

Scenario 1: Requesting money from a person with no prior chat history:

  1. Navigate to https://staging.new.expensify.com/
    or open the app
  2. Tap on the green plus button
  3. Select ''Request money''
  4. Enter any amount and tap ''Next''
  5. Search and select a person with no prior chat history

Scenario 2: Requesting money from a person with prior chat history

  1. Navigate to https://staging.new.expensify.com/
    or open the app
  2. Tap on the green plus button
  3. Select ''Request money''
  4. Enter any amount and tap ''Next''
  5. Search and select a person with prior chat history

Expected Result:

The user can request money from someone without problems.

Actual Result:

The app crashes regardless of whether you request money from someone with a previous chat history or no chat history.

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.73-0

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

Notes/Photos/Videos: Any additional supporting documentation

Bug6210996_mweb_-_with_no_chat_history.mp4
Bug6210996_mWeb_-_with_chat_history.mp4

utest-dl.s3.amazonaws.com_12102_26469_428866_6210996_bugAttachment_Bug6210996_logs_-mWeb-Request_money-_logs.txt_X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230923T070152Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Cre.txt
utest-dl.s3.amazonaws.com_12102_26469_428866_6210996_bugAttachment_Bug6210996_logs_iOS_app.txt_X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230923T070121Z&X-Amz-SignedHeaders=host&X-Amz-Expires=86400&X-Amz-Credential=AKIAJ2UIWMJ2OM.txt

Expensify/Expensify Issue URL:

Issue reported by: Applause-Internal Team

Slack conversation: @

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01336470a7c7cb2d2a
  • Upwork Job ID: 1706893852320518144
  • Last Price Increase: 2023-09-27
@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 23, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 23, 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

@akinwale
Copy link
Contributor

akinwale commented Sep 23, 2023

Proposal

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

The app crashes when trying to request money from someone with or without a chat history.

What is the root cause of that problem?

The withOnyx definition in the MoneyRequestConfirmPage component used for obtaining the policy key tries to get the policyID of a workspace from a report, even if the report is null.

withOnyx({
policy: {
key: ({report}) => `${ONYXKEYS.COLLECTION.POLICY}${report.policyID}`,
},
}),

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

Change the withOnyx definition so that it returns an empty string if report is null using lodashGet to retrieve the object property.

withOnyx({
    policy: {
        key: ({report}) => {
           const policyID = lodashGet(report, 'policyID', ''); 
           return `${ONYXKEYS.COLLECTION.POLICY}${policyID}`;
        },
    },
}),

What alternative solutions did you explore? (Optional)

None.

@tjferriss tjferriss added Needs Reproduction Reproducible steps needed and removed Needs Reproduction Reproducible steps needed labels Sep 25, 2023
@tjferriss
Copy link
Contributor

I'm not able to reproduce. I'm able to request money from both someone with or without chat history on iOS.

@tjferriss tjferriss added the Needs Reproduction Reproducible steps needed label Sep 25, 2023
@akinwale
Copy link
Contributor

akinwale commented Sep 25, 2023

@tjferriss This is easily reproducible in iOS Safari and native on the latest main branch.

Screenshot 2023-09-25 at 04 44 29

@kbecciv
Copy link

kbecciv commented Sep 26, 2023

Issue have been reproduced with one of the Contributor, reopening for review.

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695716172410089

@kbecciv kbecciv reopened this Sep 26, 2023
@mountiny mountiny added External Added to denote the issue can be worked on by a contributor and removed Needs Reproduction Reproducible steps needed labels Sep 27, 2023
@melvin-bot melvin-bot bot changed the title iOS/mWeb - The app crashes when requesting money from someone with a chat history or no prior chat [$500] iOS/mWeb - The app crashes when requesting money from someone with a chat history or no prior chat Sep 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 27, 2023

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

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

melvin-bot bot commented Sep 27, 2023

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

@mountiny mountiny changed the title [$500] iOS/mWeb - The app crashes when requesting money from someone with a chat history or no prior chat [$1000] iOS/mWeb - The app crashes when requesting money from someone with a chat history or no prior chat Sep 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 27, 2023

Upwork job price has been updated to $1000

@mountiny
Copy link
Contributor

This should have been a deploy blocker and more attention given to testing as now this crash is in production.

@burczu Can you please treat this one with priority and pick proposals/ review quickly. THanks!

@situchan
Copy link
Contributor

Not able to reproduce on latest main.

@akinwale
Copy link
Contributor

Looks like it was fixed with #28199.

@mountiny
Copy link
Contributor

Alright, I cannot repro in staging anymore even though the PR you have linked is not in staging yet, havent tested with no prior chat history account

@akinwale
Copy link
Contributor

@mountiny It still happens on staging if there's no prior chat history.

@mountiny
Copy link
Contributor

is it happening in production too? if yes we can probably close as its fixed in main and it will be fixed with a deploy

@akinwale
Copy link
Contributor

is it happening in production too? if yes we can probably close as its fixed in main and it will be fixed with a deploy

Yes, it is.

@mountiny
Copy link
Contributor

In that case I will close this issue. Thanks for help @akinwale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

7 participants