tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
81.78k stars 2.45k forks source link

[bug] [android] 2 crash errors appear when publishing the app to the Google Play Console - blocking the app from being published #8685

Open guillemcordoba opened 7 months ago

guillemcordoba commented 7 months ago

Describe the bug

I get these two errors when publishing an app to the Google Play Console:

Crash 1:

backtrace:
  #00  pc 0x000000000005e50f  /apex/com.android.runtime/lib64/bionic/libc.so (abort+191)
  #01  pc 0x000000000331d726  /data/app/~~m6ovmgBqNij-NoeZ2uxd-w==/studio.darksoil.rostanga-TYG1mBsm0AMdvXAFQu9bFw==/split_config.x86_64.apk (panic_abort::__rust_start_panic::abort::h00bda1d37cffc685+6)
  #02  pc 0x000000000331d71a  /data/app/~~m6ovmgBqNij-NoeZ2uxd-w==/studio.darksoil.rostanga-TYG1mBsm0AMdvXAFQu9bFw==/split_config.x86_64.apk (__rust_start_panic+10)
  #03  pc 0x000000000330c0e9  /data/app/~~m6ovmgBqNij-NoeZ2uxd-w==/studio.darksoil.rostanga-TYG1mBsm0AMdvXAFQu9bFw==/split_config.x86_64.apk (rust_panic+9)
  #04  pc 0x000000000330bf5a  /data/app/~~m6ovmgBqNij-NoeZ2uxd-w==/studio.darksoil.rostanga-TYG1mBsm0AMdvXAFQu9bFw==/split_config.x86_64.apk (std::panicking::rust_panic_with_hook::hf01daa965ea591a8+714)
  #05  pc 0x000000000330bc30  /data/app/~~m6ovmgBqNij-NoeZ2uxd-w==/studio.darksoil.rostanga-TYG1mBsm0AMdvXAFQu9bFw==/split_config.x86_64.apk (std::panicking::begin_panic_handler::_$u7b$$u7b$closure$u7d$$u7d$::h2398addfcbbf3d57+128)
  #06  pc 0x000000000330a745  /data/app/~~m6ovmgBqNij-NoeZ2uxd-w==/studio.darksoil.rostanga-TYG1mBsm0AMdvXAFQu9bFw==/split_config.x86_64.apk (std::sys_common::backtrace::__rust_end_short_backtrace::h562283b38bc130b1+5)
  #07  pc 0x000000000330b9c1  /data/app/~~m6ovmgBqNij-NoeZ2uxd-w==/studio.darksoil.rostanga-TYG1mBsm0AMdvXAFQu9bFw==/split_config.x86_64.apk (rust_begin_unwind+113)
  #08  pc 0x00000000033343d2  /data/app/~~m6ovmgBqNij-NoeZ2uxd-w==/studio.darksoil.rostanga-TYG1mBsm0AMdvXAFQu9bFw==/split_config.x86_64.apk (core::panicking::panic_fmt::hcc22a3f6405a48a9+50)
  #09  pc 0x0000000003334462  /data/app/~~m6ovmgBqNij-NoeZ2uxd-w==/studio.darksoil.rostanga-TYG1mBsm0AMdvXAFQu9bFw==/split_config.x86_64.apk (core::panicking::panic::h49dc900df7609858+66)
  #10  pc 0x0000000002889e0f  /data/app/~~m6ovmgBqNij-NoeZ2uxd-w==/studio.darksoil.rostanga-TYG1mBsm0AMdvXAFQu9bFw==/split_config.x86_64.apk (ndk_context::initialize_android_context::h908aaf73ab621e34+55)
  #11  pc 0x00000000026c9102  /data/app/~~m6ovmgBqNij-NoeZ2uxd-w==/studio.darksoil.rostanga-TYG1mBsm0AMdvXAFQu9bFw==/split_config.x86_64.apk (tao::platform_impl::platform::ndk_glue::create::hf719df2d6607afd4+361)
  #12  pc 0x00000000003a03ab  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+219)
  #13  pc 0x0000000000395094  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+756)
  #14  pc 0x000000000041da7a  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+218)
  #15  pc 0x00000000005a346c  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+428)
  #16  pc 0x000000000059ddb7  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, true>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+2023)
  #17  pc 0x0000000000979862  /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1442)
  #18  pc 0x000000000037e899  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+25)
  #19  pc 0x00000000001fc196  /data/app/~~m6ovmgBqNij-NoeZ2uxd-w==/studio.darksoil.rostanga-TYG1mBsm0AMdvXAFQu9bFw==/oat/x86_64/base.vdex (studio.darksoil.rostanga.WryActivity.onCreate+6)
  #20  pc 0x0000000000594c52  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool)+306)
  #21  pc 0x0000000000959a2f  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1007)
  #22  pc 0x00000000003a053c  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+140)
  #23  pc 0x000000000038c945  /apex/com.android.art/lib64/libart.so (nterp_helper+3837)
  #24  pc 0x00000000001d0672  /system/framework/framework.jar (android.app.Activity.performCreate+158)
  #25  pc 0x000000000038c8e0  /apex/com.android.art/lib64/libart.so (nterp_helper+3736)
  #26  pc 0x00000000001d05ba  /system/framework/framework.jar (android.app.Activity.performCreate+2)
  #27  pc 0x000000000038c8e0  /apex/com.android.art/lib64/libart.so (nterp_helper+3736)
  #28  pc 0x000000000023f49a  /system/framework/framework.jar (android.app.Instrumentation.callActivityOnCreate+6)
  #29  pc 0x0000000000395094  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+756)
  #30  pc 0x000000000041da7a  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+218)
  #31  pc 0x00000000005a346c  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+428)
  #32  pc 0x000000000059ddb7  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, true>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+2023)
  #33  pc 0x0000000000971ccf  /apex/com.android.art/lib64/libart.so (MterpInvokeSuper+4095)
  #34  pc 0x000000000037e819  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_super+25)
  #35  pc 0x00000000000f740a  /data/app/~~cjiBvTiLVZC6iG6Ad6lw8w==/androidx.test.tools.crawler-1dMVd3cUBQuoEX2_wU9xMw==/oat/x86_64/base.vdex (androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate+14)
  #36  pc 0x0000000000594c52  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool)+306)
  #37  pc 0x0000000000959a2f  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1007)
  #38  pc 0x00000000003a053c  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+140)
  #39  pc 0x000000000038c945  /apex/com.android.art/lib64/libart.so (nterp_helper+3837)
  #40  pc 0x00000000001bf608  /system/framework/framework.jar (android.app.ActivityThread.performLaunchActivity+892)
  #41  pc 0x000000000038c8e0  /apex/com.android.art/lib64/libart.so (nterp_helper+3736)
  #42  pc 0x00000000001bf212  /system/framework/framework.jar (android.app.ActivityThread.handleLaunchActivity+126)
  #43  pc 0x000000000038c8e0  /apex/com.android.art/lib64/libart.so (nterp_helper+3736)
  #44  pc 0x00000000002c91d8  /system/framework/framework.jar (android.app.servertransaction.LaunchActivityItem.execute+24)
  #45  pc 0x000000000038c8e0  /apex/com.android.art/lib64/libart.so (nterp_helper+3736)
  #46  pc 0x00000000002cb72e  /system/framework/framework.jar (android.app.servertransaction.TransactionExecutor.executeCallbacks+154)
  #47  pc 0x000000000038c8e0  /apex/com.android.art/lib64/libart.so (nterp_helper+3736)
  #48  pc 0x00000000002cb66a  /system/framework/framework.jar (android.app.servertransaction.TransactionExecutor.execute+146)
  #49  pc 0x000000000038c8e0  /apex/com.android.art/lib64/libart.so (nterp_helper+3736)
  #50  pc 0x00000000001be522  /system/framework/framework.jar (android.app.ActivityThread$H.handleMessage+254)
  #51  pc 0x000000000207e6f7  /memfd:jit-zygote-cache (android.os.Handler.dispatchMessage+183)
  #52  pc 0x000000000202ae17  /memfd:jit-cache (android.os.Looper.loopOnce+1431)
  #53  pc 0x000000000209b576  /memfd:jit-zygote-cache (android.os.Looper.loop+550)
  #54  pc 0x000000000038baed  /apex/com.android.art/lib64/libart.so (nterp_helper+165)
  #55  pc 0x00000000001c8a1e  /system/framework/framework.jar (android.app.ActivityThread.main+202)
  #56  pc 0x00000000003953f6  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+806)
  #57  pc 0x000000000041da89  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+233)
  #58  pc 0x00000000008194c2  /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1442)
  #59  pc 0x0000000000772698  /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+56)
  #60  pc 0x00000000000b5a30  /apex/com.android.art/javalib/x86_64/boot.oat (art_jni_trampoline+144)
  #61  pc 0x000000000038c945  /apex/com.android.art/lib64/libart.so (nterp_helper+3837)
  #62  pc 0x000000000024a7e2  /system/framework/framework.jar (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
  #63  pc 0x000000000038d63d  /apex/com.android.art/lib64/libart.so (nterp_helper+7157)
  #64  pc 0x0000000000250774  /system/framework/framework.jar (com.android.internal.os.ZygoteInit.main+612)
  #65  pc 0x00000000003953f6  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+806)
  #66  pc 0x000000000041da89  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+233)
  #67  pc 0x0000000000819e71  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, __va_list_tag*)+465)
  #68  pc 0x00000000006ce81c  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, __va_list_tag*)+620)
  #69  pc 0x00000000000d2884  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+164)
  #70  pc 0x00000000000def81  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+865)
  #71  pc 0x0000000000002f9f  /system/bin/app_process64 (main+1599)
  #72  pc 0x000000000004ffb9  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+89)

