Skip to content

[HOLD for payment 2024-07-22] [HOLD for payment 2024-07-17] [$125] [Search v1] Crash when opening search page #44396

Closed

Description

@m-natarajan

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:
Reproducible in staging?: Needs reproduction
Reproducible in production?: Needs reproduction
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: @roryabraham
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1719267975652129

Action Performed:

  1. Go to staging.new.expensify.com or open the app in iOS
  2. Tap/click search icon from the bottom menu

Expected Result:

Search page opens

Actual Result:

App crash on opening search page

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

Screenshot 2024-06-25 at 12 42 02 PM

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0102a0367add306853
  • Upwork Job ID: 1805638862559138604
  • Last Price Increase: 2024-06-25
  • Automatic offers:
    • abdulrahuman5196 | Reviewer | 102873501
    • neonbhai | Contributor | 102873504
Issue OwnerCurrent Issue Owner: @stephanieelliott / @kadiealexander
Issue OwnerCurrent Issue Owner: @stephanieelliott / @kadiealexander

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 25, 2024
  2. melvin-bot commented on Jun 25, 2024

    @melvin-bot

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

  3. MelvinBot commented on Jun 25, 2024

    @MelvinBot
    Contributor

    This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

  4. Kicu commented on Jun 25, 2024

    @Kicu
    Contributor

    @m-natarajan Please try cleaning your Onyx cache, rerun then app and tell us if this fixes the problem. This solution worked for my case.

    If yes then I believe this should not be a big problem, unfortunately we're still in development mode for the Search features so small bumps like this one might happen.

    CC @luacmartins for visibility

  5. neonbhai commented on Jun 25, 2024

    @neonbhai
    Contributor

    Proposal

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

    App Crash when opening search page

    What is the root cause of that problem?

    We are accessing shouldShowCategoryColumn without using optional chaining operator. This causes a crash sometimes if the network is slow and SearchResults object has not fully loaded.

    We should use optionalChaining when accessing this property:

    metadata?.columnsToShow?.shouldShowCategoryColumn, 

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

    We will use optionalChaining when acessing shouldShowCategoryColumn in these places:

    shouldShowCategory: metadata?.columnsToShow.shouldShowCategoryColumn,

    shouldShowCategory: metadata?.columnsToShow.shouldShowCategoryColumn,

    shouldShow: (data, metadata) => metadata?.columnsToShow.shouldShowCategoryColumn ?? false,

    Additionally

    We will optionalChaining when accessing shouldShowTagColumn and shouldShowTaxColumn here:

    shouldShowTag: metadata?.columnsToShow.shouldShowTagColumn,

    shouldShowTag: metadata?.columnsToShow.shouldShowTagColumn,

    shouldShow: (data, metadata) => metadata?.columnsToShow.shouldShowTagColumn ?? false,

    shouldShowTax: metadata?.columnsToShow.shouldShowTaxColumn,

    shouldShowTax: metadata?.columnsToShow.shouldShowTaxColumn,

    shouldShow: (data, metadata) => metadata?.columnsToShow.shouldShowTaxColumn ?? false,

  6. neonbhai commented on Jun 25, 2024

    @neonbhai
    Contributor

    If yes then I believe this should not be a big problem, unfortunately we're still in development mode for the Search features so small bumps like this one might happen.

    Agree, but I think we should add optional chaining as a sanity check for scenarios like these, so the app doesn't crash!

  7. self-assigned this
    on Jun 25, 2024
  8. changed the title [-]Crash when opening search page[/-] [+][Search v1] Crash when opening search page[/+] on Jun 25, 2024
  9. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 25, 2024
  10. changed the title [-][Search v1] Crash when opening search page[/-] [+][$250] [Search v1] Crash when opening search page[/+] on Jun 25, 2024
  11. 32 remaining items

  12. melvin-bot commented on Jul 10, 2024

    @melvin-bot

    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:

    • [@luacmartins] The PR that introduced the bug has been identified. Link to the PR:
    • [@luacmartins] 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:
    • [@luacmartins] 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:
    • [@neonbhai] Determine if we should create a regression test for this bug.
    • [@neonbhai] 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.
    • [@stephanieelliott / @kadiealexander] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  13. changed the title [-][HOLD for payment 2024-07-17] [$125] [Search v1] Crash when opening search page[/-] [+][HOLD for payment 2024-07-22] [HOLD for payment 2024-07-17] [$125] [Search v1] Crash when opening search page[/+] on Jul 15, 2024
  14. melvin-bot commented on Jul 15, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.6-8 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-22. 🎊

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

  15. melvin-bot commented on Jul 15, 2024

    @melvin-bot

    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:

    • [@luacmartins] The PR that introduced the bug has been identified. Link to the PR:
    • [@luacmartins] 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:
    • [@luacmartins] 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:
    • [@neonbhai] Determine if we should create a regression test for this bug.
    • [@neonbhai] 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.
    • [@stephanieelliott / @kadiealexander] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  16. removed their assignment
    on Jul 18, 2024
  17. melvin-bot commented on Jul 19, 2024

    @melvin-bot

    @luacmartins, @stephanieelliott, @neonbhai Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  18. stephanieelliott commented on Jul 22, 2024

    @stephanieelliott
    Contributor

    Summarizing payment on this issue:

    • Contributor: @neonbhai $125 PAID via Upwork
    • Contributor+: N/A [internal]

    Upwork job is here: https://www.upwork.com/jobs/~0102a0367add306853

  19. moved this from Release 2: Summer 2024 (Aug) to Done in [#whatsnext] #wave-collecton Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions