cancel
Showing results for 
Search instead for 
Did you mean: 

Unreal Multiplayer issue Joining Session

Ham1ton
Level 3
Hi, I've posted this on the Unreal forums as well so if I get an answer there I will post it here. I've been developing a VR demo in Unreal 4.22 for the Quest for about a month with great success. It is a multiplayer shooter and I've been hosting on the Quest or Vive and have tested with 4 players, everything's great, until... Randomly about a week and a half ago, for some reason the Join Session node is not allowing the client to connect to the listen server anymore. When the client calls Join Session after finding the server, the Join Session node fire off and complete off the success pin as if everything is fine! except nothing happens...  I also setup a test in 4.23( of course following the instructions on this site) and am experiencing the same issue or issue where I connect to the listen server but it isn't the same instance of the server as the players cannot see each other inside the level. Has something changed recently regarding networking on the Quest? Is anyone else having multiplayer issue in Unreal recently? I feel like something changed and I just don't know about it.
20 REPLIES 20

Ham1ton
Level 3
I should add that in the Unreal editor player, I am able to simulate 2 or more players successfully finding and joining each other with no issues, so the core functionality is working and hasn't changed in the last several weeks.

Some more testing showed that, in UE4.23, when I built out to Windows Vive/Rift, I could host a server on my PC and join with two other Quests with no issues. It was only when hosting on the Quest that restricted other players from joining. In 4.22 this is not an issue as I can host from the Quest and join with other Quests and Vive/Rift. I'm stuck.

Thanks for your time.

jinzay
Level 3
Just adding: We are using Join and Invite in ue4.22 oculus integration. So far it works almost all the time.
Oculus integtation is a must if you are not using it.

Ham1ton
Level 3
Thanks! I will look more into Oculus integration. It was my understanding that it was already included with UE4 and the Oculus VR plugin but I could be wrong. Everything in 4.22 is working fine for me too, it's 4.23 that I can't get the Quest to host a server that others can actually join, unless I host it from a PC, then other Quests can connect...

UReality
Level 2
Are you using the Oculus Platform-tools with a valid Quest API key or did you got another way for the multiplayer?

I just can't seem to get multiplayer working with the Quest and using UE4.

Ham1ton
Level 3
I am not yet using a valid Quest API key, I am using the Online Subsystem built into UE4 to host/create and join sessions with other Oculus Quests over LAN. As you've probably seen in this post already, 4.22 works great for this but now in 4.23 it is no longer working. I have a ticket open with Epic Games about this issue and they have elevated it to a specialist so I'll update here when I find out what has changed from 4.22 to 4.23.

Ham1ton
Level 3
All glory and honor goes to Turtle Rock Studios for this workaround and much personal shame to those who messed it up to start with:

When we upgraded to UE4.23, we could no longer connect clients to servers. Upon investigating we found 2 problems:

UOculusNetDriver::LowLevelSend was modified to take an FInternetAddr pointer instead of an FString (due to the same change in UE4's NetDriver). The code was modified to convert that passed in FInternetAddr pointer into a string, calling FInternetAddrOculus's ToString method, which would just return the user's ID as a string instead of the correct "[id].oculus" connection string required by the SDK.

Either of these changes fixes it:

Change line 295 in NetDriverOculus.cpp (LowLevelSend) from:
FInternetAddrOculus OculusAddr(FURL(nullptr, *Address->ToString(false), ETravelType::TRAVEL_Absolute));
to
FInternetAddrOculus OculusAddr = *StaticCastSharedPtr(Address);

Change line 186 in IpAddressOculus.h (ToString) from:
return OculusId.ToString();
to
return FString::Printf(TEXT("%s.oculus"), *OculusId.ToString());



Unfortunately, this fix is only for the OculusOnlineSubsystem and not the standard OnlineSubsystem which some of us may be using.

Ham1ton
Level 3
This issue is being recognized by Epic games: https://issues.unrealengine.com/issue/UE-82549

unreal_architec
Level 2

Ham1ton said:

All glory and honor goes to Turtle Rock Studios for this workaround and much personal shame to those who messed it up to start with:

When we upgraded to UE4.23, we could no longer connect clients to servers. Upon investigating we found 2 problems:

UOculusNetDriver::LowLevelSend was modified to take an FInternetAddr pointer instead of an FString (due to the same change in UE4's NetDriver). The code was modified to convert that passed in FInternetAddr pointer into a string, calling FInternetAddrOculus's ToString method, which would just return the user's ID as a string instead of the correct "[id].oculus" connection string required by the SDK.

Either of these changes fixes it:

Change line 295 in NetDriverOculus.cpp (LowLevelSend) from:
FInternetAddrOculus OculusAddr(FURL(nullptr, *Address->ToString(false), ETravelType::TRAVEL_Absolute));
to
FInternetAddrOculus OculusAddr = *StaticCastSharedPtr(Address);

Change line 186 in IpAddressOculus.h (ToString) from:
return OculusId.ToString();
to
return FString::Printf(TEXT("%s.oculus"), *OculusId.ToString());



Unfortunately, this fix is only for the OculusOnlineSubsystem and not the standard OnlineSubsystem which some of us may be using.


hi Ham1ton and thank you for your full report of how to fix this issue

I do all of your levels to fix it but in lunching progress ue4 report this error and lunch failed. 

LogPlayLevel: Error:     C:/UnrealEngine-4.23/UnrealEngine-4.23/Engine/Plugins/Online/OnlineSubsystemOculus/Source/Private/OculusNetDriver.cpp(294,36):  error: no matching function for call to 'StaticCastSharedPtr'

do you have an idea

thank you very much

unreal_architec
Level 2

Ham1ton said:

All glory and honor goes to Turtle Rock Studios for this workaround and much personal shame to those who messed it up to start with:

When we upgraded to UE4.23, we could no longer connect clients to servers. Upon investigating we found 2 problems:

UOculusNetDriver::LowLevelSend was modified to take an FInternetAddr pointer instead of an FString (due to the same change in UE4's NetDriver). The code was modified to convert that passed in FInternetAddr pointer into a string, calling FInternetAddrOculus's ToString method, which would just return the user's ID as a string instead of the correct "[id].oculus" connection string required by the SDK.

Either of these changes fixes it:

Change line 295 in NetDriverOculus.cpp (LowLevelSend) from:
FInternetAddrOculus OculusAddr(FURL(nullptr, *Address->ToString(false), ETravelType::TRAVEL_Absolute));
to
FInternetAddrOculus OculusAddr = *StaticCastSharedPtr(Address);

Change line 186 in IpAddressOculus.h (ToString) from:
return OculusId.ToString();
to
return FString::Printf(TEXT("%s.oculus"), *OculusId.ToString());



Unfortunately, this fix is only for the OculusOnlineSubsystem and not the standard OnlineSubsystem which some of us may be using.


hi Ham1ton and thank you for your full report of how to fix this issue

I do all of your levels to fix it but in lunching progress ue4 report this error and lunch failed. 

LogPlayLevel: Error:     C:/UnrealEngine-4.23/UnrealEngine-4.23/Engine/Plugins/Online/OnlineSubsystemOculus/Source/Private/OculusNetDriver.cpp(294,36):  error: no matching function for call to 'StaticCastSharedPtr'

do you have an idea

thank you very much