Closed trjExpensify closed 11 months ago
Current assignee @trjExpensify is eligible for the Bug assigner, not assigning anyone new.
Platforms
in OP are β
)Job added to Upwork: https://www.upwork.com/jobs/~01426d1c07ab30e760
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External
)
App crashes when going back on a Manual request
This error happen on all devices, not only native mobiles.
On native mobiles, app will be crashed.
On chrome, only console error.
The root cause of this error is same screen is appeared when click Next Button.
When click Next Button, we must move to Split screen
from Manual Amount Input Screen
https://github.com/Expensify/App/blob/8d42ad3221927f5bf0e83b6d0e8c90038d03f4e5/src/libs/actions/IOU.js#L2274-L2276
This function reset all request info and go to input screen again.
We need to call secondResetMoneyRequestInfo
instead of resetMoneyRequestInfo
function secondResetMoneyRequestInfo(id = '') {
Onyx.merge(ONYXKEYS.IOU, {
id,
billable: null,
});
}
Result
https://github.com/Expensify/App/assets/65789015/6735714d-f94c-49e1-9c6d-86023e3add53
https://github.com/Expensify/App/assets/65789015/0d093de3-2d25-4d9f-adfc-5a3e14de7616
App crashes when going back on a Manual request
https://github.com/Expensify/App/blob/8d42ad3221927f5bf0e83b6d0e8c90038d03f4e5/src/components/OptionsSelector/BaseOptionsSelector.js#L73-L75 Because of calling focus of null.
We can add check logic there and this works very well on my side.
setTimeout(() => {
if (!this.textInput) {
return;
}
this.textInput.focus();
}, CONST.ANIMATED_TRANSITION);
@aimane-chnaif lets prioritize this one as its important flow in coming 2 weeks. thanks!
There are 2 issues here
As first bug is dupe of https://github.com/Expensify/App/issues/28129, I will provide root cause & solution only for 2nd bug here
Participants selector screen uses BaseOptionsSelector
component.
It uses setTimeout to autofocus input. But if component is unmounted quickly before 300ms, this.textInput becomes undefined and it tries to call undefined.focus()
which makes crash.
This happens because there's no clearTimeout
call on component unmount.
https://github.com/Expensify/App/blob/d916effd3ffb2f29adcd3cfad1e314f210a23efa/src/components/OptionsSelector/BaseOptionsSelector.js#L73-L76
We already have clear logic here https://github.com/Expensify/App/blob/d916effd3ffb2f29adcd3cfad1e314f210a23efa/src/components/OptionsSelector/BaseOptionsSelector.js#L136-L139
this.focusTimeout
definition was somehow missing so we can add it back:
this.focusTimeout = setTimeout(() => {
this.textInput.focus();
}, CONST.ANIMATED_TRANSITION)
I can confirm that navigation bug was unintentionally fixed in #27936. So we can just fix crash here. @mkhutornyi's proposal looks good to me. π π π C+ reviewed
Triggered auto assignment to @AndrewGable, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@aimane-chnaif I think that this crash will not happened if that navigation is fixed.
@yh-0218 I faced this many times on the pages where options list is used. We should fix that bug
Here's another reproducible step: click Search icon and Esc key at the same time
https://github.com/Expensify/App/assets/96077027/99ef90cc-5a6e-4ae7-9915-ce1464ea414e
This is dupe of: https://github.com/Expensify/App/issues/28318
cc @fedirjh
@hungvu193 no, it's different bug
Actually both of it crashed because of the timeout wasn't cleared. I also pointed it out in comment here: https://github.com/Expensify/App/issues/28318#issuecomment-1737597028
Seems like the main purpose of that GH is different from this one - https://github.com/Expensify/App/issues/28318#issuecomment-1744929678 Also what @fedirjh found is different crash - https://github.com/Expensify/App/issues/28318#issuecomment-1752661825
It was first created to resolve the console error (which because of the timeout), however while discussing it, @iwiznia pointed out that, we also need to display the NotFoundView instead of do nothing while clicking the deeplink., so I updated the proposal to cover 2 cases.
So the issue (https://github.com/Expensify/App/issues/28318) can cover this one. Anyway I think let hear other thoughts from @iwiznia and @fedirjh
π @iwiznia & @fedirjh we haven't really got time to dally on this issue if it's not the same root cause. It's a crash in the middle of the request money flow, and it's going live to TU on Tuesday. Can you check the above, please? In the meantime, @AndrewGable can you put your thoughts on this so we're ready to move forward if we need to.
I faced this many times on the pages where options list is used. We should fix that bug
@aimane-chnaif It's the same bug initially reported in https://github.com/Expensify/App/issues/28318
@trjExpensify I agree with @hungvu193 that this has the same root cause as #28318 , Also this solution is the same as what @hungvu193 has suggested in https://github.com/Expensify/App/issues/28318#issuecomment-1737597028
This is what I suggest as this seems like urgent, https://github.com/Expensify/App/issues/28318 is non-urgent. No need to waste time arguing because of issue conflict.
If https://github.com/Expensify/App/issues/28318 will be fixed quickly (in a day or so), go ahead and close this one. If not, we can do quick fix here for the crash. And implement not found logic separately on https://github.com/Expensify/App/issues/28318.
I just found another crash case on split bill.
Yeah, I think we need to get a PR up to fix this crash in the request money flow today, especially if it's also in the split bill case.
I like the idea of using this issue to fix the crash with the above solution, and #28318 to introduce this "no page found" blocking form in the scenario being discussed there.
@mountiny do you agree? We need to resolve this pretty urgently.
Coming from Slack thread here, going to assing @hungvu193 as their solution was proposed earlier albeit on different issue. it was related.
π£ @aimane-chnaif π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @hungvu193 π 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 π
π― β‘οΈ Woah @aimane-chnaif / @hungvu193, great job pushing this forwards! β‘οΈ
The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus π
On to the next one π
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.83-11 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-10-20. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.83-11 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-10-20. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.84-10 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-10-23. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.84-10 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-10-23. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
@AndrewGable, @trjExpensify, @hungvu193, @aimane-chnaif Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Can we get the checklist filled out please, @aimane-chnaif? Also, not sure why 4 checklists got triggered. π
This is already added in guideline - https://github.com/Expensify/App/blob/main/contributingGuides/STYLE.md#how-do-i-auto-focus-a-textinput-using-usefocuseffect If everyone follows this pattern correctly, this bug won't happen.
Also, not sure why 4 checklists got triggered. π
https://expensify.slack.com/archives/C01GTK53T8Q/p1698059102119519 π
Okay, so confirming payments as follows:
Settled up!
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: v1.3.79-3 Reproducible in staging?: Y Reproducible in production?: 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: @MitchExpensify Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696874025934959
Action Performed:
Expected Result:
App doesn't crash
Actual Result:
App crashes
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
https://github.com/Expensify/App/assets/16232057/f6af03ca-662c-4206-97ab-e14f25d2a259iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
View all open jobs on GitHub
Upwork Automation - Do Not Edit