Open GiacomoRavaioli opened 3 years ago
I'm having the same problem. I have tried a variety of gradle versions as a comment on an old similar issue mentioned it, but no dice. Keyless anchor creation fails with CloudAnchorState.ErrorNotAuthorized despite the keystore signature being correctly set up in the GCP Console. Unity 2020.3.6f1 ARCore Extension 1.23.0 ARFoundation 4.1.7 ARCore XR Plugin 4.1.7
Has this problem been solved? Why is the Unity team not responding to this? If keyless authentication does not work in Unity3d, then they should mention this.
I can't reproduce any problems with the keyless workflow in a totally clean environment using the Persistent Cloud Anchors sample app. Here are some troubleshooting steps; try them out and ensure that the values in your Google Cloud project match:
Android/sdk/build-tools/30.0.1/apksigner verify --print-certs built-unity-game.apk
aapt
to confirm the package name of your built apk and ensure it's the same as the package name in GCP: Android/sdk/build-tools/30.0.1/aapt dump badging built-unity-game.apk | grep package:
Trying to host a persistent Google Cloud Anchor with the keyless android authentication strategy (case below) or resolving an existing persistent Google Cloud Anchor, both with a new project targeting Android and the ARCore Persistent Cloud Anchor Sample (case below), produces the following error:
Am I missing some steps to make it work?
Tests with the Api Key android authentication strategy worked using an API key generated on the GCP Console.
The Firebase app has been correctly registered on the Firebase Project Console and its SHA-1 has been set. On the GCP Console, under APIs and Services -> Credentials, a new entry on the OAuth 2.0 Client IDs has been automatically generated for the newly registered app in the Firebase Project Console. When the app starts, firebase is initialized correctly.
The behaviour doesn’t change whether the FirebaseAuth.unitypackage is present or not.
With the ARCore Android SDK and the same GCP and Firebase projects, everything works fine with keyless authentication.
Sotfware & Packages used: