Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crash due to missing libraries for x86, armeabi-v7a, armeabi #341

Open
shakil-bin-karim opened this issue Sep 20, 2024 · 4 comments
Open

Comments

@shakil-bin-karim
Copy link

shakil-bin-karim commented Sep 20, 2024

Description

We are encountering a crash in our Android app for some phones when using the Rive Android library. The app crashes on startup with the following error:

androidx.startup.StartupException: com.getkeepsafe.relinker.MissingLibraryException: Could not find 'librive-android.so'. Looked for: [x86, armeabi-v7a, armeabi], but only found: [arm64-v8a].

This indicates that the librive-android.so native library is missing for certain architectures, specifically x86, armeabi-v7a, and armeabi. The app only includes the library for the arm64-v8a architecture.

Provide a Repro

The crash occurs when running the app on devices with architectures other than arm64-v8a, such as armeabi-v7a or x86.

Steps to reproduce the issue:

  1. Integrate the Rive Android library into your Android app.
  2. Build and run the app on device with an armeabi-v7a or x86 architecture.
  3. Observe that the app crashes on startup with the missing library error.

Source .riv/.rev file

N/A – The issue occurs during app initialization, before any .riv files are loaded.

Expected behavior

The app should start without crashing, and the librive-android.so library should be correctly loaded for all supported architectures (armeabi-v7a, arm64-v8a, x86, etc.).

Screenshots

N/A

Device & Versions (please complete the following information)

  • Device: Various devices with devices with no arm64-v8a architecture from manufactures like ZTE, Oppo, Older Samsung devices, etc.
  • SDK Level: Android SDK API Level 35

Additional context

Here are the full stack traces from Firebase Crashlytics:

Fatal Exception: java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: com.getkeepsafe.relinker.MissingLibraryException: Could not find 'librive-android.so'. Looked for: [x86, armeabi-v7a, armeabi], but only found: [arm64-v8a].
       at android.app.ActivityThread.installProvider(ActivityThread.java:5927)
       at android.app.ActivityThread.installContentProviders(ActivityThread.java:5516)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5455)
       at android.app.ActivityThread.-wrap2(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1550)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6190)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:892)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782)
Caused by androidx.startup.StartupException: com.getkeepsafe.relinker.MissingLibraryException: Could not find 'librive-android.so'. Looked for: [x86, armeabi-v7a, armeabi], but only found: [arm64-v8a].
       at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:187)
       at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:238)
       at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:206)
       at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:45)
       at android.content.ContentProvider.attachInfo(ContentProvider.java:1751)
       at android.content.ContentProvider.attachInfo(ContentProvider.java:1726)
       at android.app.ActivityThread.installProvider(ActivityThread.java:5924)
       at android.app.ActivityThread.installContentProviders(ActivityThread.java:5516)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5455)
       at android.app.ActivityThread.-wrap2(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1550)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6190)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:892)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782)
Caused by com.getkeepsafe.relinker.MissingLibraryException: Could not find 'librive-android.so'. Looked for: [x86, armeabi-v7a, armeabi], but only found: [arm64-v8a].
       at com.getkeepsafe.relinker.ApkLibraryInstaller.installLibrary(ApkLibraryInstaller.java:175)
       at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:180)
       at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136)
       at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:70)
       at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:51)
       at app.rive.runtime.kotlin.core.Rive.init(Rive.kt:42)
       at app.rive.runtime.kotlin.core.Rive.init$default(Rive.kt:37)
       at app.rive.runtime.kotlin.RiveInitializer.create(RiveInitializer.kt:34)
       at app.rive.runtime.kotlin.RiveInitializer.create(RiveInitializer.kt:32)
       at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:180)
       at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:238)
       at androidx.startup.AppInitializer.discoverAndInitialize(AppInitializer.java:206)
       at androidx.startup.InitializationProvider.onCreate(InitializationProvider.java:45)
       at android.content.ContentProvider.attachInfo(ContentProvider.java:1751)
       at android.content.ContentProvider.attachInfo(ContentProvider.java:1726)
       at android.app.ActivityThread.installProvider(ActivityThread.java:5924)
       at android.app.ActivityThread.installContentProviders(ActivityThread.java:5516)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5455)
       at android.app.ActivityThread.-wrap2(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1550)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6190)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:892)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782)
@sherbaev
Copy link

I am facing the same issue with mainly google phones

Screenshot 2024-09-24 at 09 19 52

Screenshot 2024-09-24 at 09 18 05

@evarouss
Copy link

evarouss commented Oct 4, 2024

Hello, same here.

Crash is not limited to Google Phones.
The main problem is that the crash occurs on the emulators used by Google to review apps. As a consequence our app keeps being rejected because of this issue.

image

@sherbaev @shakil-bin-karim were you able to troubleshoot or mitigate the issue ?

@JohnEstropia
Copy link

I'd like to bump this again as it is blocking Android submissions for us. Any Rive devs here that could give us a status?

@DJPretorius
Copy link

I've had the same issue since September 2023 (my comments here).
This is not just limited to Emulators and happens on all Android versions. I'm currently using this library app.rive:rive-android:8.3.0. This is currently the most occurring crash on my Firebase Crashlytics.

@umberto-sonnino or @mjtalbot please can you offer some assistance.

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

No branches or pull requests

6 participants
@evarouss @JohnEstropia @DJPretorius @sherbaev @shakil-bin-karim and others