Stuck on infinite loading when trying to use premade avatar

Right now when our users click on a premade avatar it gets stuck on the loading screen and doesn’t go away. Everything was running fine until this morning and we noticed there was an update on RPM, is it possible something on the back end changed?

We are seeing these new errors when we test in editor

Here is a the full error message:

NullReferenceException: Object reference not set to an instance of an object
ReadyPlayerMe.AssetButtonCreator.ResetUI () (at Assets/Samples/Ready Player Me Core/4.1.0/AvatarCreatorSamples/Scripts/UI/AssetButtonCreator.cs:117)
ReadyPlayerMe.AvatarCreatorSelection.Cleanup () (at Assets/Samples/Ready Player Me Core/4.1.0/AvatarCreatorSamples/Scripts/UI/SelectionScreens/AvatarCreatorSelection.cs:122)
ReadyPlayerMe.AvatarCreatorSelection.DeactivateState () (at Assets/Samples/Ready Player Me Core/4.1.0/AvatarCreatorSamples/Scripts/UI/SelectionScreens/AvatarCreatorSelection.cs:62)
ReadyPlayerMe.StateMachine.DeactivateState (ReadyPlayerMe.State state) (at Assets/Samples/Ready Player Me Core/4.1.0/AvatarCreatorSamples/Scripts/UI/StateMachine/StateMachine.cs:77)
ReadyPlayerMe.StateMachine.GoToPreviousState () (at Assets/Samples/Ready Player Me Core/4.1.0/AvatarCreatorSamples/Scripts/UI/StateMachine/StateMachine.cs:58)
ReadyPlayerMe.AvatarCreatorSelection.OnErrorCallback (System.String error) (at Assets/Samples/Ready Player Me Core/4.1.0/AvatarCreatorSamples/Scripts/UI/SelectionScreens/AvatarCreatorSelection.cs:132)
ReadyPlayerMe.AvatarCreator.AvatarManager.CreateAvatarFromTemplate (System.String id, System.String partner) (at Library/PackageCache/com.readyplayerme.core@a81e76f4f1/Runtime/AvatarCreator/AvatarManager.cs:102)
ReadyPlayerMe.AvatarCreatorSelection.LoadAvatar () (at Assets/Samples/Ready Player Me Core/4.1.0/AvatarCreatorSamples/Scripts/UI/SelectionScreens/AvatarCreatorSelection.cs:171)
ReadyPlayerMe.AvatarCreatorSelection.Setup () (at Assets/Samples/Ready Player Me Core/4.1.0/AvatarCreatorSamples/Scripts/UI/SelectionScreens/AvatarCreatorSelection.cs:77)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) (at <1c8569827291471e9db0dcd976e97952>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at :0)
UnityEngine.UnitySynchronizationContext.Exec () (at :0)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at :0)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
Sentry.Unity.Integrations.UnityLogHandlerIntegration:LogException(Exception, Object) (at /sentry-unity/src/Sentry.Unity/Integrations/UnityLogHandlerIntegration.cs:63)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

I’m having the same problem since two days and managed to debug it but can’t fix it on my end since its a backend issue.

It happens when the account is setup to half-body avatars, then the RPM backend returns a GLTF with a broken animation which causes GLTFast to throw a null reference exception which in turn is propagated by the RPM SDK as a “Failed to import glb model from bytes. Object reference not set to an instance of an object” exception.

Hello and welcome to the forum!
Could you please both confirm:

  • Are you on Windows or Mac?
  • What Unity version are you using?
  • Are you loading full-body or half-body avatars?

We are using Windows, Unity 2021.3.26 and half body avatars.

Everything was working fine 2 days ago and we have done no updates but now this app and another app from a separate project won’t load the data.

For me:

  • Windows and Mac
  • Unity 2022.3.13f1
  • Half Body avatars
  • Any version of RPM Unity SDK

As mentioned earlier, this seems to be a backend issue where there is a broken animation in the delivered 3D model.

What Ready Player Me SDK version are you using?

Could you clarify more about “broken animation in the delivered 3D model”?
We don’t deliver animations with the 3D model. We have an animation library, but it is only for full-body avatars. The issue seems to be different from what is discussed in this thread, so could you please open a new topic with more details on your issue?
Thanks!

I don’t see the point in making a new thread for the exact same problem.
I’m not using any animations or anything like that. I spent 3 hours deep debugging the issue and for some reason your backend delivers since 2 days the half body avatars with some broken animation, that is my debugging finding.

To be extra sure, I made an empty unity project, added the RPM SDK with the AvatarCreatorSamples, set to half body and then you get an exception.

It was suggested to create a new thread as the issue seemed to be about animations rather than the loading discussed here; the goal is, of course, to help with that issue as well. if it’s the same then yes no need to open a new one

For the loading issue, the team is looking into it now and will fix it soon. I’ll keep you posted in this thread

1 Like

Incredible thank you, let me know if I can help in any way for debugging. I have the same username in Discord so feel free to ping me directly

I can confirm that the issue has been resolved, thank you!

2 Likes

Amazing thank you @ruben. Are you able to speak to what was wrong and if there is anything we can do to fix in future if it happens again?

Is the issue also resolved on your end? I only had it with half body avatars.
It was not a code issue, my code and the RPM Unity SDK where all fine.

The problem was that the backend delivered the GLB with I think broken metadata where the GLTFast plugin thinks the models contains animations but fails loading those because there are none and such throws an exception.