-
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
[Due for payment 2025-03-05] [$250] Copilot - User gets stucked in Copilot account when removed by the other user #56165
Comments
Triggered auto assignment to @slafortune ( |
Job added to Upwork: https://www.upwork.com/jobs/~021885343462254488429 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @c3024 ( |
🚨 Edited by proposal-police: This proposal was edited at 2025-02-02 05:41:28 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Copilot - User remains stuck in the Copilot account after being removed by another user. What is the root cause of that problem?1.1- Onyx State Before Copilot removal: complete state
The 1.2- When another user removes the copilot Pusher event at client side:
Onyx State After Copilot removal by pusher: complete state
delegate email [email protected] is not present in So pusher is properly updating Onyx. 2. Why Users Get Stuck? App/src/libs/actions/Delegate.ts Lines 148 to 160 in a8daefb
When connected as copilot [email protected], all server communication is tied to this account.
This results in the user being stuck. What changes do you think we should make in order to solve the problem?Remove following App/src/libs/actions/Delegate.ts Lines 31 to 34 in a8daefb
And add following code at App/src/libs/actions/Delegate.ts Line 61 in a8daefb
Note: This is pseudo-code and will be refined in the PR. What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?What alternative solutions did you explore? (Optional)Handling invalid responses by restoring the delegate session when authentication tokens are missing. App/src/libs/actions/Delegate.ts Lines 209 to 217 in a8daefb
with
Please refer to this detailed video for a clearer understanding |
Proposal |
|
Happy to be the internal reviewer on this since I dealt with copilot stuff |
Thanks for the proposal. That idea looks good. However, Pusher sends updates correctly for removing the delegator when we remove the copilot from another device. But there are differences in update IDs received in the response, so this Pusher response should be queued for a later update, and the missing updates (updates on the server but not on the client) should be fetched with There seems to be an issue with updating this Pusher update due to rejected responses from Ideally, we should find out why the deferred Pusher update is not applied and fix it. |
Hi @c3024, You're absolutely right. Currently, we're early returning if the response lacks necessary data, which results in the error message: "Oops, something went wrong. Please try again."
Instead of just returning an error, I propose implementing my solution to ensure that: ✅ Even after fixing the deferred Pusher update issue, we handle cases where the response lacks proper data. This proactive approach will help prevent similar issues in the future while ensuring a seamless user experience. Let me know what you think! 🚀 |
We should fix the root cause first and then consider adding any proactive workarounds for this specific issue. When Pusher sends a response removing the delegator, the account should be removed immediately from the switcher. This works correctly if the user is on their main account when the Pusher response for removing the delegator is received. However, if the user is on the delegator account, this fails. This failure still allows the user to go to FAB and begin requests (though the backend will reject them). So, let’s first fix why the Pusher response is not correctly merged into Onyx. |
Proposal |
|
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@dangrous, @slafortune, @c3024 Eep! 4 days overdue now. Issues have feelings too... |
I am checking this. Will update soon! |
Thanks for the update! Here's what I understood: useEffect(() => {
if (!account?.delegatedAccess?.delegate) {
return;
}
if (account?.delegatedAccess?.delegates?.some(d => d.email === account?.delegatedAccess?.delegate)) {
return;
}
disconnect();
}, [account?.delegatedAccess?.delegates, account?.delegatedAccess?.delegate]); Your primary solution did not work for me. It also does not appear to be better than your alternative solution. So, let us proceed with the alternative solution. Please correct me if I am missing anything. Alternative solution of @ijmalik here looks good to me. 🎀 👀 🎀 C+ reviewed! |
Current assignee @dangrous is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
You're absolutely right. Let's move forward with the alternative solution. |
@dangrous @slafortune @c3024 this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
Thanks for your patience, I missed this one. Alternate solution looks good, though I think we should keep the log lines in. |
📣 @ijmalik 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.6-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2025-03-05. 🎊 For reference, here are some details about the assignees on this issue:
|
@c3024 @slafortune @c3024 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
This has been deployed but according to QA might not be fixed yet? I'm going to follow up with them, but just noting this here so I remember. |
Hi @dangrous, @ c3024, @slafortune
I think PR is working fine. QA may see only error message due to delayed
pusher message.
Please see the details at
#56902 (comment)
And
#56902 (comment)
…On Thu, Feb 27, 2025, 9:19 PM Daniel Gale-Rosen ***@***.***> wrote:
This has been deployed but according to QA might not be fixed yet? I'm
going to follow up with them, but just noting this here so I remember.
—
Reply to this email directly, view it on GitHub
<#56165 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ6GVOXOK5TDNS5CQBNF432R43KJAVCNFSM6AAAAABWHUSP62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBYGQ2TMNJSGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: dangrous]*dangrous* left a comment (Expensify/App#56165)
<#56165 (comment)>
This has been deployed but according to QA might not be fixed yet? I'm
going to follow up with them, but just noting this here so I remember.
—
Reply to this email directly, view it on GitHub
<#56165 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ6GVOXOK5TDNS5CQBNF432R43KJAVCNFSM6AAAAABWHUSP62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBYGQ2TMNJSGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks for that detail! I agree that that is probably what QA encountered? I'll ping them again to re-test, and if it DOES keep showing up we might need to have them try explicitly with waiting between the removal of the copilot and the attempt to return to the original account. It probably won't happen that frequently in real life, but in testing it could. |
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.93-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5546706&group_by=cases:section_id&group_order=asc&group_id=229064
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 - Android 12 - Chrome / Windows 10 - Chrome
App Component: User Settings
Action Performed:
Expected Result:
When user is removed as copilot, the app should be automatically updated and returned to the main account.
Actual Result:
User can´t return to main account when removed as copilot after switching account. When selecting main account on switcher, a "Something went wrong" message is displayed and the user gets stuck in copilot account. Killing and relaunching the app, leads to infinite loading in settings section and the only way to be able to use the account normally again, is by logging out and re logging in.
Workaround:
Unknown
Platforms:
Screenshots/Videos
bug.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @slafortuneThe text was updated successfully, but these errors were encountered: