Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
CryptoHexPirate's avatar
8 years ago

Oculus Entitlement Check Fail from Oculus Library Launch?

Our submitted App VRBowling is visible in our Oculus App library tab.

 -- Unity v5.6.2f1, Oculus Utilities v1.15.0, OVRPlugin v1.14.1, SDK v1.16.0. --

Documentation
says that entitlement check will pass if User can view the app from
their library. This seems to be the case as it's visible.
However when I
launch the app from library I get Entitlement check fail. Also
Entitlement Checks pass when in stand alone build (Unity 5.6.1f1 or
5.6.2f1) as well as working in Unity Editor Play mode in both versions with User Token.

I
have attached the Oculus Entitlement Check C# file we are using based
on the Oculus / Unity Entitlement Check example code for reference here :

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Events;
using Oculus;
using Oculus.Platform;

public class OculusEntitlementCheck : MonoBehaviour {
   
    public string appID = "1078093085625410";
    public GameObject extraNotice;
    public GameObject warningNotice;
    public GameObject enabler;
   
    // Use this for initialization
    void Start () {
        Oculus.Platform.Core.AsyncInitialize(appID);
        Oculus.Platform.Entitlements.IsUserEntitledToApplication().OnComplete(EntitlementCheckInit);
    }
   
    void Update(){
        Oculus.Platform.Request.RunCallbacks();
    }
   
    void EntitlementCheckInit(Message msg){
        if (msg.IsError){
            // User is NOT entitled.
            StartCoroutine(WaitForWarningShow(msg));
        } else {
            // User IS entitled
            if(enabler!=null){
                enabler.SetActive(true);
            }
        }
    }
   
    IEnumerator WaitForWarningShow(Message msg){   
        if(warningNotice!=null){
            warningNotice.SetActive(true);
        }
        if(extraNotice!=null){
            extraNotice.GetComponent<Text>().text = ""+msg;
            extraNotice.SetActive(true);
        }
        yield return new WaitForSeconds(30);
        NowQuit();
    }
   
    void NowQuit(){
        UnityEngine.Application.Quit();
    }
}

However as Entitlement passes everywhere else except from a library launch it seems unlikely this is the cause of our issue.

There's also a screen grab of the app appearing in the library.

However
as it seems to pass in Editor and Stand alone build and is also visible
from the Oculus runtime app library, it seems unlikely that the C# code could be
the issue as Entitlement check passes everywhere else.

We have tried about 12 implementations with slight changes and variations to the above code but with no change in outcome.

The problem seems to be launching the app from in
the Oculus library when entitlement checks then seem to fail. At no
other time. Also according to documentation Oculus Entitlement check
should pass if the app is visible to the user from the library. As we
can see the app from the library, entitlement checks should pass, it
seems that the problem seems to only occur when launching the app from
the library. not sure what the issue here is?

When executing a local standalone or PIE the app loads straight away:

 

We have submitted a few builds with tweaks to our
environment set up and code for Entitlement Checks, but without yielding
positive results so far. Rather than continuing to submit builds I
thought it prudent to ask for support in this instance.

Has anybody any idea why this is occurring for our builds launched only from the Oculus library? 

From what we have discerned if the app is visible to an Oculus user account in the library then that user will already have correct entitlement privileges, meaning entitlement check should pass from the library like it does in editor and stand alone builds.

We have contacted submissions email reporting the issue in as much detail as supplied here and are awaiting response.

In the meantime any insights/support/help anybody could give would be appreciated!




7 Replies

Replies have been turned off for this discussion
  • Any more news on this?
    Does a support ticket help?
    All the very best.
    Lots of hard work hopefully it won't just be forgotten.
  • Are the users that are launching the app listed as users in the release channel you uploaded the build to? E.g., I am testing an Alpha channel build, and delphinius81 is listed in the alpha channel users.

    I know the docs say that anyone listed as a member of your organization is supposed to be automatically entitled to all your organizations apps, but I've never seen that actually work in practice. I've always had to manually invite people to the test channel for the entitlement check to pass.
  • Hey there,
    This issue did set me back a little but I put it down to my user being added to all release channels in my initial app instance on the store. However this was my first VR title for the store so my approach was an organic one as I was exploring all the dev manager section store features.

    So on my initial store instance of my app, I had done a lot of messing around with adding my own user account to all the test channels then deleting and re-adding multiple times. After re-examining the documentation which said I should already be entitled to run the app from the library, I decided I had better re-add the whole app from scratch and only add my own account to the alpha release channel this time. As I had exhausted all other solutions I could perceive with the info I had at my end. Using the exact same build as was submitted to the first store instance of my app but this time when I ran from library it passed entitlement check fine with a new app id and me added to the alpha release channel only.

    I worked with VMware back in my LAMP dev days and if you have ever tried to create copies of complex environment variable and library driven VMs on a new employees machine, permissions were the most likely to go wrong in my experience.
    As this was the exact same build as the other that didn't pass
    entitlement check, I now presume my assumption about permissions getting
    messed up when "I clicked everything under the sun 50 times", was
    correct.
    I'm impressed with the auto submission technology used by the Oculus store for devs, which I'm guessing is similar to VM's I'm familiar with in the past. Put that experience with an understanding of my back end system approach of organically messing around a lot with permissions and it seemed a reasonable assumption to re-add from scratch.

    To illustrate this to Oculus support I did also upload a build of the platform example entitlement check unity sample as a build (with the only change being appropriate app ids in each build but the rest of the code was the exact oculus unity sample for platform services) I uploaded that sample code to each store instance and ran each from library. Surprise surprise the initial store instance of my app still failed permissions check. Even with Oculus example unity code untouched except for updating the correct app id. The second instance passed entitlement check first time and continued to do so each subsequent time.

    So I concluded that the back end of the store submission is a complex beast and if you're having problems with entitlement check passing, try re adding your app to store so you get a new app id.
    This worked for me and VRProBowling is now on sale :)

    Programmer Moral of the Story: "It's not always your methods at fault... it could just be your method at fault" ;)

    I hope this helps some fellow VR devs somewhere!
  • @delphinius81 - Yes that is also my experience, I had to add myself manually as well in each instance for it to even show up in the library, before I got to the Entitlement check fail/pass tests
  • Hi! I think I have the same issue, I've uploaded a new app to Rift Alpha, with an entitlement check. when I run from unity with the entitlement check it seems ok, but when I run from Store library, I also added my user to the alpha build, and I can see it in the library, then the entitlement fails, and the app closes immediately. is this normal? why does it happen?