UOnlineSessionClient - No join session delegate setup

Hi,

in the UOnlineSessionClient class, you forget to setup the JoinSession delegate to the OSS backend. As a consequence, in the GameInstance, when you call GetOnlineSession()->JoinSession(…), the joinsessioncomplete function will never be called so the ClientTravel is not done.

Thanks,

Hey -

I would like to investigate this on my end how and need additional information to ensure my setup matches what you’re doing. Could you provide an example setup project of this problem occurring or list out the steps to reproduce this locally?

I don’t have a setup rdy to be shared but here are the bigsteps:

  1. Create a class that inherit from UGameInstance
    2.Override GetOnlineSessionClass() and return UOnlineSessionClient::StaticClass();
  2. Override JoinSession, called your OSS JoinSession.
  3. Create A new function in the gameinstance “CallOss(ULocalPlayer* LocalPlayer, const FOnlineSessionSearchResult& SearchResult)” that called your Cast(GetOnlineSession())->JoinSession(…)
  4. Create an exec func Test(). In it, Create a Session Result struct with a IP/port that match a game server (dedicated or listen)
  5. Use this SessionResult as a parameter to CallOss gameinstance function

If everything was properly setup, you should travel to your server.
Here is the flow CallOss will call JoinSession on UOnlineSessionClient, that will call JoinSession on the GameInstance.
In UOnlineSessionClient, you have a function OnJoinSessionComplete that should be called once the join session have finished.

BUT, the delegate(OnJoinSessionCompleteDelegate to OnJoinSessionComplete is never attached to the OSS implementation, as a consequence the OnJoinSessionComplete is never called and you never travel to your server.

You can see that all the delegate are properly created in RegisterOnlineDelegates() but none of them are attached to any OSS implementation. They are only “unregistered” in the xxxComplete function.

I hope this is clearer. The purpose of this class (from the docs) is to handle all OSS Session handling for the GameInstance. In the current implementation, it’s not usuable.

You can see here that the joinSession test set the handle properly, but this had not been done in this file

Thanks,

Hey -

Sorry for the late reply. I believe I may not have understood the reproduction steps you provided as I’ve not had any success getting the problem to occur for me. If you’re still seeing this happen in the 4.11.1 release, can you supply a sample project with this occurring for me to investigate directly?

I will try to provide a test in 4.11.

In the mean time, could you please confirm that you were able to create a session and join it? And that the joinsession directly travel you to the server without any specific coding from you to travel?
In this case, I will apreciate your project also as I will be able to understand how you made it.
thanks,

Hello ,

After looking over your steps, I gave an attempt at reproducing your issue, but networking is not my strong suit, as I’m not aware of how to set up joining a session, meaning following your steps didn’t result in much for me. It would be best to get a reproduction project whenever you get the chance. Also, just to get a bit of more information, is this something new to 4.11 or did it also occur in 4.10?

We haven’t heard from you in a while, . Are you still experiencing this problem? If so, would it be possible for you to provide a project whenever you have a chance? In the meantime, I’ll be marking this issue as resolved for tracking purposes. Please take your time and respond whenever you’re ready.