rive-android icon indicating copy to clipboard operation
rive-android copied to clipboard

Can't find libandroid.so

Open feer921 opened this issue 10 months ago • 21 comments

Description

Caused by: com.getkeepsafe.relinker.MissingLibraryException: Could not find 'libandroid.so'. Looked for: [armeabi-v7a, armeabi], but only found: []. 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.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:92) at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:197) at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136) at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:92) at app.rive.runtime.kotlin.core.Rive.init(Rive.kt:57) at app.rive.runtime.kotlin.core.Rive.init$default(Rive.kt:46)

Versions, Device, and Other Information

  • Rive Android Runtime Version: 11.1.1
  • Rive API:
  • Device:
  • App Minimum SDK Level: 24
  • App Target SDK Level: 35
  • App NDK Level:
  • Frequency:
  • Other Rive runtimes affected:
  • Dependencies with native libraries:

Reproduction Steps

Source .riv/.rev File

Expected Behavior

Screenshots

Screenshot

Additional context

feer921 avatar Jan 27 '26 09:01 feer921

Same with simulator.

Process: com.ravenfeld.maps, PID: 7151
                                                                                                    java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: f6.c: com.getkeepsafe.relinker.MissingLibraryException: Could not find 'libandroid.so'. Looked for: [x86], but only found: [].
                                                                                                    	at android.app.ActivityThread.installProvider(ActivityThread.java:6288)
                                                                                                    	at android.app.ActivityThread.installContentProviders(ActivityThread.java:5851)
                                                                                                    	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5772)
                                                                                                    	at android.app.ActivityThread.-wrap1(Unknown Source)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:105)
                                                                                                    	at android.os.Looper.loop(Looper.java:164)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:6541)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
                                                                                                    Caused by: f6.c: com.getkeepsafe.relinker.MissingLibraryException: Could not find 'libandroid.so'. Looked for: [x86], but only found: [].

ravenfeld avatar Jan 30 '26 07:01 ravenfeld

I did see that for user on Chromebook 11 Model 3180 Android 9

Naitbit avatar Jan 31 '26 15:01 Naitbit

Hey, thank you for the report. We're aware of this and it's currently a top priority. Thank you for your patience while be debug this.

tylernij avatar Feb 13 '26 19:02 tylernij

If you need more statistics on devices on which this is occurring:

Image Image Image Image Image Image Image

archie94 avatar Feb 17 '26 02:02 archie94

I am experiencing the same issue as well. I am currently using the latest version (11.1.1).

hamidMehmoodAkram avatar Feb 18 '26 09:02 hamidMehmoodAkram

Is this fixed in the release 11.1.2?

eabdelmoaty avatar Feb 20 '26 13:02 eabdelmoaty

@eabdelmoaty This issue is not yet resolved, unfortunately. I'll be sure to write a note here when it's fixed.

tylernij avatar Feb 24 '26 20:02 tylernij

@tylernij, Please update. Is there a fix for this crash on SDK V 11.2.0?

eltohamy avatar Feb 27 '26 15:02 eltohamy

Is there a working version to roll back to?

danielkatfavor avatar Mar 01 '26 13:03 danielkatfavor

Is there a working version to roll back to?

10.3.3

amberkira avatar Mar 02 '26 03:03 amberkira

@tylernij, Please update. Is there a fix for this crash on SDK V 11.2.0?

We do not yet have a fix, but progress is being made. I'll be sure to update as soon as I have new information 👍

tylernij avatar Mar 02 '26 16:03 tylernij

Is there a working version to roll back to?

10.3.3

Based on my understanding, you may be able to get all the way to version 11.0.0 without being impacted by this, but I've not personally tried it, we definitely don't experience it on 10.5.3, which is the last version before 11.0.0

nshurtz avatar Mar 10 '26 19:03 nshurtz

Is there a working version to roll back to?

10.3.3

