Download

Can't join session when using Oculus Online SubSystem

Hello everyone,

[The Problem]
I am trying to establish a simple LAN connexion between a host (PC) and a client (Oculus Rift), but I can’t seem to get it working.
I have 2 problems:

  • the client doesn’t find the host session if the FindSession method is not executed approximately (~2s) in the same time than the CreateSession from the host side
  • when the client happens to find a session, the JoinSession method returns success but doesn’t travel to the server map

[The Setup]
Using UE4 4.23 (downloaded from Epic Launcher, it’s not Oculus forked version)
I was first using the Null subsystem with the advanced session plugin, but now need to integrate the AvatarSDK to the project so I must use the Oculus Subsystem.
I first enabled the plugin in the UE4 Editor and setup the Config/DefaultEngine.ini with the following lines:
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName=“GameNetDriver”,DriverClassName="/Script/OnlineSubsystemOculus.OculusNetDriver",DriverClassNameFallback="/Script/OnlineSubsystemUtils.IpNetDriver")
[/Script/OnlineSubsystemOculus.OculusNetDriver]
NetConnectionClassName="/Script/OnlineSubsystemOculus.OculusNetConnection"
[OnlineSubsystem]
DefaultPlatformService=Oculus
[OnlineSubsystemOculus]
bEnabled=true
RiftAppId=[My ID]
GearVRAppId=[My Other ID]

Then I opened a pool in my oculus dashboard.
Both the server and the client pass the entitlement check.
From the server, I create a session using the Oculus CreateSession node with the pool id I made from my dashboard, and open a level, let’s say “TargetMap” with the listen option. The CreateSession returns success and I can’t see any problem until that point.
From the client, I use the FindMatchmakingSessions node with the same pool id. First problem is happening here: if the client doesn’t run this method when the host session has just been created, no session will be found (the FindMatchmakingSessions node succeeds but the results array has a length of 0). When the client can find the session, the JoinSession node succeeds but the client doesn’t travel to the server map.

I made sure to build the game to test so that the right NetDriver would be used (it is using the IpNetDriver in editor, and is correctly using the OculusNetDriver when packaged).
I checked the logs from the client and here is what I can find:

[FONT=Slack-Lato]LogOnlineSession: OSS: Join session: traveling to 2359010480812061.oculus
[FONT=Slack-Lato]LogBlueprintUserMessages: [StartupMap_C_21] Successfully joined session
[FONT=Slack-Lato]LogNet: Browse: 2359010480812061.oculus//Game/VirtualRealityBP/Maps/StartupMap
[FONT=Slack-Lato]LogTemp: Display: ParseSettings for GameNetDriver
[FONT=Slack-Lato]LogTemp: Display: ParseSettings for OculusNetDriver_2147482546
[FONT=Slack-Lato]LogTemp: Display: ParseSettings for PendingNetDriver

The Browse: command doesn’t seem to look for the great map (which is the StartupMap, not the TargetMap). I think the client might have joined when the server was trying to move from StartupMap to TargetMap (because if I don’t do that at that moment the client can’t find any session), but it anyway doesn’t follow the server to TargetMap.

[What I tried]
I tried doing that exact same setup using the Oculus forked version of UE4, but have the exact same problems.
I am running the server and the client on different computers with packaged versions of the game.

I’m actively following some other posts but can’t find any answer:

On that second link the post is quite old but the described problem is exactly the same as mine (he doesn’t mention the fact I can discover sessions only when the CreateSession node has just been executed though). He fixed his issue by pulling more recent version of UE4 on Oculus forked version, but I tried it without success.
If you pass by here with porblems too, check this post out, it might answer some of your questions:

Does anyone experience the same issue ?

Help

Hello , did you tried the unreal example which is coming with the Platform SDK.
As a starting template you can see how Oculus is handling those different options.

Any news on this??

Does the host machine have an HMD hooked up to it? The oculus client will stop heartbeating to the backend if the machine doesn’t have an HMD and the created room will get reaped. Also, there might be a fix needed in the engine for the connection string. That thread is here: https://forums.oculusvr.com/develope…oining-session