Skip to content

[$250] Workspace expenses - Hybrid - Deeplink 'Finish setting up your workspace' redirects to mWeb. #60094

Closed

Description

@mitarachim

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.1.27-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5922113
Email or phone of affected tester (no customers): youseronvoardin@onvoardin.com
Issue reported by: Applause Internal Team
Device used: Samsung A15, Android 14 | iPhone SE 3rd generation (2022), iOS 18.4
App Component: Other

Action Performed:

  1. Open Hybrid app
  2. Sign up with a email without +
  3. Select 'Track and budget expenses'
  4. Enter any name
  5. Tap on FAB > Create a expense > Manual > Submit it to youself
  6. Tap on 'Categorize it' > Upgrade > Got it, thanks > Select any category > Create the expense.
  7. Tap on 'Finish setting up your workspace' deeplink.

Expected Result:

The user is redirected to Concierge chat.

Actual Result:

The user is redirected to mWeb.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6799077_1744345462445.Android_Hybrid_v9.1.27-0.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021910683620713989813
  • Upwork Job ID: 1910683620713989813
  • Last Price Increase: 2025-04-11
Issue OwnerCurrent Issue Owner: @QichenZhu

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    DeployBlockerCashThis issue or pull request should block deployment
    on Apr 11, 2025
  2. melvin-bot commented on Apr 11, 2025

    @melvin-bot

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

  3. melvin-bot commented on Apr 11, 2025

    @melvin-bot

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

  4. melvin-bot commented on Apr 11, 2025

    @melvin-bot

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

  5. github-actions commented on Apr 11, 2025

    @github-actions
    Contributor

    👋 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.
  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Apr 11, 2025
  7. changed the title [-]Workspace expenses - Hybrid - Deeplink 'Finish setting up your workspace' redirects to mWeb.[/-] [+][$250] Workspace expenses - Hybrid - Deeplink 'Finish setting up your workspace' redirects to mWeb.[/+] on Apr 11, 2025
  8. 5 remaining items

  9. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Apr 14, 2025
  10. mountiny commented on Apr 14, 2025

    @mountiny
    Contributor

    As discussed in the slack thread, this is probably not a blocker because the link leads to production so this only happens in staging but it should be handled more gracefully, I think we had a logic to resolve this better

  11. QichenZhu commented on Apr 14, 2025

    @QichenZhu
    Contributor

    Should this be internal since the link comes from the backend?

  12. mountiny commented on Apr 14, 2025

    @mountiny
    Contributor

    I dont think we will change the link, app should handle this well its the same link with just staging in front of it.

    Seems like in the thread in Slack, QA can confirm this used to work ok in the previous staging builds

  13. QichenZhu commented on Apr 15, 2025

    @QichenZhu
    Contributor

    @acdtunes thanks for the proposal. The root cause analysis is not accurate for two reasons:

    1. parseHybridAppUrl() isn’t called during the test steps, so it can't be the cause.
    2. The link shouldn't go outside the app and come back via deeplink. Ideally, it should be handled entirely within the app.
  14. nkdengineer commented on Apr 16, 2025

    @nkdengineer
    Contributor

    @mountiny We're only navigating through the App if the URL has the same origin as the environment. In this case, the environment is staging, and the link is production. Do we want to update this logic to remove hasSameOrigin here?

    Or define a new check that true for native and false on other platforms. With this check all our app links will not open the browser in the native app and will open a new tab on Web if the original is not the same.

    index.ts
    
    const shouldForceNavigateToInternalPath = () => false;
    
    export default shouldForceNavigateToInternalPath;
    
    index.native.ts
    
    const shouldForceNavigateToInternalPath = () => true;
    
    export default shouldForceNavigateToInternalPath;
    
    

    then update this condition to

    if (internalNewExpensifyPath && (hasSameOrigin || shouldForceNavigateToInternalPath())) {
    

    if (internalNewExpensifyPath && hasSameOrigin) {
    if (isAnonymousUser() && !canAnonymousUserAccessRoute(internalNewExpensifyPath)) {
    signOutAndRedirectToSignIn();
    return;
    }
    Navigation.navigate(internalNewExpensifyPath as Route);
    return;

  15. QichenZhu commented on Apr 17, 2025

    @QichenZhu
    Contributor

    For reference, here is how we handle links with a specific pattern:

    // There can be messages from Concierge with links to specific NewDot reports. Those URLs look like this:
    // https://www.expensify.com.dev/newdotreport?reportID=3429600449838908 and they have a target="_blank" attribute. This is so that when a user is on OldDot,
    // clicking on the link will open the chat in NewDot. However, when a user is in NewDot and clicks on the concierge link, the link needs to be handled differently.
    // Normally, the link would be sent to Link.openOldDotLink() and opened in a new tab, and that's jarring to the user. Since the intention is to link to a specific NewDot chat,
    // the reportID is extracted from the URL and then opened as an internal link, taking the user straight to the chat in the same tab.
    if (hasExpensifyOrigin && href.indexOf('newdotreport?reportID=') > -1) {

  16. mountiny commented on Apr 17, 2025

    @mountiny
    Contributor

    Thank you, since this woks in production I dont think we have to do anything right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions