Skip to content

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

Closed

Description

@IuliiaHerets

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 23, 2024
  2. IuliiaHerets commented on Aug 23, 2024

    @IuliiaHerets
    Author

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

  3. added
    BugSomething is broken. Auto assigns a BugZero manager.
    and removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 23, 2024
  4. Nodebrute commented on Aug 23, 2024

    @Nodebrute
  5. github-actions commented on Aug 23, 2024

    @github-actions
    Contributor

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

  6. Nodebrute commented on Aug 23, 2024

    @Nodebrute
    Contributor

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

  7. Nodebrute commented on Aug 23, 2024

    @Nodebrute
    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;
        }
    
  8. daledah commented on Aug 24, 2024

    @daledah
    Contributor

    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)

  9. daledah commented on Aug 24, 2024

    @daledah
    Contributor
  10. added
    DeployBlockerCashThis issue or pull request should block deployment
    and removed on Aug 24, 2024
  11. melvin-bot commented on Aug 24, 2024

    @melvin-bot

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

  12. 49 remaining items

  13. joekaufmanexpensify commented on Sep 26, 2024

    @joekaufmanexpensify
  14. joekaufmanexpensify commented on Sep 26, 2024

    @joekaufmanexpensify
    Contributor

    Payment due here:

  15. joekaufmanexpensify commented on Sep 26, 2024

    @joekaufmanexpensify
    Contributor

    @daledah offer for $250 sent!

  16. 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[/+] on Sep 26, 2024
  17. dukenv0307 commented on Sep 27, 2024

    @dukenv0307
    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

  18. dukenv0307 commented on Sep 27, 2024

    @dukenv0307
    Contributor

    @Krishna2323 @yuwenmemon Do you agree with that ^?

  19. joekaufmanexpensify commented on Sep 27, 2024

    @joekaufmanexpensify
    Contributor

    Got it, sounds good. TY for confirming!

  20. joekaufmanexpensify commented on Sep 27, 2024

    @joekaufmanexpensify
    Contributor

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

  21. joekaufmanexpensify commented on Sep 27, 2024

    @joekaufmanexpensify
    Contributor

    All set to issue payment!

  22. joekaufmanexpensify commented on Sep 27, 2024

    @joekaufmanexpensify
    Contributor

    @daledah $250 sent and contract ended!

  23. joekaufmanexpensify commented on Sep 27, 2024

    @joekaufmanexpensify
    Contributor

    @dukenv0307 $250 sent and contract ended!

  24. joekaufmanexpensify commented on Sep 27, 2024

    @joekaufmanexpensify
    Contributor

    Upwork job closed.

  25. joekaufmanexpensify commented on Sep 27, 2024

    @joekaufmanexpensify
    Contributor

    All set, TY everyone!

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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions