Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Entitlement Check completes, but VRC Validator & submitted builds fail

nickfourtimesnickfourtimes Posts: 18
NerveGear
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() {<br>&nbsp;&nbsp;&nbsp; #if OCULUS<br>&nbsp;&nbsp;&nbsp; try {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Core.AsyncInitialize("XXXXXXXXXXXX");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Entitlements.IsUserEntitledToApplication().OnComplete(CallbackOculusGetEntitlement);<br><br>&nbsp;&nbsp;&nbsp; } catch(UnityException e) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.LogError("Oculus platform failed to initialize due to exception:");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.LogException(e);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Immediately quit the application.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UnityEngine.Application.Quit();<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; #endif<br><br>&nbsp;&nbsp;&nbsp; yield break;<br>}<br><br><br>void CallbackOculusGetEntitlement(Message msg) {<br>&nbsp;&nbsp;&nbsp; if (msg.IsError) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.LogError("[Oculus] You are NOT entitled to use this app.");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UnityEngine.Application.Quit();<br>&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Debug.Log("[Oculus] You are entitled to use this app.");<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; return;<br>}



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.

Comments

  • nickfourtimesnickfourtimes Posts: 18
    NerveGear
    edited July 2018
    (Also, put this in Mobile Development, instead of PC Development, sorry about that)
  • nickfourtimesnickfourtimes Posts: 18
    NerveGear
    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.
  • nickfourtimesnickfourtimes Posts: 18
    NerveGear
    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.

  • nickfourtimesnickfourtimes Posts: 18
    NerveGear
    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.marzettegrant.marzette Posts: 5
    NerveGear
    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. 
  • MattMc100MattMc100 Posts: 7
    NerveGear
    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.
  • MattMc100MattMc100 Posts: 7
    NerveGear
    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.
  • MattMc100MattMc100 Posts: 7
    NerveGear
    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.
  • MattMc100MattMc100 Posts: 7
    NerveGear
    @imperativity

    It was oculus utilities 1.26 from the website I believe.
  • bobbagoosebobbagoose Posts: 8
    NerveGear
    MattMc100 said:
    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.
    I spent hours and Horus trying to figure this out and this post saved me. THANK YOU!
  • gunnerthemadninjagunnerthemadninja Posts: 18
    NerveGear
    This worked for me as well
Sign In or Register to comment.