Skip to content

[Due for payment 2026-09-25] iOS - Logged out user is not redirected to the correct conversation when navigate via link #101525

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.4.84-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/74548899/folder/13176964/41237742/1771052775?sort=%2Bstatus_id
Email or phone of affected tester (no customers): gocemate+buzz19950@gmail.com
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: iphone 11/26.2
App Component: Other

Action Performed:

Precondition:
Copy the DM conversation URL and paste it to slack
Log out from New dot app

Steps:

  1. Tap the conversation link from Slack
  2. In the log in screen enter the same user

Expected Result:

After login in, you're redirected to the correct conversation

Actual Result:

After login in user is redirected to Home page

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7262976_1789714032230.ScreenRecording_09-18-2026_08-32-33_1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7262976

Issue OwnerCurrent Issue Owner: @abdulrahuman5196

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 18, 2026
  2. applause-bot commented on Sep 18, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/ae9635c78eff4852eb4e01ae18b92a908e64d7e4cf189cf5a7c4d4706c17940d

  3. github-actions commented on Sep 18, 2026

    @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.
  4. melvin-bot commented on Sep 18, 2026

    @melvin-bot

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

  5. melvin-bot commented on Sep 18, 2026

    @melvin-bot

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

  6. MelvinBot commented on Sep 18, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: Fix: anonymous user first time tapping on sign in button or a thread open public room (Expensify/App#99582) - by @nkdengineer (High confidence)
    Related Issues: [$250] Public room-anon user first time tapping on sign in button or a thread open public room (the issue that PR fixed)

    Recommendation: REVERT

    PR #99582 added a guard in openReportFromDeepLink that drops the post-sign-in deep-link navigation whenever the deep-linked route is not already the active route — which is exactly the situation on native after an interactive sign-in, so the user is left on Home. The change is 5 lines in a single file with no dependent PRs, so a revert is clean; the only regression it re-opens is the much milder #96346.

    Assigned: @nkdengineer (PR author), @abdulrahuman5196 and @stitesExpensify (approving reviewers) from highest-confidence causing PR only
    Labels: No changes. DeployBlockerCash is correct and stays (an App PR caused this). DeployBlocker was never applied, so there is nothing to remove.

    📋 Detailed Analysis

    Evidence

    • This is staging-only (not reproducible in production), and PR #99582 (merged 2026-09-17T15:49:33Z, merge commit ec198fd) is the only PR in the 9.4.84-0 deploy checklist that touches src/libs/actions/Link.ts, the file that owns post-sign-in deep-link navigation. Confirmed via gh api repos/Expensify/App/commits?path=src/libs/actions/Link.ts&sha=staging — the previous change to that file landed 2026-09-08 and is already in production.
    • The whole diff of Fix: anonymous user first time tapping on sign in button or a thread open public room #99582 is this new guard inside navigateHandler, plus renaming route to deeplinkRoute at the Navigation.navigate call:
      src/libs/actions/Link.ts#L624-L629 (guard) and #L646-L648 (the navigate it now blocks).
    • production (24bad86) has the identical navigateHandler without the guard, which is why production still redirects correctly. Verified with git show origin/production:src/libs/actions/Link.ts.
    • The PR's own test steps stop at "Tap on Sign in button → verify the sign in modal appears" — they never actually complete a sign-in, so this exact flow was not covered by the PR's manual testing.

    Verification

    • Affected file: src/libs/actions/Link.ts → openReportFromDeepLink() → navigateHandler.
    • gh pr view 99582 --json files returns exactly one file: src/libs/actions/Link.ts. So the PR modifies the affected code path and nothing else.
    • Supporting code paths read (all unchanged by this release, they just explain the mechanism):
      • Navigation.isActiveRoute() compares the path derived from the current react-navigation state, not the URL.
      • linkingConfig/subscribe.ts#L61-L67 explicitly does not hand a /r/<reportID> deep link to react-navigation while there is no auth token, deferring to openReportFromDeepLink — so this code is the only thing that can perform the redirect.
      • PublicScreens.tsx#L32-L43 shows the logged-out root stack contains only SignInPage (registered under TAB_NAVIGATOR, with no path of its own), so no report route can be active while signed out.

    Root Cause

    Flow for this bug: logged out → tap /r/<reportID> → DeepLinkHandler calls openReportFromDeepLink(url, …, isAuthenticated: false, …) → the report route is not dispatched to react-navigation (see subscribe.ts above), so the sign-in page is shown → waitForUserSignIn() resolves after the user signs in → waitForProtectedRoutes() resolves once AuthScreens mounts → the ONYXKEYS.COLLECTION.REPORT<reportID> subscription fires and calls navigateHandler.

    At that moment the active route is Home, because the app was never on r/<reportID> (it was on the sign-in page, and AuthScreens initialises to Home). The new guard is:

    // Skip if the user already left the deeplinked route.
    const deeplinkRoute = route as Route;
    if (deeplinkRoute && !Navigation.isActiveRoute(deeplinkRoute)) {
        return;
    }

    isActiveRoute('r/<reportID>') is false, so navigateHandler returns before ever calling Navigation.navigate(deeplinkRoute, …) and the user stays on Home.

    The guard's intent was "the user was on the deep-linked route and has since left it" (the #96346 case: an anonymous user viewing a public room taps Sign in, and the pending handler used to yank them back to the report and dismiss the sign-in modal). But it uses the current route as a proxy for that, with no baseline, so it cannot distinguish "the user left the route" from "the user was never able to be on the route in the first place" — which is every signed-out deep link into a non-anonymous-accessible report.

    Note on scope: nothing in this mechanism is iOS-specific — isActiveRoute reads navigation state, not the URL, and DeepLinkHandler/subscribe.ts are shared. Android native is very likely affected too; the iOS-only checkbox reflects the scope of the regression run that found it, not necessarily the true blast radius. Worth confirming on Android before closing.

    Alternatives ruled out

    • [No QA] support standalone Xcode 27 iOS builds and simulators — the only other iOS-flavoured PR in the release, but it only touches ios/NewExpensify.xcodeproj/project.pbxproj, ios/Podfile.lock, package.json/package-lock.json and a @rock-js patch. Build tooling, no runtime navigation code.
    • fix: Public room loads infinitely — adjacent area and same author, but only touches src/libs/actions/User.ts and its test.
    • Part 5: Remove Onyx.connect() for the key: ONYXKEYS.SESSION in src/libs/ReportUtils.ts — touches ReportUtils, but the blocked code returns before reaching any ReportUtils call in this flow.
    • No PR in this release touches src/DeepLinkHandler.tsx, src/libs/Navigation/NavigationRoot.tsx, src/libs/Navigation/AppNavigator/AuthScreens*, PublicScreens.tsx, linkingConfig/subscribe.ts or src/libs/actions/Session/ (checked the file list of all 60 App PRs in the checklist via the GraphQL API).
    • Mobile-Expensify is not implicated: the redirect is driven entirely by App JS, and the App-side guard alone fully explains both the staging/production split and the symptom. (Mobile-Expensify PRs in this release were not readable from here, but no native change is needed to explain this.)

    Alternative resolution, if a revert is undesirable

    Keep the guard but give it a baseline — capture whether the deep-linked route was active when the handler was registered, and only skip when it was and no longer is:

    // Captured before waiting on sign-in / report data.
    const wasOnDeeplinkRoute = Navigation.isActiveRoute(route as Route);
    …
    if (wasOnDeeplinkRoute && !Navigation.isActiveRoute(deeplinkRoute)) {
        return;
    }

    That preserves the #96346 fix (anonymous user on the public room taps Sign in → wasOnDeeplinkRoute is true → skip) while restoring this flow (signed-out user on the sign-in page → wasOnDeeplinkRoute is false → navigate). Untested — it needs verification on iOS and Android native plus the #96346 repro before shipping, which is why a revert is the safer deploy-blocker action.

  7. lakchote commented on Sep 18, 2026

    @lakchote
    Contributor
  8. 6 remaining items

  9. m-natarajan commented on Sep 18, 2026

    @m-natarajan

    This issue is not repro on iPhone 11/26.2 Build 9.4.84-3

    ScreenRecording_09-18-2026.16-43-23_1.1.MP4
  10. melvin-bot commented on Sep 18, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  11. changed the title [-]iOS - Logged out user is not redirected to the correct conversation when navigate via link[/-] [+][Due for payment 2026-09-25] iOS - Logged out user is not redirected to the correct conversation when navigate via link[/+] on Sep 18, 2026
  12. melvin-bot commented on Sep 18, 2026

    @melvin-bot

    @abdulrahuman5196 / @aimane-chnaif / @nkdengineer

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.89-0 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 2026-09-25. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]

  13. aimane-chnaif commented on Sep 18, 2026

    @aimane-chnaif
    Contributor

    @lakchote can you please keep this open for payment? Thanks

  14. aimane-chnaif commented on Sep 21, 2026

    @aimane-chnaif
    Contributor

    @lakchote can you please keep this open for payment? Thanks

    kind bump ^

  15. aimane-chnaif commented on Sep 29, 2026

    @aimane-chnaif
    Contributor

    @mallenexpensify can you please help with payment?

    This was deploy blocker and I reviewed PR (context: https://expensify.slack.com/archives/C02NK2DQWUX/p1789729540120069)
    I didn't review offending PR

  16. mallenexpensify commented on Oct 1, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @aimane-chnaif due due $250 via NewDot

  17. garrettmknight commented on Oct 12, 2026

    @garrettmknight
    Contributor

    $250 approved for @aimane-chnaif

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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions