cancel
Showing results for 
Search instead for 
Did you mean: 

Can't Get User Name (App Lab)

AFE_Foreman
Level 4

I am developing an Oculus Quest app for release on the App Lab. Previously, I was able to get the player's user name just fine via

 

Oculus.Platform.Users.GetLoggedInUser().OnComplete(getLoggedInUserComplete);

 

but recently that stopped working and now the user name is just an empty/null string. Essentially, I can't display a user name above players' heads anymore.

 

Below is the code I am using to retrieve the user name:

 

void getLoggedInUserComplete(Message msg)
        {
            if (msg.IsError)
            {
                Debug.LogError("Could not get Oculus user name!");
            }
            else
            {
                Debug.Log("GetLoggedInUser success! " + msg + "; message type: " + msg.Type);
                if (msg.Type == Message.MessageType.User_GetLoggedInUser)
                {
                    Debug.Log("Oculus GetLoggedInUser success! Setting user name in game manager: " + msg.GetUser().OculusID);
                    GameManager.Instance.SetUserName(msg.GetUser().OculusID);

                    Debug.Log(msg.GetUser().DisplayName);
                    Debug.Log(msg.GetUser().ID);
                    Debug.Log(msg.GetUser().OculusID);
                    Debug.Log(msg.GetUser().ToString());
               

 

 

GetLoggedInUser is successful, however the message that gets returned is empty. Here is what prints out into the debug log from the above code:

 

Oculus Platform entitlement check passed!
GetLoggedInUser success! Oculus.Platform.MessageWithUser: message type: User_GetLoggedInUser
Oculus GetLoggedInUser success! Setting user name in game manager: 

0

Oculus.Platform.Models.User

 

 

As you can see, all of the information returned in the GetLoggedInUser message is empty. My app key is correct, the entitlement check passes, and it successfully gets the logged in user but with an empty return message. It did not used to be this way but recently it broke (without me changing any of the code). I'm stumped. How can this be fixed?

1 ACCEPTED SOLUTION

Accepted Solutions

AFE_Foreman
Level 4

My issue was fixed by filling out and submitting the "Data Use Checkup" in the developer dashboard. The approval for this was instant - there doesn't seem to be an actual review process. I also requested access to every API feature in the list.

 

After doing so, the API features in my app began working again. I don't know why they worked before if this was a required step. Perhaps Oculus made a change, but didn't tell anyone.

 

I found the original answer to the problem here: https://forums.oculusvr.com/t5/Unreal-Development/Get-Oculus-Identity-returns-No-Logged-In-user/m-p/...

View solution in original post

2 REPLIES 2

AFE_Foreman
Level 4

My issue was fixed by filling out and submitting the "Data Use Checkup" in the developer dashboard. The approval for this was instant - there doesn't seem to be an actual review process. I also requested access to every API feature in the list.

 

After doing so, the API features in my app began working again. I don't know why they worked before if this was a required step. Perhaps Oculus made a change, but didn't tell anyone.

 

I found the original answer to the problem here: https://forums.oculusvr.com/t5/Unreal-Development/Get-Oculus-Identity-returns-No-Logged-In-user/m-p/...

View solution in original post

Hm, I have the same issue, but for me the data-use checkup seems to be taking a long time, I am already waiting for 3 weeks and it still says it is "in review" - is anybody having the same issue with the data checkup?