You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[hold for payment 2024-09-26] [$250] iOS - Expense - App crash when clicking on the link settings/workspaces/:policyID/accounting/quic #47946
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
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.
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;
}
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
Activity
IuliiaHerets commentedon Aug 23, 2024
We think that this bug might be related to #wave-collect - Release 1
Nodebrute commentedon Aug 23, 2024
github-actions commentedon Aug 23, 2024
user Your proposal will be dismissed because you did not follow the proposal template.
Nodebrute commentedon Aug 23, 2024
@IuliiaHerets Could you please re-add the labels? no one is assigned here
Nodebrute commentedon Aug 23, 2024
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.App/src/hooks/useAutoFocusInput.ts
Line 57 in f5e6354
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
useAutoFocusInputhook,here we should early return if
inputRef.currentis already set (i.e., the TextInput reference has already been assigned). We can do something like this.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
daledah commentedon 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
withPolicyfunction, we pass policy prop asundefinedin this case.So in
PolicyAccountingPage, if we try to accessprops.policy.id, app will be crashed, such as:App/src/pages/workspace/accounting/PolicyAccountingPage.tsx
Line 51 in 42bed64
What changes do you think we should make in order to solve the problem?
App/src/pages/workspace/withPolicy.tsx
Line 86 in 42bed64
should set fallback value
{}for thepolicy:App/src/pages/workspace/withPolicy.tsx
Line 79 in 42bed64
What alternative solutions did you explore? (Optional)
{}in:App/src/pages/workspace/withPolicyConnections.tsx
Line 29 in 42bed64
daledah commentedon Aug 24, 2024
Proposal updated
melvin-bot commentedon Aug 24, 2024
Triggered auto assignment to @deetergp (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.49 remaining items
joekaufmanexpensify commentedon Sep 26, 2024
joekaufmanexpensify commentedon Sep 26, 2024
Payment due here:
joekaufmanexpensify commentedon Sep 26, 2024
@daledah offer for $250 sent!
[-][$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[/+]dukenv0307 commentedon Sep 27, 2024
@joekaufmanexpensify No it's not related to #47696. The QA just saw this bug when they executed the PR
This problem even happened before #47696
dukenv0307 commentedon Sep 27, 2024
@Krishna2323 @yuwenmemon Do you agree with that ^?
joekaufmanexpensify commentedon Sep 27, 2024
Got it, sounds good. TY for confirming!
joekaufmanexpensify commentedon Sep 27, 2024
I updated the payment summary to reflect that you're due payment too.
joekaufmanexpensify commentedon Sep 27, 2024
All set to issue payment!
joekaufmanexpensify commentedon Sep 27, 2024
@daledah $250 sent and contract ended!
joekaufmanexpensify commentedon Sep 27, 2024
@dukenv0307 $250 sent and contract ended!
joekaufmanexpensify commentedon Sep 27, 2024
Upwork job closed.
joekaufmanexpensify commentedon Sep 27, 2024
All set, TY everyone!