Android app crashes after splash screen with Google Play Services for AR update (after August 11th 2020) #751
Comments
I'm getting this exact same issue on my Samsung Galaxy A50. With a new project with just AR Session and AR Session Origin, it crashes as soon as I press the "Allow Camera" option. When I run
|
@Cimera42 your comment was remarkably useful! I thought the problem was with my phone but in fact is a problem with the Google Play Services for AR update, like you guessed. I managed to install an older version of the app following the instructions here and the app started working again (without having to build it again or anything, I just ran it an it worked perfectly like before). I hope the people at Google notice this issue because it's quiet important. |
I found a solution after seeing the warning on the landing page of this repo, which says:
To enable 64-bit build for Android in Unity, I did the following:
Seems ridiculous that there is no warning or verbose error message anywhere, but exporting a new build from Unity now works on my phone. Also do you mean August, not April in the new issue title? |
I was just looking into that same thing and it worked for me too with the latest Google Play Services for AR. I share your opinion that there should be a stronger warning. PS: Thanks for noticing the August mistake. |
@aymusbond yes, both solutions worked, going to a previous version of Google Play Services for AR as well as building for ARM64. |
@ffarall Thanks for the reply. The ARM64 solution worked even for me now 😁. I was really worried about why's this happening. |
Apologies for the confusion! TLDR: The dev docs will make this more clear (in progress). Context: We are in the middle of rolling out ARCore 1.19.0. This means that you may be using Google Play Services for AR v1.19.x (which removes support for 32-bit-only ARCore-enabled apps running on 64-bit devices), but the updated instructions for using the SDK on a 64-bit device are not yet posted on the dev guides. The solution mentioned above (also here) is precisely what you will want to do in that scenario. Solution: If building for ARCore 1.19.0 or higher and supporting 64-bit devices:
Leaving this open until the docs clearly mention this. Thanks for the reports and attention to this issue everyone! |
The settings required to build to a 64-bit device are now documented in the Unity SDK Quickstart for Android. Additionally, in the next SDK release, the Unity console should log a warning when the |
SPECIFIC ISSUE ENCOUNTERED
I'm working collaboratively on an Android app that uses AR Foundation. From one day to another (without making new builds) the app started to crash after the splash screen, every time. I'm working on my Huawei Mate 20 Pro, but my teammates use other Android phones (Samsung, Xiaomi and Motorola) and they continued to develop the app, and it works just fine for them. I pull their commits (which work for them), make no changes, and it keeps crashing on my phone. We are using Firebase so I have the info from Crashlytics:
I've managed to find the C# script containing the
UnityARCore_session_update
function, and I checked that none of its four arguments arenull
. From what I could understand, after that, the script calls a function defined in UnityARCore dll, so I couldn't go any further.I made an empty project with just an AR Session Origin and an AR Session, and I checked if it would work, but it also crashes.
I would like to remark the fact that this happened from one day to another, everything had been working perfectly on my phone for months. One day I built the app and it was ok, the other day I opened it again (no new builds or phone updates in the middle), and from there on, always crashing.
Also, I want to clarify that the Huawei phone I´m using is from Australia, I´m using it from Argentina, and it has nothing to do with the Chinese versions. It runs on Android 10 and has Google Play Services (in fact Play Services for AR are installed).
VERSIONS USED
On Windows, use:
adb shell pm dump com.google.ar.core | findstr /i "packages: versionName"
On macOS, use:
adb shell pm dump com.google.ar.core | egrep -i versionName\|packages:
adb shell getprop ro.build.fingerprint
:STEPS TO REPRODUCE THE ISSUE
WORKAROUNDS (IF ANY)
Locate the file
ARCoreSessionSubsystem
insidePackages/com.unity.xr.arcore/Runtime/
and comment out lines 95 to 99, which is the function call forNativeApi.UnityARCore_session_update
.The app won't crash but the camera won't show either, so it's not really a full workaround.
The text was updated successfully, but these errors were encountered: