-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 2023-08-15] App crashes when edited description of task #23210
Comments
Triggered auto assignment to @mallenexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
|
Triggered auto assignment to @yuwenmemon ( |
I can't seem to reproduce this on dev |
@yuwenmemon Can you confirm before we close this out? |
I can try to reproduce |
ah, this happens in IOS, I may not be able to reproduce reliably. I'll try in Android, but it is not good enough to discard the deploy blocker I think. |
I confirmed that it crashes in Android native too, I don't know if this crashes on production |
I'm failing to reproduce in dev. One thing I noticed before the crash was that the description showed up empty before editing and crashing, and I had typed something when I created the task. |
ProposalPlease restate the problem that we are trying to solve in this issue.The App crashes when the user changes the task description. What is the root cause of that problem?This issue is a regression from this [PR](#22983). The root cause is that when we create a new task, we leave the CreateTaskPage and then we clear the report task from ONYX, as shown here: App/src/pages/tasks/NewTaskPage.js Line 110 in 391c412
Then, when a TaskViewer opens, we set the task that comes from its parent to the task:
This order was the assumption, but the current behavior is that TaskViewer mounts before CreateTaskPage unmounts. So, first the TaskViewer sets its report to the ONYX report viewer, and then CreateTaskPage unmounts and removes the current task viewer. This makes the task undefined which leads to this crash. What changes do you think we should make in order to solve the problem?Simply, we can revert this PR, because this is a more important issue. The problem there is before this pr the task viewer gets removed early before the CreateTaskPage becomes invisible, and that makes the task title an empty string in the time of leaving the screen. const [currentTask, setCurrentTask] = React.useState({});
useEffect(() => {
if (!currentTask.parentReportID && props.task.parentReportID) {
setCurrentTask(props.task);
} else if (props.task.parentReportID === currentTask.parentReportID) {
setCurrentTask(props.task);
}
}, [props.task]); then we can use it instead of props. task wich will be clear before the component unmount. What alternative solutions did you explore? (Optional)Maybe use a timeout to set the report viewer. |
@dukenv0307 please check this one. I think this came from #22983, though I am not able to reproduce, |
@thienlnam @aldo-expensify Still able to reproduce it after taking new pull from main branch Screen.Recording.2023-07-20.at.12.21.51.PM.mov |
@0xmiroslav We have 2 ways to move forward
ProposalPlease re-state the problem that we are trying to solve in this issue.App crashes when edited description of task What is the root cause of that problem?In the previous PR, we decide to call clearOutTaskInfo when NewTaskPage unmounts. We also have logic to set the task field in here App/src/components/ReportActionItem/TaskView.js Lines 42 to 46 in 391c412
Unfortunately, setTaskReport is executed before clearOutTaskInfo, so the task field is empty What changes do you think we should make in order to solve the problem?We expect that clearOutTaskInfo is executed before setTaskReport. So I think we should call setTaskReport after interaction by using InteractionManager.runAfterInteractions like this
ResultsScreen-Recording-2023-07-20-at-15.07.50.mp4 |
I think it's better to revert. That solution seems not ideal |
@0xmiroslav #23243 this is reverted PR, Please help to check |
Revert has been merged just need to CP it to Staging |
Same bug happens on Assignee modal - #23342 (comment). |
@ayazhussain79 can you please confirm in staging/production that native app still crashes following repro step in #23210 (comment)? |
@situchan yes not able to select assignee console warning displayed |
yeah, it's another bug. Even crashes when update description |
here is another bug when pressing back button on assignee page its returns back to the task creating page Screen.Recording.2023-07-25.at.1.46.22.PM.mov |
This is fixed in latest main (#23342 merged). Still happens on staging / production |
@thienlnam @aldo-expensify @mallenexpensify this bug is just pending for payment |
Job added to Upwork: https://www.upwork.com/jobs/~010d8887850db77d1d |
Triggered auto assignment to @laurenreidexpensify ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh ( |
Matt is probably ooo, this is ready to paid to the reporter as the bug is fixed. |
@mountiny sorry just to be clear, are you saying the only payment required on this issue is to the bug reporter? |
Correct, I think this PR has solved this issue too but the root casue was the same so we should not be paying for this issue to the contributor PR author #23342 So just $250 to @ayazhussain79 |
offer sent to @ayazhussain79 in Upwork! |
@laurenreidexpensify offer accepted, Thank you |
Payment Summary:
|
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
App should not crash when editing description of task
Actual Result:
App crashes when edited description of task
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?
Version Number: dev
Reproducible in staging?: n/a
Reproducible in production?: n/a
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
Notes/Photos/Videos: Any additional supporting documentation
Screen.Recording.2023-07-19.at.7.22.31.PM.mov
Expensify/Expensify Issue URL:
Issue reported by: @ayazhussain79
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689776819661849
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: