Showing results for 
Search instead for 
Did you mean: 

S2S Api calls working as standalone in Unity editor but not when running on Oculus Go / Gear VR

Level 3
I've been developing a simple arcade shooter and I've implemented a simple leaderboard. The leaderboard is able to poll the Oculus leaderboard server within Unity when I'm logged in as a standalone user on my account, but when I run the same code on my Oculus Go the server always returns a fail. AFAIK I'm passing the entitlement check since I've implemented code to alert me if this is not the case. The build has been loaded into Alpha and I've also tried RC channels but I'm still encountering the same issue.

It's frustrating since I know the code is good since it works within Unity, but never once have I been able to access the leaderboard on my test unit.

My entitlement check is exactly the code listed here
And my leaderboard code is based on the hoops example, which is working in Unity to write and read scores successfully.

I realise this isn't much to go on but I don't know where else to turn now. I hope it's something obvious I'm not doing and someone out there knows how to help me.

Level 3
So I think the line that's causing me issues is this:
Leaderboards.GetEntries(USER_SCORE, TOP_N_COUNT, LeaderboardFilterType.None,

It returns this when I try and access it. The error doesn't appear when I use standalone credentials.
NullReferenceException: Object reference not set to an instance of an object

EDIT: So Core.AsyncInitialize(); is failing on my Go. My app ID is correct and it's in a release channel and I'm running the build I've downloaded from the store. I'll keep digging into it but I'm really. not sure where I've gone wrong.

EDIT2: I've tried creating a brand new app, with a. new appID and I'm still not passing entitlement. I've stripped the entitlement check down to a barebones implementation and embedded it directly into my leaderboard script so I can ensure it runs before calling the leaderboard.

N.b. I'm using 
leaderboardConstructor.LeaderBoardError() to display the output in the game.

It's not even running CheckEntitlement() as AsyncInit has failed and it's caught with the error, displaying "Failed" in the game.

 private void Start()
            leaderboardConstructor.LeaderBoardError("Getting scores...");
        } catch {

    void CheckEntitlement()
        (Message msg) =>
            if (msg.IsError)
                // User is NOT entitled.
                Debug.Log("Error: User not entitled");
                // User IS entitled
                Debug.Log("Success: User entitled");

Edit 3: I've tried a build with IL2CPP as I read this fixed the issue for another developer in the same boat. No dice. My Android api levels are 21 min, 23 max. I deployed a build with Core.Initialize, instead of AsyncInitialize - same issue.

Level 3
This post is my saviour:

I just need to update my platform SDK since I was using the version from Unity store. It didn't even register to check this since everything else was working flawlessly. I'm so happy now, I'm getting a beer.