This was detected on one device during testing:

Device: Generic Small Desktop (x86) (virtual) Screen Size: 1366x768 Android version: Android 12L (SDK 32) ABI: x86_64


2nd crash:

Exception java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__atomic_is_lock_free" referenced by "/data/app/studio.darksoil.rostanga-p2ThA-NHw4is6IbfERh8EA==/split_config.x86.apk!/lib/x86/librostanga_lib.so"...
  at java.lang.Runtime.loadLibrary0 (Runtime.java:1016)
  at java.lang.System.loadLibrary (System.java:1669)
  at studio.darksoil.rostanga.WryActivity.<clinit> (WryActivity.java)
  at java.lang.Class.newInstance
  at android.app.AppComponentFactory.instantiateActivity (AppComponentFactory.java:69)
  at androidx.core.app.CoreComponentFactory.instantiateActivity
  at android.app.Instrumentation.newActivity (Instrumentation.java:1215)
  at androidx.test.runner.MonitoringInstrumentation.newActivity (MonitoringInstrumentation.java:11)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2831)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3048)
  at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:78)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:108)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:68)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1808)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:193)
  at android.app.ActivityThread.main (ActivityThread.java:6669)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:858)

This was detected on one device during testing:

Device: Google Pixel 2 (virtual) Screen Size: 1080x1920 Android version: Android 9 (SDK 28) ABI: x86


