Open JosquinDpt opened 4 years ago
It looks like KeyLess doesn't work for now, even if it's the recommended option:
Using an API fixed the issue.
How do you do that?
Using an API key instead of keyless. But it's definitely not a good solution because the key are not persistent using this method. I'm still trying to figure out how to use keyless but no luck for now.
I try too. If I find something, I will post here.
In Google Cloud Platform:
In Unity, keyless is selected, no API key is set.
When I start the app I don't see any consent screen, is is normal? After placing an Anchor it's still: Error Not Authorized
I am also trying to get this to work. I have followed the instructions for Keyless authentication but I keep getting the same Error Not Authorized.
Is this really not available yet or am I doing anything wrong?
@tedruxpin Any chance to have more details on this issue? The documentation seems to be lacking something, or it's because of all the preview packages and new Unity version we are using that just doesn't work. Is there a project setup somewhere with the right packages, Gradle version (I'm not talking about the sample)? Thanks
I had the same problem with the authorization. After updating the project to 2020.2.0b11 it seems to be working. I can host and resolve a persistent anchor, with keyless method.
I was running 2020.1.10 before, which had the ErrorNotAuthorized issues. The major difference between these editor versions is the updated Gradle version integrated in 2020.2, the older version needed to install the Gradle 5.6.4 (that is required for the Arcore Extensions to work) manually, so maybe the problem lies somewhere there
I had the same problem with the authorization. After updating the project to 2020.2.0b11 it seems to be working. I can host and resolve a persistent anchor, with keyless method.
I was running 2020.1.10 before, which had the ErrorNotAuthorized issues. The major difference between these editor versions is the updated Gradle version integrated in 2020.2, the older version needed to install the Gradle 5.6.4 (that is required for the Arcore Extensions to work) manually, so maybe the problem lies somewhere there
@elCangrejo Can you please explain more about how you handled gradle version? Any changes you made or it is just Unity version update that did the magic? I tried with new Unity version but still the same authorization issue!
Thanks,
@hcnw So if you are running 2020.1 or below you can download the Gradle version 5.6.4. on this website. You install it and then you can set it as Gradle Path in your Unity Preferences under External Tools.
At the moment I'm using version 2020.2.1 and I didn't have any problems with this specific error. So if the Gradle is not working, maybe consider upgrading to the newest version. If that is also not working, then it is probably time to pray to the Unity gods
@elCangrejo What you're talking about is a one-day anchor? Or do you mean Persistent Anchor?
@elCangrejo What you're talking about is a one-day anchor? Or do you mean Persistent Anchor?
I'm talking only about the persistent Anchors with keyless method.
for me,
@hcnw So if you are running 2020.1 or below you can download the Gradle version 5.6.4. on this website. You install it and then you can set it as Gradle Path in your Unity Preferences under External Tools.
At the moment I'm using version 2020.2.1 and I didn't have any problems with this specific error. So if the Gradle is not working, maybe consider upgrading to the newest version. If that is also not working, then it is probably time to pray to the Unity gods
For me, i am able to host an anchor but it can only be resolved in the device that hosted it. If i try to resolve it in another device, failed to resolve: not authorized error comes. is there any way to resolve it in another device ?
Got is working Guys. Try using:
How did you update your gradle version in Unity3d?
@kshitizsv-vizara provide a step by step solution. How did you set the gradle version? How did you set the Android Extension version? Your comment is quite vague
The solutions offered here no longer work. I have tried running the Persistent cloud anchor sample app and I still can't host anchors.
I can't seem to reproduce this problem; here are the steps I followed:
keytool -keystore ~/.android/debug.keystore -list -v
.I'm also using gradle-6.8.3, but I don't think that should matter (posting just in case)
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:
@devbridie I followed your instruction but now I can't even find the option for keyless cloud anchor hosting. Why are the Unity tutorials so fragmented for ArFoundtion? Please provide a step-by-step guide as to what I should do.
huh? Of course I know about that. I tried that, it doesn't work. I still get the Error Not Authrized message.
Any update on this? Either offer a solution or tell us that is not working so we may stop wasting our time. There is no one to message in Google to make this work as well. You need to fix your customer service for cloud anchors
We can't get keyless authentication to work either. Any update on this would be appreciated.
After trying multiple times, realized this is intentional
On Mon, Jun 21, 2021 at 11:39 PM ChristianSchnellmann < @.***> wrote:
This message was sent from a non-IU address. Please exercise caution when clicking links or opening attachments from external sources.
We can't get keyless authentication to work either. Any update on this would be appreciated.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google-ar/arcore-unity-extensions/issues/22#issuecomment-865240059, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYZMAWCSUQMBURNHPDL5YDTT5535ANCNFSM4SHYYFAA .
@hcnw how do you know this is intentional?
I do not know exact but I think it should have worked for someone by now if it was functional. Also, there is no resolution to this so far
On Tue, Jun 22, 2021 at 2:45 PM iAmJuan550 @.***> wrote:
This message was sent from a non-IU address. Please exercise caution when clicking links or opening attachments from external sources.
@hcnw https://github.com/hcnw how do you know this is intentional?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google-ar/arcore-unity-extensions/issues/22#issuecomment-865794644, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALYZMAWZIWD3ZWTHD6CPTR3TUBIELANCNFSM4SHYYFAA .
Since I ran into trouble with my team again, regarding the persistent Anchor creation, I can share some tips:
For those fighting with ErrorNotAuthorized problem - check your if your androidresolverdependencies.xml file contains the following references:
It took me a lot o time to point down the cause of this error.
Anyone having trouble building on iOS platform? How do I build iOS app with Authentication Token?
@Renkon117, please see instructions on the Cloud Anchors developer guide for iOS for how to use SetAuthToken at runtime.
As mentioned on the other thread, we've identified a problem with Unity's package cache isolation and are working towards a fix. In the meantime, here are some troubleshooting steps from that thread:
- Check for the existence of
ProjectSettings/AndroidResolverDependencies.xml
. If this does not exist, then probably this is the source of problems;- Check
Temp/gradleOut/unityLibrary/build.gradle
; this should contain some lines with'com.google.android.gms
.If this is the case, then GMS authentication libraries are missing at runtime, and this causes authentication to fail.
This may be caused by incorrect permissions in our provided tgz. If you're encountering this, a possible workaround is to remove ARCore Extensions from the Package Manager, then extracting the tgz first, then use
Import from Disk
to import the resultingpackage.json
. Trigger a new build, and (1) and (2) should appear from above.
I have run into this error many times and for many reasons. The latest was solved by deleting ProjectSettings/AndroidResolverDependencies.xml and letting Unity regenerate it. Others have pointed to this solution above, but I wasn't clear on how exactly to add the references needed. Deleting it was the answer.
I solved the problem by importing the ARCore extensions from the package manager
Worth noting you need to enable the API in the console: https://console.cloud.google.com/apis/library/arcore
ttl = 365 strikes back
ARCore Extensions Version 1.37.0 Unity 2021.3.16 ErrorNotAuthorized -- after updating to the new API.
Old API worked perfectly. Token is verified and valid,
API key -> works great
Nothing from above worked for us.
This is the 3rd time this project breaks due to ARCloudAnchor API update.
@devbridie Please help us! Again 😔
ttl = 365 strikes back
ARCore Extensions Version 1.37.0 Unity 2021.3.16 ErrorNotAuthorized -- after updating to the new API.
Old API worked perfectly. Token is verified and valid,
API key -> works great
Nothing from above worked for us.
This is the 3rd time this project breaks due to ARCloudAnchor API update.
@devbridie Please help us! Again 😔
Hello everyone,
I'm not developing with Unity but rather with Flutter, and I too encountered the ErrorNotAuthorized issue while working with cloud anchors (using the plugin ar_flutter_plugin_flutterflow). The discussions in this thread have been immensely helpful in guiding me towards a resolution. I'd like to contribute back by sharing a couple of things that resolved my issue, which might help others in the future:
Upgrade AR Core to version 1.33 in build.gradle:
implementation "com.google.ar:core:1.33.0"
Because it seems that cloud anchors no longer work with previous versions, leading to the ErrorNotAuthorized error. This upgrade was a crucial step in resolving the issue. It's also essential to ensure that the ARCore API is enabled, as the ARCore Cloud Anchor API relies on it. More information can be found here: ARCore Cloud Anchors Endpoint Changes.
Disabling Minification in Release Mode: After making the above changes, the ErrorNotAuthorized disappeared in the debug mode, but it reappeared upon switching to release mode. To address this, I disabled code shrinking and minification by adding the following lines to my app/build.gradle:
buildTypes {
release {
minifyEnabled false
shrinkResources false
}
}
This step ensured that the release version of my app worked without triggering the ErrorNotAuthorized error. I hope this helps anyone facing the same issue. It's always a bit tricky navigating these errors, but with a community sharing insights and solutions, it becomes much more manageable.
I never had this issue before but after updating the In App Purchasing package (which is required by google) I get this every time on Android.
I am lost, I tried updating AR core, I tried updating Unity, I tried disabling minification. Nothing seems to work and I don't understand why. Nothing else seems to be effected by updating that package, just this. Anyone have any ideas on what I can try next? I'm on Unity 2021.3.43f1
Edit: Of course I find it right after commenting. The package update forced me to get rid of my old resolved android libraries, otherwise it fails to build. Turns out I had to keep these:
Keeping any of the other jar files from the large list causes build errors, not keeping these causes AR anchors to be unauthorized 😵
Testing with AR Foundation on Android:
Unity 2019.4.11f1 AR Foundation 4.1.0 Preview 9 ARCore Extensions 1.20
Running the sample scene, everything is going well until the CreateCloudAnchor is triggered: Host Failed Failed to host a Cloud Anchorwith error Error Not Authorized
I'm running it with the keyless setting.