cancel
Showing results for 
Search instead for 
Did you mean: 

Dedicated Servers Crash with MetaXR Plugin

Aeromixx
Expert Protege

I am integrating the MetaXR plugin into my game for body tracking. All is well, but now the multiplayer servers always crash. After extensive testing, I decided to just launch the MovementSample as a client with a dedicated server, and notice that crashes on startup as well, isolating the problem to the MetaXR plugin and not my game.

This render multiplayer usage currently not possible. Am I missing a step perhaps?

Would be great to use it within multiplayer.

The logs don't really provide any context. There are these few errors, which may be the culprit, however, I will note the console continues to log for awhile before the crash. The crash occurs when the player connects to the server. The server alone will live on its own indefinitely.MetaXRLogCrash.png

1 ACCEPTED SOLUTION

Accepted Solutions

Helder_Vinicius
Protege

You don't need tracking features in your server code (the server version of your player).

The tracking components in your player such as BodyTrackingComponent should only exist on client side.You got two options: Add a Is dedicated server check in your player Construction script and only create those components in runtime if you are NOT a server or Destroy said components if you are indeed server (this last option is generally not the safest).

Your Server won't be wearing a quest headset, thus it doesn't have the tracking info, thats probably why it fails to initialize. You need to handle body transform data replication on your own.


View solution in original post

7 REPLIES 7

Aeromixx
Expert Protege

Bump. Any ideas?

The Meta XR plugin cannot be used with dedicated servers. This is a large bug!

puzzzabug
Honored Guest

you may need to put all of that into a function library, and create a another version of the function library that use use to build your server where you have all the same functions but they don't link to any oculus code.

Is there any further guidance or reference you can give me on how to achieve this? I got kind of decently far with ChatGPT (lol). Trying to make it not execute any Oculus functions if its a server, but I also don't know if that's the proper answer. At this point, trying to get it to work at all

Aeromixx
Expert Protege

Bump!

Aeromixx
Expert Protege

Any clue yet? This is a huge bottleneck for multiplayer games with cloud servers

Helder_Vinicius
Protege

You don't need tracking features in your server code (the server version of your player).

The tracking components in your player such as BodyTrackingComponent should only exist on client side.You got two options: Add a Is dedicated server check in your player Construction script and only create those components in runtime if you are NOT a server or Destroy said components if you are indeed server (this last option is generally not the safest).

Your Server won't be wearing a quest headset, thus it doesn't have the tracking info, thats probably why it fails to initialize. You need to handle body transform data replication on your own.


I knew this concept was correct, but wasn't sure how to best apply it. I was messing with C++ and everything. Good grief.

Using the Remote path on a SwitchHasAuthority node before all of the tracking related blueprint nodes on Begin Play and Event Tick fixed this for me. I can confirm the tracking is working in a Dedicated Server session now. WHOOP WHOOP!

 

Thank you! I was stuck on this for such a ridiculously much longer time than I should have been *facepalm*