Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.58k stars 2.92k forks source link

[$250] Desktop - User remains logged in after logging out on desktop app #50560

Open IuliiaHerets opened 1 month ago

IuliiaHerets commented 1 month ago

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.47-1 Reproducible in staging?: Y Reproducible in production?: N Email or phone of affected tester (no customers): applausetester+kh0710002@applause.expensifail.com Issue reported by: Applause Internal Team

Action Performed:

  1. Launch New Expensify desktop app.
  2. Log out if logged in.
  3. Log in to New Expensify on Chrome.
  4. After login, refresh the page on Chrome.
  5. Click Open New Expensify.
  6. On desktop app, sign out.

Expected Result:

App will redirect to login screen after signing out.

Actual Result:

App is unable to sign out. User remains signed in after signing out.

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/fae079f9-f425-4b16-be70-eaadc0271bb4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021844415362292582702
  • Upwork Job ID: 1844415362292582702
  • Last Price Increase: 2024-10-10
Issue OwnerCurrent Issue Owner: @ahmedGaber93
melvin-bot[bot] commented 1 month ago

Triggered auto assignment to @carlosmiceli (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

melvin-bot[bot] commented 1 month ago

Triggered auto assignment to @sakluger (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.

melvin-bot[bot] commented 1 month ago

💬 A slack conversation has been started in #expensify-open-source

github-actions[bot] commented 1 month ago

: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:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
melvin-bot[bot] commented 1 month ago

Job added to Upwork: https://www.upwork.com/jobs/~021844415362292582702

melvin-bot[bot] commented 1 month ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ahmedGaber93 (External)

carlosmiceli commented 1 month ago

This one is tricky, I'm pretty sure it's FE related but just in case will leave both labels for now. While I look for possible PRs that created this, I'm adding external to see if contributors can start looking into a solution.

carlosmiceli commented 1 month ago

Ok, found the PR that caused it, we should revert this one: https://github.com/Expensify/App/pull/50278/files

ishpaul777 commented 1 month ago

https://github.com/Expensify/App/pull/50596 revert is in progress

carlosmiceli commented 1 month ago

Hey @lakchote assigning you so you can decide what we should do here and when :) Let me know if I can help somehow!

wildan-m commented 1 month ago

@lakchote @thesahindia The error occurred because I changed "withOnyx" to "useOnyx" in AuthScreen, unrelated to the long loading change.

Do you think something wrong with my migration code?

https://github.com/Expensify/App/pull/50278/files#diff-8f7b7e735d34deb43e8933877150f471e9abd69533161a1922e96be7e876685c

lakchote commented 1 month ago

@lakchote @thesahindia The error occurred because I changed "withOnyx" to "useOnyx" in AuthScreen, unrelated to the long loading change.

Do you think something wrong with my migration code?

https://github.com/Expensify/App/pull/50278/files#diff-8f7b7e735d34deb43e8933877150f471e9abd69533161a1922e96be7e876685c

Nothing strange pops out from this, by giving it a first look.

This must be an edge case, as it just happens for Desktop. Your best bet would be to debug the session's value when logging out.

wildan-m commented 1 month ago

@lakchote is ok to skip onyx migration for our long loading PR? after the onyx migration, The value of onyx params is the same, but the order of calls behave differently.

Before: The logout API called without calling other API. After: The logout API called with signInWithLiveToken API, causing the user re-login before logout process completed.

I guess that will have different root cause and will require further analysis.

To reproduce:

Migrate withOnyx to useOnyx in AuthScreen and then perform the reproduction steps in this issue.

thesahindia commented 1 month ago

I believe the migration should be handled in a different ticket since it requires more digging. We were considering managing the migration for sign-in/sign-out flows separately.

Quoting Rory's message: "I wouldn't be opposed to doing a dedicated migration issue for a few components where we anticipate issues, such as Expensify.tsx and sign-in/sign-out flows." (thread)

melvin-bot[bot] commented 3 weeks ago

This issue has not been updated in over 15 days. @sakluger, @lakchote 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!