Skip to content

[Awaiting C+ payment] [$1000] App crashes on login after opening split bill details page #23568

Closed

Description

@kavimuru

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. Open the app
  2. Click on plus and click on split bill
  3. Enter any amount and continue
  4. Select any 1 user and complete the split bill process
  5. In the user report, click on split bill message to open split bill details page
  6. Copy the URL, logout, paste the URL and login again, eg URL format: https://staging.new.expensify.com/r/5686244339424710/split/2464435729537161526
  7. Observe that app crashes

Expected Result:

App should not crash when we open split bill details page

Actual Result:

App crashes when we logout and login with split bill details page

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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.45-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
Notes/Photos/Videos: Any additional supporting documentation

crash.on.split.bill.URL.open.mp4
Recording.1336.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690262928105189

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0168304d5ea41d503d
  • Upwork Job ID: 1684650192147705856
  • Last Price Increase: 2023-07-27
  • Automatic offers:
    • dukenv0307 | Contributor | 25865336
    • dhanashree-sawant | Reporter | 25865338

Activity

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

    @melvin-bot

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

  3. melvin-bot commented on Jul 25, 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. dukenv0307 commented on Jul 25, 2023

    @dukenv0307
    Contributor

    Proposal

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

    App crashes on login after opening split bill details page

    What is the root cause of that problem?

    When we open split bill page by deep link, we use HOC withReportOrNotFound to display loading page if openApp API is calling

    But after this API is complete, props.reportActions still is empty because it must wait openReport API is complete. That makes reportAction is empty and the app crashes when we get participantAccountIDs from reportAction

    const reportAction = props.reportActions[`${props.route.params.reportActionID.toString()}`];
    const participantAccountIDs = reportAction.originalMessage.participantAccountIDs;
    const participants = OptionsListUtils.getParticipantsOptions(
    _.map(participantAccountIDs, (accountID) => ({accountID, selected: true})),
    props.personalDetails,

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

    We should display loading page until both report data and report action data are loaded completely

    1. Remove the HOC withReportOrNotFound, subscribe report and isLoadingReportData from Onyx

    2. We should add the check to return loading page before this line

    const isLoadingInitialReport = props.isLoadingReportData && _.isEmpty(props.report);
    const isLoadingInitialReportActions = _.isEmpty(props.reportActions) || (props.report.isLoadingReportActions && _.isEmpty(reportAction);
    const isExistReport = isLoadingInitialReport || (!_.isEmpty(props.report) && props.report.reportID);
    
    const shouldShowLoading = (isLoadingInitialReport || isLoadingInitialReportActions) && isExistReport;
    if (shouldShowLoading) {
        return <FullscreenLoadingIndicator />;
    }
    

    const participantAccountIDs = reportAction.originalMessage.participantAccountIDs;

    1. We also should bring the not found page before this line because with reportActionID is invalid or not found , App also crashes
    if (_.isEmpty(reportAction) || _.isEmpty(props.report)) {
        return (
            <FullPageNotFoundView shouldShow/>
        )
    }
    

    const participantAccountIDs = reportAction.originalMessage.participantAccountIDs;

    What alternative solutions did you explore? (Optional)

    NA

    Result

    Screencast-from-26-07-2023-01_38_16.mp4
  5. trjExpensify commented on Jul 27, 2023

    @trjExpensify
    Contributor

    👋 @dukenv0307 how related is this to this issue? CC: @aldo-expensify

  6. dukenv0307 commented on Jul 27, 2023

    @dukenv0307
    Contributor

    @trjExpensify This issue and #21268 are different issue because the root cause is different.

  7. aldo-expensify commented on Jul 27, 2023

    @aldo-expensify
    Contributor

    If the root cause @dukenv0307 explained here is correct, they do appear unrelated to me.

  8. trjExpensify commented on Jul 27, 2023

    @trjExpensify
    Contributor

    Cool, will move on external for now! :)

  9. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jul 27, 2023
  10. changed the title [-]App crashes on login after opening split bill details page[/-] [+][$1000] App crashes on login after opening split bill details page[/+] on Jul 27, 2023
  11. melvin-bot commented on Jul 27, 2023

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

    @melvin-bot

    Current assignee @trjExpensify is eligible for the External assigner, not assigning anyone new.

  14. 22 remaining items

  15. dukenv0307 commented on Aug 1, 2023

    @dukenv0307
    Contributor

    @mananjadhav Open the PR to see more detail.

  16. dukenv0307 commented on Aug 1, 2023

    @dukenv0307
    Contributor

    @mananjadhav Update: I updated HOC to resolve the problem above, please help to review the PR when you have a chance.

  17. melvin-bot commented on Aug 2, 2023

    @melvin-bot

    🎯 ⚡️ Woah @mananjadhav / @dukenv0307, great job pushing this forwards! ⚡️

    The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

    • when @dukenv0307 got assigned: 2023-07-31 20:53:43 Z
    • when the PR got merged: 2023-08-02 19:31:42 UTC

    On to the next one 🚀

  18. mananjadhav commented on Aug 13, 2023

    @mananjadhav
    Collaborator

    @trjExpensify This is ready for payout on 08/15 but the title wasn't updated.

    Also I couldn't pinpoint to a specific PR causing this. I think we should add a regression test for this one as it is was crashing the app and related to IOU. The test steps from the PR are good enough for the regression test.

    @Li357 wdyt?

  19. changed the title [-][$1000] App crashes on login after opening split bill details page[/-] [+][Awaiting Payment August 15th] [$1000] App crashes on login after opening split bill details page[/+] on Aug 14, 2023
  20. trjExpensify commented on Aug 14, 2023

    @trjExpensify
    Contributor

    Updated the title! :)

    I think we should add a regression test for this one as it is was crashing the app and related to IOU. The test steps from the PR are good enough for the regression test.

    Yeah cool, I'll ask Applause about what they think is best re: opening from deep links. We should do the same with request money as well.

  21. mananjadhav commented on Aug 14, 2023

    @mananjadhav
    Collaborator

    Makes sense.

  22. trjExpensify commented on Aug 15, 2023

    @trjExpensify
    Contributor

    Okay, confirming payments as follows:

  23. changed the title [-][Awaiting Payment August 15th] [$1000] App crashes on login after opening split bill details page[/-] [+][Awaiting C+ payment] [$1000] App crashes on login after opening split bill details page[/+] on Aug 15, 2023
  24. mananjadhav commented on Aug 15, 2023

    @mananjadhav
    Collaborator

    I’ve raised my request on NewDot.

  25. JmillsExpensify commented on Aug 15, 2023

    @JmillsExpensify
    Contributor

    Reviewed the details for @mananjadhav. Approved for payment in NewDot based on BZ summary above.

  26. trjExpensify commented on Aug 15, 2023

    @trjExpensify
    Contributor

    Dope, we're all set then. Closing!

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.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions