Skip to content

fix(android): remove duplicate native context initialization - #66

Merged
aamott merged 2 commits into
mainfrom
fix/android-startup-crash
Oct 17, 2026
Merged

aamott merged 2 commits into
mainfrom
fix/android-startup-crash

Conversation

@aamott

@aamott aamott commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Cause

Android startup initializes ndk-context twice. The app manually publishes the context before super.onCreate, but the locked tao 0.37.1 now publishes it itself in Rust_onCreate. The second initialization hits assert!(previous.is_none()) and aborts before the WebView or Rust stderr forwarding starts.

Changes

  • Remove the obsolete app-owned context JNI bridge and direct dependency; let Tauri/tao own its lifetime and startup ordering.
  • Preserve the separate rustls platform-verifier bootstrap and Android credential-store registration.
  • Add pnpm android:smoke: two cold launches of the installed app with stable-PID checks and diagnostic logcat on failure; never clears app data or logs.

Verification

  • Reproduced deterministic SIGABRT using the actual draft v0.5.0 universal release APK and a locally built minified release on Pixel_7a, Android 17/API 37, x86_64 (16 KB pages).
  • Regression smoke fails before the fix and passes after it; production-configured APK opens the existing workspace and preserves app data.
  • pnpm qa passes: lint, knip, typecheck, Rust formatting, 2,841 TypeScript tests and 599 Rust tests (2 ignored).
  • Reviewed against current main; no version bump or draft-release changes.

The existing draft release is deliberately untouched; its artifacts need a separate rebuild/update after this fix lands.

@aamott
aamott merged commit d82658a into main Oct 17, 2026
13 checks passed
@aamott
aamott deleted the fix/android-startup-crash branch October 17, 2026 19:20
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.

1 participant