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

[hold for payment 2024-09-26] [$250] iOS - Expense - App crash when clicking on the link settings/workspaces/:policyID/accounting/quic #47946

Closed
1 of 6 tasks
IuliiaHerets opened this issue Aug 23, 2024 · 39 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Aug 23, 2024

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: 9.0.24-1
Reproducible in staging?: Y
Reproducible in production?: Y
Issue was found when executing this PR: #47696
Email or phone of affected tester (no customers): applausetester+23084alsn@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to www.staging.chat.expensify.com
  2. Workspace is connected to QBO
  3. Go settings/workspaces/:policyID/accounting/quickbooks-online/export/out-of-pocket-expense/account-select

Expected Result:

Verify list empty content is shown if no account is connected

Actual Result:

App crash when clicking on the link: settings/workspaces/:policyID/accounting/quickbooks-online/export/out-of-pocket-expense/account-select

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

2308_1.txt

View all open jobs on GitHub

Bug6580681_1724443956062.7de1c__1_.mp4
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0102861cb1eeae8b58
  • Upwork Job ID: 1828133199515812262
  • Last Price Increase: 2024-08-26
  • Automatic offers:
    • dukenv0307 | Contributor | 103743156
Issue OwnerCurrent Issue Owner: @brunovjk
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 23, 2024
@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Aug 23, 2024
@Nodebrute

This comment was marked as duplicate.

Copy link
Contributor

user Your proposal will be dismissed because you did not follow the proposal template.

@Nodebrute
Copy link
Contributor

@IuliiaHerets Could you please re-add the labels? no one is assigned here

@Nodebrute
Copy link
Contributor

Proposal

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

Expense - App crash when clicking on the link

What is the root cause of that problem?

This error is not related to the QuickBooks integration. The crash is occurring due to an existing iOS bug where setIsInputInitialized(true) is being called in a loop, resulting in the 'Maximum update depth exceeded' error.

setIsInputInitialized(true);

The issue is caused by an infinite loop triggered by`setIsInputInitialized(true)

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

To address the issue of redundant state updates and potential infinite loops in the useAutoFocusInput hook,
here we should early return if inputRef.current is already set (i.e., the TextInput reference has already been assigned). We can do something like this.

if (inputRef.current) {
    return;
}

We can remove this as it's not working as expected

What alternative solutions did you explore? (Optional)

We can also keep the current logic

    if (inputRef.current || isInputInitialized) {
        return;
    }

@daledah
Copy link
Contributor

daledah commented Aug 24, 2024

Proposal

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

App crash when clicking on the link: settings/workspaces/:policyID/accounting/quickbooks-online/export/out-of-pocket-expense/account-select

What is the root cause of that problem?

  • In this bug, we try to access to the policy which does not exist, so the policy data will be undefined.

  • In withPolicy function, we pass policy prop as undefined in this case.

  • So in PolicyAccountingPage, if we try to access props.policy.id, app will be crashed, such as:

    const [connectionSyncProgress] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CONNECTION_SYNC_PROGRESS}${policy.id}`);

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

                {...props}
                policy={props.policy ?? {}}
  • Optional:
  1. Update
    if (policyID.length > 0) {
        if (policyID.length > 0 && props.policy) {

What alternative solutions did you explore? (Optional)

@daledah
Copy link
Contributor

daledah commented Aug 24, 2024

Proposal updated

@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment and removed Daily KSv2 labels Aug 24, 2024
Copy link

melvin-bot bot commented Aug 24, 2024

Triggered auto assignment to @deetergp (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@IuliiaHerets IuliiaHerets added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment labels Aug 24, 2024
Copy link

melvin-bot bot commented Aug 26, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@deetergp deetergp added External Added to denote the issue can be worked on by a contributor and removed Hourly KSv2 labels Aug 26, 2024
@melvin-bot melvin-bot bot changed the title iOS - Expense - App crash when clicking on the link settings/workspaces/:policyID/accounting/quic [$250] iOS - Expense - App crash when clicking on the link settings/workspaces/:policyID/accounting/quic Aug 26, 2024
Copy link

melvin-bot bot commented Aug 26, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0102861cb1eeae8b58

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 26, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Overdue labels Sep 2, 2024
@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Sep 25, 2024
Copy link

melvin-bot bot commented Sep 25, 2024

This issue has not been updated in over 15 days. @deetergp, @youssef-lr, @dukenv0307, @daledah eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@deetergp
Copy link
Contributor

I think the automation broke on this one. The PR has been reviewed, merged, and is currently out on production.

@deetergp deetergp added Weekly KSv2 and removed Monthly KSv2 labels Sep 26, 2024
@mallenexpensify mallenexpensify added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Sep 26, 2024
Copy link

melvin-bot bot commented Sep 26, 2024

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 26, 2024
@joekaufmanexpensify
Copy link
Contributor

Yep, this is due for payment now.

@joekaufmanexpensify

This comment was marked as outdated.

@joekaufmanexpensify
Copy link
Contributor

joekaufmanexpensify commented Sep 26, 2024

Payment due here:

@joekaufmanexpensify
Copy link
Contributor

@daledah offer for $250 sent!

@joekaufmanexpensify joekaufmanexpensify changed the title [$250] iOS - Expense - App crash when clicking on the link settings/workspaces/:policyID/accounting/quic [hold for payment 2024-09-26] [$250] iOS - Expense - App crash when clicking on the link settings/workspaces/:policyID/accounting/quic Sep 26, 2024
@joekaufmanexpensify joekaufmanexpensify added the Awaiting Payment Auto-added when associated PR is deployed to production label Sep 26, 2024
@dukenv0307
Copy link
Contributor

@joekaufmanexpensify No it's not related to #47696. The QA just saw this bug when they executed the PR

In withPolicy function, we pass policy prop as undefined in this case.

This problem even happened before #47696

@dukenv0307
Copy link
Contributor

@Krishna2323 @yuwenmemon Do you agree with that ^?

@joekaufmanexpensify
Copy link
Contributor

Got it, sounds good. TY for confirming!

@joekaufmanexpensify
Copy link
Contributor

I updated the payment summary to reflect that you're due payment too.

@joekaufmanexpensify
Copy link
Contributor

All set to issue payment!

@joekaufmanexpensify
Copy link
Contributor

@daledah $250 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

@dukenv0307 $250 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

Upwork job closed.

@joekaufmanexpensify
Copy link
Contributor

All set, TY everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

9 participants