cancel
Showing results for 
Search instead for 
Did you mean: 

Entitlement Check completes, but VRC Validator & submitted builds fail

nickfourtimes
Honored Guest
I've built our game for Rift, and I have code to check if the user is entitled to the app. When I play a build locally, I can see that the check passes, which I assume means the player is entitled to run the game.

However, when I run the VRC validator, or submit the app through the Oculus dashboard, I'm told we're failing the entitlement check.

The code is as follows:

IEnumerator DoOculusSetup() {
    #if OCULUS
    try {
        Core.AsyncInitialize("XXXXXXXXXXXX");
        Entitlements.IsUserEntitledToApplication().OnComplete(CallbackOculusGetEntitlement);

    } catch(UnityException e) {
        Debug.LogError("Oculus platform failed to initialize due to exception:");
        Debug.LogException(e);

        // Immediately quit the application.
        UnityEngine.Application.Quit();
    }
    #endif

    yield break;
}


void CallbackOculusGetEntitlement(Message msg) {
    if (msg.IsError) {
        Debug.LogError("[Oculus] You are NOT entitled to use this app.");
        UnityEngine.Application.Quit();
    } else {
        Debug.Log("[Oculus] You are entitled to use this app.");
    }
    return;
}



Running the game locally, I do see the "You are entitled to use this app" message in the log, which I understood to mean the entitlement check is successful. Not sure why it's still being flagged as a VRC error.
11 REPLIES 11

nickfourtimes
Honored Guest
(Also, put this in Mobile Development, instead of PC Development, sorry about that)

nickfourtimes
Honored Guest
Actually, the same error is now happening with our mobile build: when I launch the game locally, I get the same "You are entitled to use this app" message, but our submitted build is failing the security VRC for not implementing the check.

nickfourtimes
Honored Guest
That is, we're failing VRC.PC.Security.1 on Rift, and VRC.Mobile.Security.1 on Go, despite the fact that on both platforms,
Entitlements.IsUserEntitledToApplication().OnComplete() seems to be completing successfully.

nickfourtimes
Honored Guest
Well, I've fixed a few other bugs that I think may have been causing the game, when the user is not properly logged in, to skip the entitlement check. I've checked on PC by logging out of the Oculus app, then running the game, and it follows the expected behaviour – the app quits immediately. However, when I run the VRCValidator on this new version, it still fails, with the error "failed to create a session."

I'm not sure how to run the VRC validator on the Go version, but the code is identical.

grant_marzette
Explorer
I'm actually curious on how you'd test this manually on he GO. If the app is already downloaded and you change your user login to an email that isn't whitelisted for the app, you wouldn't see the application at all, so wouldn't be able to successfully test this. I'm also curious on the VRC test on GO as well. 

MattMc100
Explorer
I'm having the same issues with my build. It works fine in the unity editor but fails to pass the entitlement check for the VRC validator.

MattMc100
Explorer
I'm having the same issues with my build. It works fine in the unity editor but fails to pass the entitlement check for the VRC validator.

MattMc100
Explorer
Hi @imperativity

I found that the issues were coming from an exception in the ovrlibplatformloader after checking with unity performance reporting and using a developer ticket. Had to fix this by deleting the platform directory in the oculus utilities for unity package and importing the oculus platform sdk for unity. So I managed to fix this issue, this was similar to the issues I had in previous threads.

MattMc100
Explorer
@imperativity

It was oculus utilities 1.26 from the website I believe.