bugsnag / bugsnag-unity

Automatic error reporting for Unity games
https://docs.bugsnag.com/platforms/unity
MIT License
90 stars 31 forks source link

Couldn't find "libbugsnag-ndk.so on Android #370

Closed my-and-mail closed 3 years ago

my-and-mail commented 3 years ago

Describe the bug

The application freezes at the start. If I remove the Bugsang library, then everything is fine. According to my observations, this appeared after turning on ARM64

Error messages

AndroidPlayer(Xiaomi_M2004J19C@192.168.1.34) AndroidJavaException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.MyAppName-f-u6wX4X056oVFDhqZvo5g==/base.apk"],nativeLibraryDirectories=[/data/app/com.MyAppName-f-u6wX4X056oVFDhqZvo5g==/lib/arm64, /data/app/com.MyAppName-f-u6wX4X056oVFDhqZvo5g==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]] couldn't find "libbugsnag-ndk.so" java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.MyAppName-f-u6wX4X056oVFDhqZvo5g==/base.apk"],nativeLibraryDirectories=[/data/app/com.MyAppName-f-u6wX4X056oVFDhqZvo5g==/lib/arm64, /data/app/com.MyAppName-f-u6wX4X056oVFDhqZvo5g==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]] couldn't find "libbugsnag-ndk.so" at java.lang.Runtime.loadLibrary0(Runtime.java:1067) at java.lang.Runtime.loadLibrary0(Runtime.java:1007) at java.lang.System.loadLibrary(System.java:1667) at com.bugsnag.android.NdkPlugin.(NdkPlugin.kt:9) at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:454) at java.lang.Class.forName(Class.java:379) at com.bugsnag.android.Client.(Client.java:240) at com.unity3d.player.UnityPlayer.nativeRender(Native Method) at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0) at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:224) at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20) at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.AndroidJNISafe.NewObject (System.IntPtr clazz, System.IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.AndroidJavaObject._AndroidJavaObject (System.String className, System.Object[] args) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.AndroidJavaObject..ctor (System.String className, System.Object[] args) [0x00000] in <00000000000000000000000000000000>:0 at BugsnagUnity.NativeInterface..ctor (UnityEngine.AndroidJavaObject config) [0x00000] in <00000000000000000000000000000000>:0 at BugsnagUnity.Configuration..ctor (System.String apiKey, System.Boolean autoNotify) [0x00000] in <00000000000000000000000000000000>:0 at BugsnagUnity.Bugsnag.Init (System.String apiKey, System.Boolean autoNotify) [0x00000] in <00000000000000000000000000000000>:0 at BugsnagUnity.BugsnagBehaviour.Awake () [0x00000] in <00000000000000000000000000000000>:0

(Filename: currently not available on il2cpp Line: -1)

Environment

luke-belton commented 3 years ago

Hi @my-and-mail. We've seen similar errors to this before - please see https://github.com/bugsnag/bugsnag-react-native/issues/369.

We believe this error occurs when users side-load an APK split generated from an App Bundle which is the wrong architecture for their device. Keepsafe wrote a great blog post where they found similar behaviour was caused by users downloading the wrong APK from a 3rd party source.

Please see the FAQs section for our Android notifier to see how you can reduce the incidence of these errors.