These were found in an app that I published to their closed testing program, which automatically detects issues that you would have before deploying to production and blocks you from deploying to production until those are resolved. The app was still accepted in its closed testing program, and it worked on all devices in which it was installed. Which makes me think that these particular emulators are problematic? But Google is using them to test the apps so we are blocked by this.

AFAIU this means that tauri apps can't be published to the Play Store.

Reproduction

  1. Build a tauri app with tauri.
  2. Publish it to the play console.

Expected behavior

The Google Play Console does not find any errors with the apps that are only tauri related.

Full tauri info output

[holonix:~/projects/darksoil/rostanga]$ npm run tauri info

> rostanga@0.0.0 tauri
> tauri info

[✔] Environment
    - OS: Ubuntu 22.04 X64
    ✔ webkit2gtk-4.1: 2.42.4
    ✔ rsvg2: 2.57.0
    ✔ rustc: 1.71.1 (eb26296b5 2023-08-03)
    ✔ cargo: 1.71.1 (7f1d04c00 2023-07-29)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: 1.71-x86_64-unknown-linux-gnu (default)
    - node: 18.19.0
    - yarn: 1.22.21
    - npm: 10.2.3

[-] Packages
    - tauri [RUST]: 2.0.0-alpha.20
    - tauri-build [RUST]: 2.0.0-alpha.14
    - wry [RUST]: 0.35.1
    - tao [RUST]: git+https://github.com/guillemcordoba/tao?branch=dev#53ce9b3381a63dd20e2a1c6401bc006c22288153 (0.24.0)
    - tauri-cli [RUST]: 2.0.0-alpha.18
    - @tauri-apps/api [NPM]: 2.0.0-alpha.13
    - @tauri-apps/cli [NPM]: 2.0.0-alpha.20

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - bundler: Vite

Stack trace

No response

Additional context

No response

tweidinger commented 1 month ago

Can you please verify the issue persists with the latest release candidate and is not caused by application specific code?

We are aware of successfully published applications without these crashes.

guillemcordoba commented 1 month ago

Will do when I get a chance. Thanks!