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.53k stars 2.88k forks source link

iOS - QBD - The user isn't logged into OD after tapping on the link to fix the connection #49386

Closed IuliiaHerets closed 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.37-0 Reproducible in staging?: Y Reproducible in production?: N/A - new feature, doesn't exist in prod Issue was found when executing this PR: https://github.com/Expensify/App/pull/48759 Issue reported by: Applause Internal Team

Action Performed:

  1. ND on web: Navigate to https://staging.new.expensify.com/
  2. ND on web: Log in with a new Gmail account
  3. ND on web: Create a workspace
  4. ND on web: Navigate to OD by clicking on Account settings - Domains
  5. OD on web: Navigate to Settings - Workspaces - "Created workspace name" - Connections
  6. OD on web: Upgrade the WS to Collect with the lock icon next to "QuickBooks Desktop"
  7. OD on web: Click on QuickBooks Desktop - Connect to QuickBooks Desktop - Connect to QuickBooks Desktop
  8. OD on web: Attempt to connect to QuickBooks Desktop (the connection will fail)
  9. iOS: Log off from OD on your default web browser
  10. ND on IOS: Log in with the Gmail account used in steps 1-8
  11. ND on iOS: Navigate to Account settings - Workspaces - "Created workspace name" - Accounting
  12. ND on iOS: Tap on the link that takes you to OD

Expected Result:

The user should be logged into OD and be taken to the page with the issue.

Actual Result:

The user isn't logged into OD after tapping on the link to fix the connection issue. OD is logged in on Android and Mac.

Workaround:

Unknown

Platforms:

Screenshots/Videos

https://github.com/user-attachments/assets/12605ff2-4fa2-4bc4-a68e-3ece6b0a49a0

View all open jobs on GitHub

melvin-bot[bot] commented 1 month ago

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

melvin-bot[bot] commented 1 month 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 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.
IuliiaHerets commented 1 month ago

We think that this bug might be related to #wave-collect - Release 1

dylanexpensify commented 1 month ago

reviewing

dylanexpensify commented 1 month ago

@IuliiaHerets steps 10-12 are these on iOS web or app?

arosiclair commented 1 month ago

This is a brand new error message we just added in https://github.com/Expensify/App/pull/48759 so I'm leaning towards not blocking on this.

I agree the link should sign you in automatically though. @daledah @puneetlath can you take a look?

dylanexpensify commented 1 month ago

@IuliiaHerets I can't reproduce as no button to take to OD via step 11. https://github.com/user-attachments/assets/309c5be9-2b85-4a47-a5c6-8ee4e0639ae0

dylanexpensify commented 1 month ago

@arosiclair I don't even see a button to take me to ND here. Is this behind beta?

dylanexpensify commented 1 month ago

See link above w/screen recording

arosiclair commented 1 month ago

@arosiclair I don't even see a button to take me to ND here. Is this behind beta?

Doesn't look like it from the PR. It seems bugged either way. Let's see what Puneet or daledah have to say.

puneetlath commented 1 month ago

I don't think this needs to be a blocker. It's a new thing we added to make the error message more clear and we can handle making it log in on follow up. How do we do that elsewhere?

arosiclair commented 1 month ago

Cool just demoted. Assigning you to follow up @puneetlath.

daledah commented 1 month ago

@puneetlath @arosiclair I ran some tests, and it looks like OD doesn't handle policy url with params that has brackets very well on mobile webs.

Here are some tests with different Link.openOldDotLink inputs:

  1. policy?param={"policyID":"${policyID}"}#connections is redirected to:

https://www.expensify.com/?exitTo=policy?param={"policyID":"DF85C34B7C2DA40D"}&authToken=(authToken)&email=daledah2611+qbd@gmail.com&email=#connections

  1. policy?param={"policyID":"${policyID}"} is redirected to:

https://www.expensify.com/?exitTo=policy?param={"policyID":"DF85C34B7C2DA40D"}&authToken=(authToken)&email=daledah2611+qbd@gmail.com&email=

Note that in the these two cases, there are a redundant email= query param, which is what I think is the reason why user is not logged in.

  1. policy is redirected to:

https://www.expensify.com/admin_policies?param={%22section%22:%22group%22}

The third case works well and user is logged in.

IuliiaHerets commented 1 month ago

@dylanexpensify I believe that you used nit a latest build, it is a new feature, so this error message available only on the build 37-0 and higher. 10-12 steps - it is iOS.

puneetlath commented 1 month ago

I don't think we really expect policy editing on OldDot to work well on mobile well, so I feel like we should just close this. Please comment or reopen if you disagree.