ARFoundation black screen issue on Android 11

Hi all,
Our QAs team and customers are reporting many issues with samsung devices with android 11 showing black screen when entering ARFoundation
For example: S20+ fw 11, S10+ fw 11
The issue does not occur with Pixel 2 fw 11 or Samsung Devices with android 10 or lower

Before it was fine but after we try to build with Target SDK 30 (as Google requirement for submission) the black screen occurs on fw 11

We are using AR Foundtion 4.1.7 with Unity 2020.3.16
Can anyone help us on this?
Cheers

1 Like

Today we are reported crashes with ARCore on samsung flagships while they are trying to load the arcore plugin

08-27 09:17:49.844: I/third_party/arcore/ar/core/android/sdk/session_create.cc(19046): Entering ArSession_createWithFeatures
08-27 09:17:49.844: I/third_party/arcore/ar/core/android/sdk/session_create.cc(19046): ARCore Version: SDK build name: 1.22
08-27 09:17:49.845: I/third_party/arcore/ar/core/android/sdk/session_create.cc(19046): ARCore Version: APK version code: 212010383
08-27 09:17:49.865: D/InputTransport(1120): Input channel destroyed: 'ClientS', fd=735
08-27 09:17:49.866: I/Zygote(775): Process 12755 exited due to signal 9 (Killed)
08-27 09:17:49.867: I/libprocessgroup(1120): Successfully killed process cgroup uid 10092 pid 12755 in 50ms
08-27 09:17:49.872: W/ActivityManager(1120): setHasOverlayUi called on unknown pid: 12755
08-27 09:17:49.873: I/SemDvfsHyPerManager(13607): acquire hyper - com.samsung.android.game.gos/13607@6, type = 536875010
08-27 09:17:49.875: I/CameraService(1129): UidPolicy: No processes running for a uid=10092 disabled=0
08-27 09:17:49.876: I/HYPER-HAL(870): [RequestManager.cpp]acquire(): Acquired ID : 92663697  [13607 / 6]    HINT :      list : [GPUMaxFreq / 345]
08-27 09:17:49.903: I/third_party/arcore/ar/core/android/sdk/session_create.cc(19046): Dynamite load ok.
08-27 09:17:49.903: I/third_party/arcore/java/com/google/vr/dynamite/client/native/dynamite_client.cc(19046): Attempting to load native library arcore_c from package com.google.ar.core
08-27 09:17:49.905: E/DynamiteClient(19046): Failed to load native library [packageName=com.google.ar.core,libraryName=arcore_c] from remote package:
08-27 09:17:49.905: E/DynamiteClient(19046):  
08-27 09:17:49.905: E/DynamiteClient(19046): java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/~~u_1pv7mhEcdnnbSpbvHKgQ==/com.google.ar.core-ln9aByaqxbuIVWB73BtlpA==/base.apk!/lib/arm64-v8a/libarcore_c.so" is 64-bit instead of 32-bit
08-27 09:17:49.905: E/DynamiteClient(19046):     at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
08-27 09:17:49.905: E/DynamiteClient(19046):     at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
08-27 09:17:49.905: E/DynamiteClient(19046):     at java.lang.System.loadLibrary(System.java:1664)
08-27 09:17:49.905: E/DynamiteClient(19046):     at com.google.vr.dynamite.NativeLibraryLoader.b(PG:5)
08-27 09:17:49.905: E/DynamiteClient(19046):     at com.google.vr.dynamite.NativeLibraryLoader.initializeAndLoadNativeLibrary(PG:2)
08-27 09:17:49.905: E/DynamiteClient(19046):     at gan.A(PG:6)
08-27 09:17:49.905: E/DynamiteClient(19046):     at agy.onTransact(PG:3)
08-27 09:17:49.905: E/DynamiteClient(19046):     at android.os.Binder.transact(Binder.java:1079)
08-27 09:17:49.905: E/DynamiteClient(19046):     at com.google.a.a.a.b(BaseProxy.java:2)
08-27 09:17:49.905: E/DynamiteClient(19046):     at com.google.vr.dynamite.client.b.initializeAndLoadNativeLibrary(INativeLibraryLoader.java:3)
08-27 09:17:49.905: E/DynamiteClient(19046):     at com.google.vr.dynamite.client.DynamiteClient.loadNativeRemoteLibrary(DynamiteClient.java:8)
08-27 09:17:49.905: E/DynamiteClient(19046):     at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
08-27 09:17:49.905: E/DynamiteClient(19046):     at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
08-27 09:17:49.905: E/DynamiteClient(19046):     at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
08-27 09:17:49.905: E/DynamiteClient(19046):     at android.os.Handler.dispatchMessage(Handler.java:102)
08-27 09:17:49.905: E/DynamiteClient(19046):     at android.os.Looper.loop(Looper.java:246)
08-27 09:17:49.905: E/DynamiteClient(19046):     at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
08-27 09:17:49.905: I/third_party/arcore/java/com/google/vr/dynamite/client/native/dynamite_client.cc(19046): Dynamite::LoadNativeRemoteLibrary handle=0
08-27 09:17:49.905: E/third_party/arcore/ar/core/android/sdk/session_create.cc(19046): Dynamite failed to load remote library
08-27 09:17:49.905: E/third_party/arcore/ar/core/android/sdk/session_create.cc(19046): LoadSymbolsDynamite returning AR_ERROR_FATAL.
08-27 09:17:49.905: E/third_party/arcore/ar/core/android/sdk/session_create.cc(19046): LoadSymbols returning status.
08-27 09:17:49.905: E/native(19046): session_manager.cc:56 ArPresto::ArCore session creation failed.
1 Like

