Skip to content

[HOLD for payment 2023-10-13] [$500] Dev: Search - Going to search page crashes the app #28864

Closed

Description

@kbecciv

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to search page

Expected Result:

App should not crash

Actual Result:

App crashes when opening search page

Workaround:

Unknown

Platforms:

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

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

Version Number: Dev 1.3.77-5
Reproducible in staging?: n/a
Reproducible in production?: n/a
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

video_2023-10-05_01-58-05.mp4

simulator_screenshot_D69B1961-45EF-45A2-9D22-11131DED299C

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-10-05.at.01.51.49.mp4
Screen.Recording.2023-10-05.at.01.49.43.mov

Expensify/Expensify Issue URL:
Issue reported by: @alitoshmatov
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696451187529939

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0142683ca91cfb31ee
  • Upwork Job ID: 1709680383220293632
  • Last Price Increase: 2023-10-04

Activity

  1. added
    External
    on Oct 4, 2023
  2. changed the title [-]Dev: Search - Going to search page crashes the app[/-] [+][$500] Dev: Search - Going to search page crashes the app[/+] on Oct 4, 2023
  3. melvin-bot commented on Oct 4, 2023

    @melvin-bot
  4. added
    Help Wanted
    on Oct 4, 2023
  5. melvin-bot commented on Oct 4, 2023

    @melvin-bot

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

  6. kbecciv commented on Oct 4, 2023

    @kbecciv
    Author

    Proposal by: @alitoshmatov
    Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696451187529939

    Proposal

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

    App crashes in search page

    What is the root cause of that problem?

    The crash is happening because in reportAction.originalMessage.paymentType reportAction is sometimes empty and accessing its properties throwing an error

    _.contains([CONST.IOU.PAYMENT_TYPE.VBBA, CONST.IOU.PAYMENT_TYPE.EXPENSIFY], reportAction.originalMessage.paymentType) ||

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

    Considering the function description reportAction has a default value of empty object suggesting that it might be empty object and this is not a required argument we should add conditions to prevent this error

    function getReportPreviewMessage(report, reportAction = {}, shouldConsiderReceiptBeingScanned = false) {

    We can add conditions preventing the access of its properties if reportAction is empty object, like:

    reportAction&&reportAction.originalMessage&&(
                _.contains([CONST.IOU.PAYMENT_TYPE.VBBA, CONST.IOU.PAYMENT_TYPE.EXPENSIFY], reportAction.originalMessage.paymentType) ||
                reportActionMessage.match(/ (with Expensify|using Expensify)$/))

    Or we can use lodash like this:

    lodashGet(reportAction,["originalMessage",'paymentType']))

    What alternative solutions did you explore? (Optional)

  7. ZhenjaHorbach commented on Oct 4, 2023

    @ZhenjaHorbach
    Contributor

    Can't reproduce on the last main

  8. self-assigned this
    on Oct 4, 2023
  9. added
    Internal
    and removed
    External
    Help Wanted
    on Oct 4, 2023
  10. melvin-bot commented on Oct 4, 2023

    @melvin-bot

    Current assignee @rushatgabhane is eligible for the Internal assigner, not assigning anyone new.

  11. mountiny commented on Oct 4, 2023

    @mountiny
    Contributor

    I ran into this locally earlier today and made branch with a fix

  12. 2 remaining items

  13. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on Oct 4, 2023
  14. changed the title [-][$500] Dev: Search - Going to search page crashes the app[/-] [+][HOLD for payment 2023-10-13] [$500] Dev: Search - Going to search page crashes the app[/+] on Oct 6, 2023
  15. melvin-bot commented on Oct 6, 2023

    @melvin-bot

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

  16. removed
    Reviewing
    on Oct 6, 2023
  17. melvin-bot commented on Oct 6, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.78-4 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 2023-10-13. 🎊

    After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

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

    As a reminder, here are the bonuses/penalties that should be applied for any External issue:

    • Merged PR within 3 business days of assignment - 50% bonus
    • Merged PR more than 9 business days after assignment - 50% penalty
  18. added
    Daily
    and removed
    Weekly
    on Oct 12, 2023
  19. melvin-bot commented on Oct 17, 2023

    @melvin-bot

    @rushatgabhane, @mountiny Eep! 4 days overdue now. Issues have feelings too...

  20. mountiny commented on Oct 17, 2023

    @mountiny
    Contributor

    no payments needed here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentDailyInternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions