Closed IuliiaHerets closed 1 month ago
We think that this bug might be related to #wave-collect - Release 1
Expense - App crash when clicking on the link settings/workspaces/:policyID/accounting/quickbooks-online/export/out-of-pocket-expense/account-select
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.
https://github.com/Expensify/App/blob/f5e63543cbdea0ffcc0e5bf201f8f2e9645582c6/src/hooks/useAutoFocusInput.ts#L57
The issue is caused by an infinite loop triggered by`setIsInputInitialized(true)
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
We can also keep the current logic
if (inputRef.current || isInputInitialized) {
return;
}
user Your proposal will be dismissed because you did not follow the proposal template.
@IuliiaHerets Could you please re-add the labels? no one is assigned here
Expense - App crash when clicking on the link
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.
https://github.com/Expensify/App/blob/f5e63543cbdea0ffcc0e5bf201f8f2e9645582c6/src/hooks/useAutoFocusInput.ts#L57
The issue is caused by an infinite loop triggered by`setIsInputInitialized(true)
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
We can also keep the current logic
if (inputRef.current || isInputInitialized) {
return;
}
App crash when clicking on the link: settings/workspaces/:policyID/accounting/quickbooks-online/export/out-of-pocket-expense/account-select
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:
https://github.com/Expensify/App/blob/42bed64c6a6d36bca317812d2a570a850f5ecc86/src/pages/workspace/accounting/PolicyAccountingPage.tsx#L51
In here:
https://github.com/Expensify/App/blob/42bed64c6a6d36bca317812d2a570a850f5ecc86/src/pages/workspace/withPolicy.tsx#L86
should set fallback value {}
for the policy
:
{...props}
policy={props.policy ?? {}}
Optional:
if (policyID.length > 0 && props.policy) {
Also, we can set the fallback value {}
in:
https://github.com/Expensify/App/blob/42bed64c6a6d36bca317812d2a570a850f5ecc86/src/pages/workspace/withPolicyConnections.tsx#L29
Triggered auto assignment to @deetergp (DeployBlockerCash
), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
:wave: 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:
⚠️ 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.
Job added to Upwork: https://www.upwork.com/jobs/~0102861cb1eeae8b58
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk (External
)
@Nodebrute, @daledah, did you use personal QBO accounts for testing?
@brunovjk Yes
Thank you @daledah. I'm trying to register one, there is no support in my country now, I'll review the proposals as soon as possible.
Excuse me @dukenv0307, would you mind taking this isse? I don't have QBO credentials yet, I believe this was a DB where you are the original C+? Thanks.
@brunovjk Yes, I can take it as C+ cc @deetergp
Thank you :D
📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
Triggered auto assignment to @youssef-lr, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
📣 @daledah You have been assigned to this job! Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs! Keep in mind: Code of Conduct | Contributing 📖
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!
I think the automation broke on this one. The PR has been reviewed, merged, and is currently out on production.
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.
Yep, this is due for payment now.
@dukenv0307 seems like this was a DB from a prior issue where you were C+, so thinking payment for you is not required here. Please let me know if you think that is not correct!
Payment due here:
@daledah offer for $250 sent!
@joekaufmanexpensify No it's not related to https://github.com/Expensify/App/pull/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 https://github.com/Expensify/App/pull/47696
@Krishna2323 @yuwenmemon Do you agree with that ^?
Got it, sounds good. TY for confirming!
I updated the payment summary to reflect that you're due payment too.
All set to issue payment!
@daledah $250 sent and contract ended!
@dukenv0307 $250 sent and contract ended!
Upwork job closed.
All set, TY everyone!
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: https://github.com/Expensify/App/pull/47696 Email or phone of affected tester (no customers): applausetester+23084alsn@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
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:
Screenshots/Videos
2308_1.txt
View all open jobs on GitHub
https://github.com/user-attachments/assets/9bbbbc9f-b4ff-41aa-a547-8ed45da8a9dd
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @brunovjk