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.49k stars 2.85k forks source link

Hybrid Android app – Copilot – Unable to switch to own account from copilot account #51042

Open IuliiaHerets opened 4 days ago

IuliiaHerets commented 4 days 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: v9.0.50-0 Reproducible in staging?: N Reproducible in production?: N If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5097100 Email or phone of affected tester (no customers): applausetester+jp_2171024@applause.expensifail.com Issue reported by: Applause Internal Team

Action Performed:

  1. Go to Hybrid app
  2. Login as the account that has full copilot access
  3. Tap on Settings/header arrows
  4. Switch to copilot accounts
  5. Tap on Settings/header arrows again
  6. Switch to your own accounts

Expected Result:

User able to switch to own account from copilot account

Actual Result:

Error appears: Oops something went wrong

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/05af81de-e678-484e-b33e-b7ebdb662fc7

View all open jobs on GitHub

melvin-bot[bot] commented 4 days ago

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

github-actions[bot] commented 4 days 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 4 days ago

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

melvin-bot[bot] commented 4 days ago

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

melvin-bot[bot] commented 4 days ago

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

melvin-bot[bot] commented 4 days ago

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

github-actions[bot] commented 4 days 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.
IuliiaHerets commented 4 days ago

Sorry, was confused with blocker label

jasperhuangg commented 4 days ago

@IuliiaHerets next time add both labels, they're used to indicate that the bug could either be from the front-end or the back-end.

jasperhuangg commented 4 days ago

These logs seem suspect, I'll try to reproduce on my own account to see if I run into the same issue. Need to wait for the beta cache to refresh though.

The logs indicate that the authPartnerID stored with the restored token we're passing to the CreateLogin command isn't recognized.

jasperhuangg commented 4 days ago

When I reproduce on my test Android device I can't seem to reproduce the issue. It sends the stores the same partnerID as on Web/Desktop/iPhone, which is the NewDot partnerID recognized by the back-end.

The logs for the OP seem to show that we stored the Android partnerID with the authToken, which isn't recognized by the back-end.

jasperhuangg commented 4 days ago

Going to ask in Slack for some more context about how we decide which partnerID to send with each request since I lack context.

jasperhuangg commented 4 days ago

Ah I was finally able to repro. The tester is testing using HybridApp. When we sign into HybridApp on Android/iPhone and then switch to NewDot, the authToken is created with partnerID = 14 or 16 (i.e. PARTNER_NAME_IPHONE or PARTNER_NAME_ANDROID). When we try to call CreateLogin with an authToken with those partnerIDs, it isn't recognized here and throws.

We need to either:

Gonna ask in Slack for some feedback on these options.

jasperhuangg commented 4 days ago

NewDot Copilot lives behind a beta, so I don't think we need to block deploy on this.

jasperhuangg commented 4 days ago

engineering-chat post asking for feedback here

melvin-bot[bot] commented 4 days ago

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

dylanexpensify commented 4 days ago

Hey @twisterdotcom! I'm heading out on parental leave so reassigning this! TY! 🙇‍♂️

jasperhuangg commented 17 hours ago

Have some feedback in the Slack thread to look into calling SignInWithShortLivedAuthToken to get a NewDot token when switching to NewDot. It seems that's what we do in other cases when switching from OldDot to NewDot.