-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$250] Onboarding - Infinite loop in onboarding modal when coming from OD via Support #51481
Comments
Triggered auto assignment to @jliexpensify ( |
@jliexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
Edited by proposal-police: This proposal was edited at 2024-10-26 04:14:21 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Onboarding - Infinite loop in onboarding modal when coming from OD via Support What is the root cause of that problem?When we navigate to concierge via support, the concierge chat doesn't exist yet so we will create new optimistic chat and generator new report id for the concierge chat App/src/libs/actions/Report.ts Lines 1025 to 1035 in 9508b17
So when we refresh the page or navigate to concierge chat again via support (like in the video), onboarding modal show's up and when completing the onboarding the onboarding show's up again and causes infinite loop It's because the BE returns error saying invalid data, because we pass invalid report id which is optimistic concierge report id that we just created for the App/src/libs/actions/Report.ts Lines 3341 to 3348 in 9508b17
We get targetChatReportID for the concierge report id by using And the But in this case why the optimistic chat report doesn't get removed? even we handle it right here and the BE handling correctly returning the preexistingReportID when the optimistic report chat is opened ... App/src/libs/actions/Report.ts Lines 1369 to 1376 in 9508b17
It's because almost every API write requests the onyx updates will be queued, so first OpenApp API command get called and the onyx updates get flush which will apply the onyx updates from BE to Onyx, and when it's done applying it will clear the queuedOnyxUpdates App/src/libs/actions/QueuedOnyxUpdates.ts Lines 11 to 20 in 9508b17
But when we still applying the data for OpenApp, the OpenReport get called for optimistic concierge report chat and returns the preexistingReportID onyx updates and will push the onyxUpdates to queuedOnyxUpdates variable But as we can see in the above the queuedOnyxUpdates will get cleared after the Onyx applied the onyxUpdates for for OpenApp App/src/libs/actions/QueuedOnyxUpdates.ts Lines 16 to 20 in 9508b17
so the OpenReport onyx updates response will get dismiss because it's got cleared after the Onyx applied the onyx updates for OpenApp Demo: Screen.Recording.2024-10-25.at.19.50.08.1.movAs we can see in the video the OpenReport for concierge optimistic report chat onyx updates (preexistingReportID) got cleared inside What changes do you think we should make in order to solve the problem?We should clear the function flushQueue(): Promise<void> {
const savedQueuedOnyxUpdates = queuedOnyxUpdates;
queuedOnyxUpdates = [];
return Onyx.update(savedQueuedOnyxUpdates);
} ResultScreen.Recording.2024-10-25.at.21.12.38.movWhat alternative solutions did you explore? (Optional) |
Job added to Upwork: https://www.upwork.com/jobs/~021850366174167695381 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh ( |
@jliexpensify, @fedirjh Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Bump @fedirjh we have a proposal for you to review. |
DM-ed Fedi on Slack |
I am unable to replicate the bug on staging CleanShot.2024-11-01.at.12.52.10-trimmed.mp4CleanShot.2024-11-01.at.12.52.10.mp4 |
@fedirjh Yes it seems not reproducible on staging But i just tested again with the latest main on dev mode and the issue is still reproducible Screen.Recording.2024-11-01.at.05.11.47.1.mov |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@fedirjh You need to refresh to show the onboarding modal |
@fedirjh I tried again reproducing on the latest main, seems the issue is not reproducible both staging and dev |
@NJ-2020 Thanks for re-testing 🙌🏼 @jliexpensify Can you please add the re-test label ? |
Removing due to low reproducibility |
Thanks @fedirjh - added! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Issue not reproducible during KI retests. (First week) |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Nice, will wait another week of testing before closing. |
No overdue. |
@jliexpensify @fedirjh this issue is now 4 weeks old, please consider:
Thanks! |
Waiting on a final test from Applause |
Issue not reproducible during KI retests. (Second week) |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Great, lets close! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.54
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5121161
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
The user can complete the onboarding flow and is brought to the NewDot concierge chat
Actual Result:
The user remains stuck in an infinite loop in the "What do you want to do today?" modal when he chooses the "Chat and split expenses with friends" option.
By selecting any other option, for instance, "Get paid back by my employer" the loop ends.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6645146_1729868484024.Infinite_loop_in_onboarding.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @fedirjhThe text was updated successfully, but these errors were encountered: