Forum Discussion

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

Error code 2 when using Users.GetLoggedInUser() | Unity | Oculus Quest

Hello,

I am following the documentation (https://developer.oculus.com/documentation/avatarsdk/latest/concepts/avatars-gsg-unity/) to use user specific avatars.
However, when I try to retrieve the user ID:
 void Awake () {
Oculus.Platform.Core.Initialize();
Oculus.Platform.Users.GetLoggedInUser().OnComplete(GetLoggedInUserCallback);
Oculus.Platform.Request.RunCallbacks(); //avoids race condition with OvrAvatar.cs Start().
}

private void GetLoggedInUserCallback(Message<User> message) {
if (!message.IsError) {
myAvatar.oculusUserID = message.Data.ID.ToString();
}
}
I always get the following error:
Code: 2
Http code: -1
Message: 'The user isn't signed in or their account state wasn't in a recoverable state.'

Using Unity 2019.1.5f1 and Oculus Integration 1.37

Any ideas what the cause might be?

No RepliesBe the first to reply