cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot pass Entitlement check in Unity Editor

edvinas108
Honored Guest

Hello,

I'm developing a small VR app with colocation features on Meta Quest 2. The app includes:

  • Unity 2022.3.20f1
  • Photon Unity Networking 2 2.4
  • Meta XR Platform SDK 63.0.0 (I'm using Building Blocks)

Currently I'm struggling on interfacing with any Oculus Platform features from the Unity Editor due "Missing entitlement for XXX (XXX)" error when running "IsUserEntitledToApplication". I need to pass this check in order to retrieve username (for display to other players) and to interface with Anchors API (I think - I haven't got to that step yet):

private void InitializeOculus()
{
    Core
        .AsyncInitialize()
        .OnComplete(OnCoreInitialized);

    void OnCoreInitialized(Message message)
    {
        if (message.IsError)
        {
            LogError(message.GetError().Message);
            return;
        }

        Entitlements
            .IsUserEntitledToApplication()
            .OnComplete(OnEntitlementInitialized);
    }

    void OnEntitlementInitialized(Message message)
    {
        if (message.IsError)
        {
            LogError(message.GetError().Message);
            return; // <- Fails here
        }

        Users
            .GetLoggedInUser()
            .OnComplete(OnUserInitialized);
    }

    void OnUserInitialized(Message<User> message)
    {
        if (message.IsError)
        {
            LogError(message.GetError().Message);
            return;
        }

        var user = message.GetUser();
        LogDebug($"Logged in: {user.DisplayName} ({user.OculusID})");
    }
}

So far I've tried:

  • Creating a Quest app on Meta Quest Developer platform & using provided "App ID" in Unity Editor
  • Creating a Rift app on Meta Quest Developer platform & using provided "App ID" in Unity Editor
  • Requesting access to "User ID" and "User Profile" on "Data Use Checkup" (on Rift and Quest apps)
  • Uploading a test build to "Alpha" channel
  • Enabling developer mode/etc on my Quest 2 HMD (had done this long ago due to building other VR apps)

My questions are:

  • What am I missing to pass the Entitlement check when running my app from Unity Editor?
  • Is it possible to interface with Platform features, such as User Profile Info or Spatial Anchors, from Unity Editor?
    • If not, what is the dev workflow to work with these features?
  • Do I really need to use different "App ID" to test on Editor & Quest or should I use the same Quest app ID in both fields (I tried different combinations here with no luck)?
1 ACCEPTED SOLUTION

Accepted Solutions

edvinas108
Honored Guest

I dug around more and managed to resolve this:

  • I uploaded Quest and Rift builds to both of my Quest and Rift apps
  • The build was uploaded to Alpha release channels on each app
  • I assigned my meta user to the Alpha channel on each app
  • I made sure that Rift and Quest App IDs were entered into Unity (one for Rift and one for Quest - they differ)
  • The code I posted above works with these steps being taken

For context, some screenshots:

edvinas108_1-1712753116905.png

edvinas108_0-1712753068415.png

edvinas108_2-1712753229876.png

edvinas108_3-1712753295873.png

 

The post that helped me figure this out: https://communityforums.atmeta.com/t5/Unity-VR-Development/Entitlement-Check-Failing/td-p/971466

View solution in original post

5 REPLIES 5

abozeman841966
Honored Guest

I am having a similar problem. The issue I'm having with the entitlement and with the avatar specifically is that everything works in the editor in play mode with both the Meta XR simulator and on the headset while it's hooked up to the Oculus link. But as soon as I build an APK and attempt to run it on the headset it mysteriously just crashes and the logs are very very very odd. No real answers. I never had problems like this with version 62 and below. It was not until I got the version 63 that this was a problem. My data use checkup is fine. They say I have a privacy policy and everything. I do not understand why this stopped working and this is destroyed my project. Now I'm almost to the point to tell people they should not use the meta avatars at all if things like this are going to keep happening. I'm almost about to switch to ready player me and do everything in third person. I do not know what to do and there are no answers anywhere. I am begging somebody at Meta to help me, to help us figure this out please, please help us!!!???

Getting issues with entitlement and avatars SDK too. It crashes on build, using unity 2023.2.17 Meta SDK 63.0.0 and Avatars 24.1.1, tried rolling back to provious versions of the Meta SDK with no luck, it always crashes when trying to get the avatars from CDN even if everything is set up correctly and permissions are enabled in the product page.

edvinas108
Honored Guest

I dug around more and managed to resolve this:

  • I uploaded Quest and Rift builds to both of my Quest and Rift apps
  • The build was uploaded to Alpha release channels on each app
  • I assigned my meta user to the Alpha channel on each app
  • I made sure that Rift and Quest App IDs were entered into Unity (one for Rift and one for Quest - they differ)
  • The code I posted above works with these steps being taken

For context, some screenshots:

edvinas108_1-1712753116905.png

edvinas108_0-1712753068415.png

edvinas108_2-1712753229876.png

edvinas108_3-1712753295873.png

 

The post that helped me figure this out: https://communityforums.atmeta.com/t5/Unity-VR-Development/Entitlement-Check-Failing/td-p/971466

I was able to resolve the issue with the avatars because I had to check carefully when I got the email back to see that the avatars was included as part of the day to use checkup that was approved

I am having an issue with the entitlement. Check. The issues surrounds the very first part which is the initialization of the platform. I did some debugging and I found out that the reason my entitlement check was failing was first of all it didn't even get that far. It was because the platform is not initializing. I tried regular initialization. I tried to synchronous initialization and neither one of them seem to be working. I'm going to upgrade to version 66 of the core SDK and give it a whirl. And just to be sure, I checked my headset and it is version 66 as well. So I'm hoping that this can get resolved. My data use checkup is fine. Everything else works except for initializing the platform on an actual headset, not just in the editor.