RequestingRoom
Troubleshooting an issue in Unity that seems to keep cropping up. We instantiate different avatars depending on the platform. For some reason, entering play mode in the game while attempting to instantiate the "screen player" avatar for non-XR players leads to a permanent "RequestingRoom" message on the Realtime component.
A "Realtime: RealtimeView attempting to unregister, but is not found in this instance of Realtime's scene view list." error occurs when exiting play mode, but I assume this is because the connection was never established in the first place?
The avatar spawning process is fairly complicated, but it seems like that shouldn't be particularly relevant since we have JoinRoomOnStart enabled?
(Unfortunately, I can't test the XR player at this exact moment as I'm away from my typical workstation).
Any insight would be appreciated. Thanks!
9 Replies
Hi @Skye. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
The "RequestingRoom" message indicates that the Realtime component is trying to connect to a room. If this message is permanent, it suggests that the connection is not being established. This could be due to a variety of reasons such as network issues, incorrect room name, or issues with the App Key.
The error message "Realtime: RealtimeView attempting to unregister, but is not found in this instance of Realtime's scene view list." typically occurs when a RealtimeView is trying to unregister from a Realtime instance, but it's not found in the list of views that the Realtime instance is managing. This could be due to the RealtimeView being destroyed before it could successfully register with the Realtime instance.
As for the avatar spawning process, it's important to note that all avatar prefabs used with RealtimeAvatarManager need to include a RealtimeAvatar component on the root of the prefab. The RealtimeAvatar component is responsible for synchronizing the head + hands positions and active states (source (https://normcore.io/documentation/realtime/xr/avatars#realtimeavatar)).
Also, if you're using the
joinRoomOnStart
property, make sure it's correctly configured. This property indicates whether Realtime will try to automatically connect on Start(). If you'd like to change this name at runtime, disable join room on start, and use the Connect() method on Realtime instead (source (https://normcore.io/documentation/reference/classes/Normal.Realtime.Realtime)).
Lastly, ensure that your App Key is correctly added to the Realtime component. The App Key is necessary to connect to a multiplayer room.
If the issue persists, it would be helpful to debug the connection process and check the logs for any additional error messages.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@717822493561323621> kapa.ai is still learning and improving, please let us know how it did by reacting below
Solution
Ah, nevermind! Got it. Just a NullReferenceException I wasn't noticing.
@Skye can you post the stack trace for that null ref exception?
Normal shouldn't freeze like that from a null ref
@Max Sure! It's an issue within Recognissimo, which we use for speech:
NullReferenceException: Object reference not set to an instance of an object
Spacebar.SpacebarSpeechRecognizer.Update () (at Assets/Scripts/Spacebar/SpacebarSpeechRecognizer.cs:91)
A bad attempt to access an unassigned 'recognizer' object within Update().
Disabling the game object stops the problem, but adding a null check that fires a Debug.LogError causes it again. Not sure at this point if the LogError causes the game to lose focus which prevents the room connection or if the room connection fails and causes the loss of focus.
Things work fine if it's a null check with a simple Debug.Log.
very strange. do all Update() calls stop after this? this may be a Unity bug that I can’t work around
Ah, good question! Yes, they do, all Update() calls appear to stop.
dang that's wild. I've never seen that, but yeah unfortunately, not something I can fix on the Normcore side. Glad you were able to sort it out!
Thanks!
Yeah, I'm not sure why it's happening myself... I'll let you know if I figure it out.