The key message in your crash report is:
E/DynamiteClient(19046): java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/~~u_1pv7mhEcdnnbSpbvHKgQ==/com.google.ar.core-ln9aByaqxbuIVWB73BtlpA==/base.apk!/lib/arm64-v8a/libarcore_c.so" [is](http://www.google.com/search?q=is+msdn.microsoft.com) 64-bit instead of 32-bit

ARCore has deprecated support for 32-bit.

See this thread for more discussion on our forum.

1 Like

Hi, Did you mean to turn of armv7 and keep only arm64?
We are enabling both ARMv7 and ARM64 in Player Settings
and I’m wondering why do those flagships choose to run armv7 apk instead of arm64 instead?

For devices that are 64-bit only or devices that support both 64- and 32-bit, the 64-bit version of the app should be used.

There are some devices that support ARCore but that are still only 32-bit. Only these devices should use the 32-bit version of the app.

If you are building for both armv7 and arm64, that is the correct approach. You will need to file a bug with Unity for us to be able to investigate the issue.

Yes we are using both armv7 and arm64 for 2 years and it has been working fine when we use unity 2019.4 and ARfoundation 3

Since when upgrade to unity 2020.3 and ARFoundation 4.1.7 recently,
the issue only occurs on Samsung S series with andoird 11 only (S10, S20, S21 and variants)
it does not occur on Samsung Note, A or Tab series or other manufactrurers like Pixel and Xiaomi
I believe this is a bug on how Unity/ARFoundation handle the so file foreach platform

@mb13admin
hi, we might have facing the same problem. I am on ARFoundation 4.1.1, ARCore 4.1.1 unity 2019.4.29. while armv7+arm64 build fails in some devices, only armv7 build works fine.
error log looks the same as yours:

E/DynamiteClient: Failed to load native library [packageName=com.google.ar.core,libraryName=arcore_c] from remote package:
         
        java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.google.ar.core-Sci-ciX5Ty7u1I-SDVNtRg==/base.apk!/lib/arm64-v8a/libarcore_c.so" is 64-bit instead of 32-bit
            at java.lang.Runtime.loadLibrary0(Runtime.java:1071)
            at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
            at java.lang.System.loadLibrary(System.java:1667)
            at com.google.vr.dynamite.NativeLibraryLoader.b(PG:5)
            at com.google.vr.dynamite.NativeLibraryLoader.initializeAndLoadNativeLibrary(PG:2)
            at faf.A(PG:6)
            at adl.onTransact(PG:3)
            at android.os.Binder.transact(Binder.java:914)
            at com.google.a.a.a.a(BaseProxy.java:4)
            at com.google.vr.dynamite.client.b.initializeAndLoadNativeLibrary(INativeLibraryLoader.java:9)
            at com.google.vr.dynamite.client.DynamiteClient.loadNativeRemoteLibrary(DynamiteClient.java:35)
            at com.google.ar.core.Session.nativeCreateSessionAndWrapperWithFeatures(Native Method)
            at com.google.ar.core.Session.<init>(Session.java:11)
            at com.google.ar.core.Session.<init>(Session.java:4)
            at com.stxr.xrengine.XREngineActivity.isARCoreRun(XREngineActivity.java:187)
            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:237)

this happen only on some devices like:
Sumsung Galaxy Zflip(SM-F711N)
Sumsung Galaxy S10(SC-03L) Android 10
SonyXperia 5ā…”(XQ-AS42) Android 11

I think it’s something wrong with arfoundation accidentally trying to load 32bit .so even 64bit .so exist. Did you find a solution of this? Thanks

Having similar issues here^ and have tried countless fixes including:

  • Removing ARMv7 and only keeping ARM64
  • Updated to the latest version of ARFoundation (4.1.10)
  • Lowered the target API to Android 11 (down from from 32)
  • Turned off the ā€˜Update AR’ option (which tries to update the users Google Play Services for AR)
  • Enabled multithreaded rendering
  • Disabled R8 minify
  • Reset the player settings and re-filled them
  • AR session component is disabled until the device passes a check that confirms if the device is AR compatible
  • Went from Unity 2020.3.19f1 to 2020.3.34f1
  • Downgraded to ARFoundation 4.0.12
  • Changed Tracking mode to ā€˜Don’t Care’ from ā€˜Position and Rotation’

My issue is that when trying to open the AR feature/ scene, the app freezes, shows a black screen, then crashes. This has been the case on Samsung and Google devices.

EDIT:
Manged to solve the issue on that thread; hope it’s helpful to everyone else!

having same problem. app runs fine in standard pipeline. but when i switch to URP, app freezes. I do have AR background feature added in render pipeline settings.

The same with me.
I created an thread to it with my configs.

I am testing on a xiaomi MIA3 Android 11. The image are tracked but the camera arent renderizing in background.

ā€œarm64-v8a/libarcore_c.soā€ is 64-bit instead of 32-bit means your ā€œgoogle play services for arā€ is 64-bit ,but your app use 32-bit,so you need to update ā€œgoogle play services for arā€