Based on my understanding, you may be able to get all the way to version 11.0.0 without being impacted by this, but I've not personally tried it, we definitely don't experience it on 10.5.3, which is the last version before 11.0.0

According to our data, 10.5.3 also causes the crash. With that said, we did go a full version with 10.5.3 without being impacted by this so I am confused. Put another way:

  1. We updated to 10.5.3 in version 1. No crashes in version 1 were observed.
  2. Version 2 released without updates to Rive. Crashes were observed.

danielkatfavor avatar Mar 11 '26 14:03 danielkatfavor

Is there a working version to roll back to?

10.3.3

Based on my understanding, you may be able to get all the way to version 11.0.0 without being impacted by this, but I've not personally tried it, we definitely don't experience it on 10.5.3, which is the last version before 11.0.0

According to our data, 10.5.3 also causes the crash. With that said, we did go a full version with 10.5.3 without being impacted by this so I am confused. Put another way:

  1. We updated to 10.5.3 in version 1. No crashes in version 1 were observed.
  2. Version 2 released without updates to Rive. Crashes were observed.

Are you sure the crashes you saw were specifically regarding failing to load libandroid.so and not a different .so file? We have had many releases on 10.5.3 and not seen libandroid.so relinker crashes. I actually did go back through our crashes and saw some on 10.5.1 but also not anywhere at the scale we saw with 11.1.0

nshurtz avatar Mar 26 '26 20:03 nshurtz

Is there a working version to roll back to?

10.3.3

Based on my understanding, you may be able to get all the way to version 11.0.0 without being impacted by this, but I've not personally tried it, we definitely don't experience it on 10.5.3, which is the last version before 11.0.0

According to our data, 10.5.3 also causes the crash. With that said, we did go a full version with 10.5.3 without being impacted by this so I am confused. Put another way:

  1. We updated to 10.5.3 in version 1. No crashes in version 1 were observed.
  2. Version 2 released without updates to Rive. Crashes were observed.

Are you sure the crashes you saw were specifically regarding failing to load libandroid.so and not a different .so file? We have had many releases on 10.5.3 and not seen libandroid.so relinker crashes. I actually did go back through our crashes and saw some on 10.5.1 but also not anywhere at the scale we saw with 11.1.0

Sure, I'll look this again and see.

danielkatfavor avatar Mar 27 '26 14:03 danielkatfavor

Has any progress been made on this, and a rough time to when this might be included in prod?

TehRaab avatar Apr 09 '26 08:04 TehRaab

STILL NO PROGRESS? RIVE TEAM SUCKS.....

amberkira avatar Apr 16 '26 09:04 amberkira

We don't have any solid leads on this as we haven't been able to reproduce locally. libandroid.so missing could be a red herring, since it's quite unlikely that the library itself is missing - it should be provided by the OS.

For those affected, there is one possibility that I'd like to see if it may be a shared root cause. Do your apps use "Play Feature Delivery" or "on demand feature delivery"? This would cause the APK to be split. If that's the case, it may be that librive-android.so which has libandroid.so as a dependency is loaded first triggering the above error, which would be re-interpreted not as "not found" but rather "not yet loaded". See this article in the docs.

For all those affected, if you could check if this is the case for your app, we can then look at solutions. It may be that you need to load the native Rive library yourself using e.g. SplitInstallHelper.loadLibrary.

ErikUggeldahl avatar Apr 23 '26 21:04 ErikUggeldahl

I've got a fix in progress that may advance the issue on this. The theory is that ReLinker's recursive linking attempts, in a failure mode, would attempt to resolve libandroid.so from the APK's lib folder, which will always fail. This failure would obscure the original failure to load librive_android.so which we want to surface. Once the patch is in, we should stop seeing this error but it may surface the true error, which we will need to fix separately. That is of course assuming the theory is correct!

ErikUggeldahl avatar Apr 23 '26 23:04 ErikUggeldahl

does 11.6.0 fix it?? Rive init cause many anr during application on create。。。。

amberkira avatar May 13 '26 04:05 amberkira