Forum Discussion
MasonMasteryAugmented
2 years agoExplorer
GetLoggedInUser returns nothing for user name, 0 for ID
I am trying to do the shared spatial anchors demo (https://github.com/oculus-samples/Unity-SharedSpatialAnchors). I built it to my quest device a while ago, and it worked fine. Then yesterday, I tried it again and it seems no longer to be able to access the user account info:
private void GetLoggedInUserCallback(Message msg)
{
if (msg.IsError)
{
SampleController.Instance.Log("GetLoggedInUserCallback: failed with error: " + msg.GetError());
return;
}
SampleController.Instance.Log("GetLoggedInUserCallback: success with message: " + msg + " type: " + msg.Type);
var isLoggedInUserMessage = msg.Type == Message.MessageType.User_GetLoggedInUser;
if (!isLoggedInUserMessage)
{
return;
}
_oculusUsername = msg.GetUser().OculusID;
_oculusUserId = msg.GetUser().ID;
SampleController.Instance.Log("GetLoggedInUserCallback: oculus user name: " + _oculusUsername + " oculus id: " + _oculusUserId);
if (_oculusUserId == 0)
SampleController.Instance.Log("You are not authenticated to use this app. Shared Spatial Anchors will not work.");
I get a message that says my username is a nullstring, and the ID is zero, which causes the "not authenticated" message to pop up too. I have already re-checked my app permissions in the app manager, it says user profile and user ID are still active.
Was there some update that happend? Like I said the app was working, I set the headset down for a few days, picked it back up and now I get this error. I obviously didn't change the app on the headset. What could possibly cause this change?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 years ago