Skip to content

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

Closed

Description

@izarutskaya

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 23, 2023
  2. melvin-bot commented on Sep 23, 2023

    @melvin-bot

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

  3. melvin-bot commented on Sep 23, 2023

    @melvin-bot

    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
  4. akinwale commented on Sep 23, 2023

    @akinwale
    Contributor

    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.

  5. tjferriss commented on Sep 25, 2023

    @tjferriss
    Contributor

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

  6. akinwale commented on Sep 25, 2023

    @akinwale
    Contributor

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

    Screenshot 2023-09-25 at 04 44 29

  7. kbecciv commented on Sep 26, 2023

    @kbecciv

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

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

  8. 2 remaining items

  9. melvin-bot commented on Sep 27, 2023

    @melvin-bot
  10. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 27, 2023
  11. melvin-bot commented on Sep 27, 2023

    @melvin-bot

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

  12. 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[/+] on Sep 27, 2023
  13. melvin-bot commented on Sep 27, 2023

    @melvin-bot

    Upwork job price has been updated to $1000

  14. mountiny commented on Sep 27, 2023

    @mountiny
    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!

  15. situchan commented on Sep 27, 2023

    @situchan
    Contributor

    Not able to reproduce on latest main.

  16. akinwale commented on Sep 27, 2023

    @akinwale
    Contributor

    Looks like it was fixed with #28199.

  17. mountiny commented on Sep 27, 2023

    @mountiny
    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

  18. akinwale commented on Sep 27, 2023

    @akinwale
    Contributor

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

  19. mountiny commented on Sep 27, 2023

    @mountiny
    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

  20. akinwale commented on Sep 27, 2023

    @akinwale
    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.

  21. mountiny commented on Sep 27, 2023

    @mountiny
    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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions