Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

authenticated failed and shared spatial anchor can't work #21

Open
chris312319 opened this issue Feb 20, 2024 · 11 comments
Open

authenticated failed and shared spatial anchor can't work #21

chris312319 opened this issue Feb 20, 2024 · 11 comments
Assignees

Comments

@chris312319
Copy link

chris312319 commented Feb 20, 2024

I have tried Unity-discover and everything works fine.
But I tried this with same app Id , it always shows "You are not authenticated to use this app. Shared spatial anchors will not work."
I have tried another app Id, it still works fine in Discover.
Is it the reason that SDK for this repostiry is too old?

@stephenm2022
Copy link
Contributor

stephenm2022 commented Feb 25, 2024

Hi @chris312319. I just grabbed a fresh clone of the repository and I was able to successfully authenticate.

Did you update the Package Name (Bundle Identifier) of this project to match your app's? Both the App Id and Package Name are unique to each app on the store.

You can also try downloading the store build of your app first to enable the entitlement. After successful authentication with a store build, you can sideload apks from there.

Let me know if the issue remains after trying the above.

@chris312319
Copy link
Author

I have changed package name with my own company name, it works fine when I do same things in disocver.

And I haven't push Discover on to the store , is it necessary ?

I have two app in my Oculus developer center now, and both of its id can work with Discover though.

@stephenm2022
Copy link
Contributor

Most of the app features work in Discover without authentication. Have you confirmed that authentication is working via logs? The only feature that requires it is colocation (local multiplayer across two or more devices).

@stephenm2022 stephenm2022 self-assigned this Feb 25, 2024
@chris312319
Copy link
Author

chris312319 commented Feb 26, 2024

Yes, here is my video with Disocer test, which shows the shared spatial anchors worked.
https://youtube.com/shorts/OwwHYl-NOPE?si=AmJyDf8xIzLdH1Uz

another test video:
https://youtube.com/shorts/QtFyRONLFxc?si=uLGHXRZAAJvvpkun

So I think colocation works fine.
But in spatial anchors examples,it doesn't.

@stephenm2022
Copy link
Contributor

Ok, thanks for confirming. Can you send me the logs from the SSA sample?

@chris312319
Copy link
Author

chris312319 commented Feb 26, 2024

Ok, I will post the logs here tomorrow.
Just log file in oculus 3 device?
Or how can I get logs in oculus 3?
Is logcat available?

@stephenm2022
Copy link
Contributor

Yes, logcat is available. You can use Meta Quest Developer Hub to filter Unity logs, or use the below adb command.

adb logcat -s Unity Activity$$anonymous$$anager Package$$anonymous$$anager dalvikvm DEBUG

@chris312319
Copy link
Author

chris312319 commented Feb 27, 2024

12:21:12.369
OVRService
Unable to find AppId for package (com.Chris312319.ssaSample)
12:21:12.369
OVRService
com.oculus.horizon.service.ExternalPlatformLocal$PackageNotInLibraryException: Package com.Chris312319.ssaSample not in users library
12:21:12.369
OVRService
at com.oculus.horizon.service.ExternalPlatformLocal.getAppID(:537096024)
12:21:12.369
OVRService
at com.oculus.horizon.service.ExternalPlatformLocal.getAppID(:6)
12:21:12.369
OVRService
at com.oculus.horizon.service.OVRService$4.logToMarauder(:34)
12:21:12.369
OVRService
at com.oculus.aidl.OVRServiceInterface$Stub.onTransact(:124)
12:21:12.369
OVRService
at android.os.Binder.transact(Binder.java:1064)
12:21:12.369
OVRService
at com.facebook.secure.ktx.service.IdentityCheckingBinder.onTransact(:11)
12:21:12.369
OVRService
at android.os.Binder.execTransactInternal(Binder.java:1179)
12:21:12.369
OVRService
at android.os.Binder.execTransact(Binder.java:1143)

Is this the reason?
This part also appears in Discover, but colocation can work like my video above, I have no idea why@@

*update
But after serveral times of AppId not find, discover can find AppId like this:
12:28:39.847
[CT]
SP:IA:SPSPostProcessor: Loaded Spatial Anchors - AppId: com.Chris312319.discover Anchors: 23
12:28:39.847
[CT]
SP:IA:SPSPostProcessor: MATCH AppId: com.Chris312319.discover SA: 6c3073e3-3038-e1c9-c297-3ac58ee2ebe2 IA: d7fa952e-8bee-7f4b-58da-7bf4684255e8

*update
I found out that though it shows authenticated failed when entering the room,
but logs still contains:
13:16:38.001
[CT]
SP:IA:SPSPostProcessor: Loaded Spatial Anchors - AppId: com.Chris312319.ssaSample Anchors: 6
13:16:38.001
[CT]
SP:IA:SPSPostProcessor: MATCH AppId: com.Chris312319.ssaSample SA: 68c429aa-cc5f-d1c4-8cc4-9117d8ed4f32 IA: e53065d3-48c1-2
in the "fast colocation" scene.

@stephenm2022
Copy link
Contributor

Hi @chris312319. Thanks for sharing your logs. Both apps seem to be failing entitlements and platform authentication. You will need to upload an apk to one of the store channels to test your apps end to end.

https://developer.oculus.com/documentation/unity/unity-platform-entitlements#build-and-upload-the-apk-file

Discover will attempt to localize the spatial anchor even when platform authentication fails. If you are using the same account on two devices, it is likely that you will be able to localize the anchor without successfully sharing it.

@chris312319
Copy link
Author

Hi @chris312319. Thanks for sharing your logs. Both apps seem to be failing entitlements and platform authentication. You will need to upload an apk to one of the store channels to test your apps end to end.

https://developer.oculus.com/documentation/unity/unity-platform-entitlements#build-and-upload-the-apk-file

Discover will attempt to localize the spatial anchor even when platform authentication fails. If you are using the same account on two devices, it is likely that you will be able to localize the anchor without successfully sharing it.

After upload and download by AppLab, authenticated failed won't appear at all.
But aonther question is that when I use any apply of anchors, it continuously popping "Saving anchor(s) failed.Retrying..."
And if two people join colocation scene, it also happened.
And if entering Fast Colocation scene and create an anchor, it will shows that Saving anchors failed.Possible reasons include an unsupported device.
But I am using Quest 3

@stephenm2022
Copy link
Contributor

Hi @chris312319. Thanks for confirming that uploading to the store fixed the auth issue.

Be sure to enable 'Share Point Cloud Data' on your device: https://www.meta.com/help/quest/articles/in-vr-experiences/oculus-features/point-cloud/

Also, we just released a new version that adds support for the latest SDKs and OS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants