Skip to content

Android: tao 0.35 panics with JavaException in onActivityCreate (post HOME-fix) #8

@oscarvalenzuelab

Description

@oscarvalenzuelab

Summary

After PR #7 fixes the early HOME / identities-root crash, the APK
gets further into startup but panics inside Tauri's Android JNI
bridge before the activity's UI ever attaches.

Stack

```
RustStdoutStderr: thread '' (12097) panicked at
/Users/.../tao-0.35.0/src/platform_impl/android/ndk_glue.rs:393:6:
called `Result::unwrap()` on an `Err` value: JavaException
Java_io_dnsmesh_desktop_Rust_onActivityCreate
F libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid (...)
```

The `tao` crate's `unwrap()` on the JNI result swallows the actual
Java exception, so logcat doesn't tell us which Java call failed.
Activity never reaches its first frame.

Reproduction

  • macOS host, Android Studio not installed (just SDK/NDK via cmdline-tools)
  • AVD: Pixel 6, Android 14 (API 34, `google_apis;arm64-v8a`)
  • Android System WebView: present (com.google.android.webview v113)
  • Build:

```sh
cargo tauri android build --apk
apksigner sign --ks ~/.android/debug.keystore --ks-pass pass:android \
--key-pass pass:android --ks-key-alias androiddebugkey \
--out signed.apk app-universal-release-unsigned.apk
adb install -r signed.apk
adb shell am start -n io.dnsmesh.desktop/.MainActivity
```

Versions

  • tauri 2.11.0
  • tao 0.35.0
  • wry 0.55.0
  • NDK r26d (26.3.11579264)
  • AGP / build-tools 34.0.0
  • compileSdkVersion 36 (Tauri default), targetSdkVersion 36

Things I'd try next

  1. Run with `RUST_BACKTRACE=full` set on the activity environment so
    the panic stack widens past `__rust_end_short_backtrace`.
  2. `adb logcat | grep AndroidRuntime` for the Java side of the
    exception — there may be a stack trace from the JVM that isn't in
    the Rust panic output.
  3. Try `google_apis_playstore` system image (different WebView
    provider) to isolate whether this is WebView-config related.
  4. Pin to an older tao / Tauri to bisect (tao changed its Android
    activity bootstrap a few releases back).
  5. Try `cargo tauri android dev` — its JNI debug attach may surface
    a clearer Java stack.

Why this matters

Blocks the Android client from showing its first frame. Until this is
fixed, the APK that ships with each `desktop-v*` release is install-
only — sideloads onto a device and immediately crashes.

Related: the CI APK is currently shipped unsigned (separate
follow-up — the workflow needs a debug-signing step at minimum so
sideloads at least install).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions