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

[$500] Split bill - App crashes when clicking on bill split preview when it is loading as participant #30028

Closed
6 tasks done
lanitochka17 opened this issue Oct 19, 2023 · 9 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 19, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.3.87-1

Reproducible in staging?: Yes

Reproducible in production?: Yes

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: Applause - Internal Team

Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. [User A] Go to a group chat with User B and C
  3. {User B] Open the group chat
  4. [User A] Create a split bill
  5. [User B] While the bill split preview is loading, click on it

Expected Result:

App does not crash

Actual Result:

App crashes

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

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Bug6243557_1697748443712.bandicam_2023-10-20_04-40-49-917.mp4
Bug6243557_1697748443712.bandicam_2023-10-20_04-40-49-917.mp4
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fd21f2658e39844e
  • Upwork Job ID: 1715109151896576000
  • Last Price Increase: 2023-10-19
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 19, 2023
@melvin-bot melvin-bot bot changed the title Split bill - App crashes when clicking on bill split preview when it is loading as participant [$500] Split bill - App crashes when clicking on bill split preview when it is loading as participant Oct 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01fd21f2658e39844e

@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 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

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

melvin-bot bot commented Oct 19, 2023

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

@shahzoab
Copy link

Proposal

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

Split bill preview crashes when it's in a loading state and the user clicks on it.

What is the root cause of that problem?

The data is not fully loaded like props.transaction and the user clicks on it which causes it to crash.

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

We need to disable it in the loading state so that the user is unable to click it until it finishes loading.

<PressableWithFeedback
onPress={props.onPreviewPressed}
onPressIn={() => DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()}
onPressOut={() => ControlSelection.unblock()}
onLongPress={showContextMenu}
accessibilityLabel={props.isBillSplit ? props.translate('iou.split') : props.translate('iou.cash')}
accessibilityHint={CurrencyUtils.convertToDisplayString(requestAmount, requestCurrency)}
style={[styles.moneyRequestPreviewBox, ...props.containerStyles]}
>
{childContainer}
</PressableWithFeedback>

What alternative solutions did you explore? (Optional)

N/A

@youssef-lr youssef-lr self-assigned this Oct 20, 2023
@youssef-lr youssef-lr added Internal Requires API changes or must be handled by Expensify staff and removed 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 labels Oct 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 20, 2023

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

@akamefi202
Copy link
Contributor

Proposal

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

App crashes when clicking on bill split preview when it is loading as participant.

What is the root cause of that problem?

{_.isEmpty(props.transaction) &&
!ReportActionsUtils.isMessageDeleted(props.action) &&
lodashGet(props.action, 'pendingAction') !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? (
<MoneyRequestSkeletonView />

The user sees skeleton preview because props.transaction is not loaded and empty yet.
If the user clicks skeleton preview, the app loads SplitBillDetailsPage page.

transaction: transactionPropTypes.isRequired,

But transaction is required prop in SplitBillDetailsPage page.
And this causes error because transaction is still empty.

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

The app should not able to load SplitBillDetailsPage page by clicking, until props.transaction is ready.

if (!props.onPreviewPressed || _.isEmpty(props.transaction)) {
    return childContainer;
}

We can disable loading by returning skeleton view without PressableWithFeedback wrapper.

What alternative solutions did you explore? (Optional)

N/A

@youssef-lr
Copy link
Contributor

Sorry folks this is gonna require a backend change to send the transaction through a pusher update. I'll work on this next week.

@youssef-lr
Copy link
Contributor

Actually, looks like this is a duplicate of #27200, so I'll be closing this one.

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 Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

6 participants