Skip to content

fix(mobile): Agent's browser and browser preview no longer crash on open - #665

Merged
JustYannicc merged 1 commit into
mainfrom
fix/mobile-native-stack-crash
Oct 16, 2026
Merged

JustYannicc merged 1 commit into
mainfrom
fix/mobile-native-stack-crash

Conversation

@JustYannicc

@JustYannicc JustYannicc commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Problem

On mobile, opening Agent's browser (fork) or the browser preview (upstream) throws Render Error: undefined is not a function in createNativeStackNavigator.js. Closes #662 and #619: they're the same bug.

pnpm-workspace.yaml overrides @react-navigation/core to 7.21.13 (added upstream in pingdotgg/t3code#10663 for TypeScript 7). Upstream's Expo bump (#20067) then moved @react-navigation/native to 7.5.1, which requires core ^7.24.0, and native-stack to 7.21.0, which calls the render() that useNavigationBuilder only returns from newer core. The override silently forced the old core, so every plain createNativeStackNavigator throws on mount. The app's own stacks use createV5StackNavigator (which reads NavigationContent), so on iOS only the two nested-stack screens crash; on Android upstream reports it crashes at launch.

Fix

  • Move the override to 7.24.0. This is byte-for-byte the workspace change in upstream's open fix(mobile): the app builds and launches again after the Expo update pingdotgg/t3code#20131, so the next upstream merge applies cleanly. 7.24.0 still returns the deprecated NavigationContent, so the custom navigators keep working, and the mobile typecheck passes, so the TypeScript 7 problem the override exists for doesn't come back.
  • Lockfile trimmed to the navigation change only (core 7.24.0, routers 7.6.5, query-string and its deps dropped); pnpm install --frozen-lockfile passes.
  • apps/mobile/src/navigation-dependencies.test.ts walks the installed @react-navigation/* graph from the app and fails when any package resolves outside another's declared range. It fails on main with @react-navigation/native@7.5.1 wants @react-navigation/core@^7.24.0, got 7.21.13 and passes here. That's the guard for the next time the override doesn't move with native.

Verification

Agent's browser Browser preview (upstream screen)
Before (main)
After

Upstream: pingdotgg/t3code#20131 (open, not ours) already makes this exact override change for the Android launch crash but couldn't check iOS. A comment with the iOS evidence is drafted in upstream-drafts/20131-ios-comment.md, not posted.

🤖 Generated with Claude Code

The workspace pinned @react-navigation/core to 7.21.13 for TypeScript 7.
@react-navigation/native 7.5.1 needs core ^7.24.0, and native-stack 7.21.0
calls the render() that only newer core returns, so every plain native
stack threw 'undefined is not a function' on mount. Move the override to
7.24.0, the same change as pingdotgg/t3code#20131, and add a test that
fails when a React Navigation package resolves outside its declared range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JustYannicc

JustYannicc commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner Author

From the #654 review: with this PR applied locally on an iOS 26.5 simulator against the #654 preview, Agent's browser opened without the crash, and the #579 banner, status and Done all worked. The mirror area itself stayed blank on mobile, though: both while resting and while someone drove the tab from web, where the page rendered fine. Please check that the WebView renders the mirror once the crash is fixed; it may be a separate issue.

@JustYannicc
JustYannicc merged commit e575184 into main Oct 16, 2026
39 of 41 checks passed
@JustYannicc
JustYannicc deployed to cloud-preview October 16, 2026 19:32 — with GitHub Actions Active
@JustYannicc
JustYannicc deleted the fix/mobile-native-stack-crash branch October 16, 2026 19:33
@JustYannicc

Copy link
Copy Markdown
Owner Author

Merged by the coordinator. CI was green on the head, with no bot findings. The builder's live proof is in this PR. A scratch merge of current main with #665, #706, #688, #693 and #651 passed: contracts 676 tests, automations 24, the api parity check 21, cloud GitHub and automations 38, mobile 17, plus server layer, compiler and upstream-sync hook tests. Typecheck was clean for contracts, cloud, server, web and mobile.

This branch was successfully deployed

1 active deployment
cloud-preview — 97d9ad64 Deployed Oct 16, 2026 by JustYannicc via Delete preview cloud #721
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile: Agent's browser crashes on open (native-stack 7.21.0 vs core 7.21.13)

1 participant