Open loikki opened 8 months ago
My findings are that anything running Android older than "11.0.0/version 30/R" is not going to work out of the box, even then it still has issues.
Oldest Android with no noticeable issues was "12.0.0/Version 31/S".
The resulting incompatibilities just grew to be more catastrophic on default configuration with the older versions past 12.0.0/Version 31/S.
I created a test application with cargo create-tauri-app --beta with React/TS and mobile. I used android studio to download and run each major release from the recommended images with google APIs:
Total crash. Fatal Exception at Main.
02-13 00:11:00.134 3786 3786 E AndroidRuntime: FATAL EXCEPTION: main
02-13 00:11:00.134 3786 3786 E AndroidRuntime: Process: com.tauri.test, PID: 3786
02-13 00:11:00.134 3786 3786 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Ljava/lang/BootstrapMethodError;
Total crash. Fatal Exception at Main.
02-13 00:05:15.778 3183 3183 E AndroidRuntime: FATAL EXCEPTION: main
02-13 00:05:15.778 3183 3183 E AndroidRuntime: Process: com.tauri.test, PID: 3183
02-13 00:05:15.778 3183 3183 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Ljava/lang/BootstrapMethodError;
Total crash. Fatal signal 6 (SIGABRT)
Something with WebKit Tracing Controller, WebView Seed files, and missing non-static method
02-12 23:59:00.251 3934 3934 F zygote : java_vm_ext.cc:504] JNI DETECTED ERROR IN APPLICATION: JNI CallObjectMethod called with pending exception java.lang.NoSuchMethodError: no non-static method "Lcom/tauri/test/MainActivity;.setWebView(Lcom/tauri/test/RustWebView;)V"
Partial crash . App was running but view had nothing within. Something with WebKit Tracing Controller, WebView Seed files, and OpenGL
02-12 23:50:54.132 4154 4154 I zygote : Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.TracingController" on path: DexPathList[[zip file "/system/app/Chrome/Chrome.apk"],nativeLibraryDirectories=[/system/app/Chrome/lib/x86, /system/app/Chrome/Chrome.apk!/lib/x86, /system/lib, /vendor/lib, /system/lib, /vendor/lib]]
02-12 23:50:54.190 4154 4199 E cr_VariationsUtils: Failed reading seed file "/data/user/0/com.tauri.test/app_webview/variations_seed_new": /data/user/0/com.tauri.test/app_webview/variations_seed_new (No such file or directory)
02-12 23:50:54.190 4154 4199 E cr_VariationsUtils: Failed reading seed file "/data/user/0/com.tauri.test/app_webview/variations_seed": /data/user/0/com.tauri.test/app_webview/variations_seed (No such file or directory)
Partial Crash. App was running but view had nothing within. Something with WebView seed files and OpenGL
02-12 23:46:05.495 4305 4388 E cr_VariationsUtils: Failed reading seed file "/data/user/0/com.tauri.test/app_webview/variations_seed_new": /data/user/0/com.tauri.test/app_webview/variations_seed_new (No such file or directory)
02-12 23:46:05.495 4305 4388 E cr_VariationsUtils: Failed reading seed file "/data/user/0/com.tauri.test/app_webview/variations_seed": /data/user/0/com.tauri.test/app_webview/variations_seed (No such file or directory)
02-12 23:46:06.071 4305 4380 E eglCodecCommon: GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1
02-12 23:46:06.076 4305 4454 E chromium: [ERROR:gl_surface_egl.cc(335)] eglChooseConfig failed with error EGL_SUCCESS
Partial Crash. App was running but view had nothing within. Something to do with WebView
02-12 23:41:58.614 4575 4575 I cr_BrowserStartup: Initializing chromium process, singleProcess=false
02-12 23:41:58.672 4575 4575 E chromium: [ERROR:filesystem_posix.cc(89)] stat /data/user/0/com.tauri.test/cache/WebView/Crashpad: No such file or directory (2)
02-12 23:41:58.672 4575 4575 E chromium: [ERROR:filesystem_posix.cc(62)] mkdir /data/user/0/com.tauri.test/cache/WebView/Crashpad: No such file or directory (2)
02-12 23:41:58.673 4575 4632 I RustStdoutStderr: [ERROR:filesystem_posix.cc(89)] stat /data/user/0/com.tauri.test/cache/WebView/Crashpad: No such file or directory (2)
02-12 23:41:58.673 4575 4632 I RustStdoutStderr: [ERROR:filesystem_posix.cc(62)] mkdir /data/user/0/com.tauri.test/cache/WebView/Crashpad: No such file or directory (2)
Kinda worked. OpenGL issues.
02-13 00:15:39.921 6452 6493 I Gralloc4: mapper 4.x is not supported
02-13 00:15:40.050 6452 6452 E chromium: [ERROR:gl_surface_egl.cc(549)] eglChooseConfig failed with error EGL_SUCCESS
No noticed issues
No noticed issues
No noticed issues
No noticed issues
There are 2 major issues to solve on Android 7.0 and above.
WryActivity
in wry
has private fun setWebView
. It needs to be public in order to prevent crashes on 8.0 and below.com.fasterxml.jackson.core:jackson-databind:2.15.3
(and any version after 2.13) won't work on Android 7.0 (API 24) and belowI think this issue should now be renamed to
[bug] New app fails on android version <= 7
Are the versions between 7 and 12 confirmed to work now? The issues from https://github.com/tauri-apps/tauri/issues/8788#issuecomment-2121804733 should indeed be fixed but was that it?
If it works then i think we could actually close this because versions below 7 are currently considered out of scope.
My old phone is using android 7, so I cannot test it on a real phone
My phone is running Android 12 OneUI and android 13 OneUI. Need to test on emulators
Android 8 Oreo
My old phone is using android 7, so I cannot test it on a real phone
Well, according to our readme, we want 7 to work too. I think my comment above was incorrect, iirc we didn't downgrade jackson-databind yet.
P.S. Thanks for testing ahq
Android Pie 9
My old phone is using android 7, so I cannot test it on a real phone
Well, according to our readme, we want 7 to work too. I think my comment above was incorrect, iirc we didn't downgrade jackson-databind yet.
P.S. Thanks for testing ahq
7 is really out of support though I would say
its support ended on October 1, 2019
and very few devices really run nougat
Yeah, but if it's just that package downgrade and not major code changes I think the extra 3-4% of supported devices wouldn't hurt
Yeah, but if it's just that package downgrade and not major code changes I think the extra 3-4% of supported devices wouldn't hurt
Users can update that right? Also, I think this issue is now resolved if that package downgrade is successful
Describe the bug
Hi,
Thanks for this amazing project!
I tried to create a new empty project with
create-tauri-app
and it works fine on my recent phone (FP4) but crashes on my old table (android 7; Galaxy Tab S2).If you need anything else, I will be happy to help but I don't have a lot of experience with Android.
Reproduction
❯ cargo create-tauri-app --alpha ✔ Project name · second ✔ Choose which language to use for your frontend · TypeScript / JavaScript - (pnpm, yarn, npm) ✔ Choose your package manager · npm ✔ Choose your UI template · React - (https://reactjs.org/) ✔ Choose your UI flavor · TypeScript ✔ Would you like to setup the project for mobile as well? · yes
cd second npm i // change bundle identifer to com.second.dev npm run tauri android init npm run tauri android dev
Expected behavior
The app should not crash
Full
tauri info
outputStack trace
Additional context
No response