x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Online Subsystem Session Search Always Empty

I'm trying to set up a game browser using the steam online subsystem and I'm running into problems. Whenever I run a session search the result set is always completely empty.

Here is my code for creating sessions:

  if (OnlineSystem)
     {
         FOnlineSessionSettings CurrentSettings;
         CurrentSettings.bIsLANMatch = false;
         CurrentSettings.bIsDedicated = false;
         CurrentSettings.bAllowJoinInProgress = true;
         CurrentSettings.bAllowInvites = true;
         CurrentSettings.bShouldAdvertise = true;
         CurrentSettings.bUsesPresence = true;
         CurrentSettings.NumPrivateConnections = 100;
         CurrentSettings.NumPublicConnections = 100;
 
 
         CurrentSettings.bUsesStats = true;
         IOnlineSessionPtr Session = OnlineSystem->GetSessionInterface();
         if (Session.IsValid())
         {
             
             Session->AddOnCreateSessionCompleteDelegate(OnCreateSessionCompleteDelegate);
             return Session->CreateSession(1, serverName, CurrentSettings);
         }
     }
 
     return false;

Here is my code for searching sessions:

 if (OnlineSystem)
     {
         IOnlineSessionPtr Session = OnlineSystem->GetSessionInterface();
         if (Session.IsValid())
         {
             SearchSettings = MakeShareable(new FOnlineSessionSearch());
             SearchSettings->bIsLanQuery = false;
             SearchSettings->MaxSearchResults = 100;
             SearchSettings->PingBucketSize = 200;
             TSharedRef<FOnlineSessionSearch> SearchSettingsRef = SearchSettings.ToSharedRef();
             Session->AddOnFindSessionsCompleteDelegate(OnFindSessionCompleteDelegate);
             return Session->FindSessions(0, SearchSettingsRef);
         }
     }
     return false;

Any help would be appreciated. I can provide run-time logs if that would help

Product Version: Not Selected
Tags:
more ▼

asked Oct 09 '14 at 10:38 AM in C++ Programming

avatar image

zgjames
46 6 10 14

avatar image 少狼_ Jul 08 '16 at 01:34 AM

I also found thisproblem, like, findsession succesful, but searchresult's Num away 0. do you know why ? help me , thank you.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Steam

You need an actual online subsystem that has servers, the default subsystem is not actually a real service that has hosting capacities

If you use steam you need your own steam app id.

Rama

more ▼

answered Oct 09 '14 at 01:02 PM

avatar image

Rama
10.6k 446 345 1088

avatar image zgjames Oct 09 '14 at 01:15 PM

Thanks for the reply! I am using the steam subsystem and have an app id and as far as I can tell I am successfully making a session with the app id. Heres what I believe to be the relevant part of the log:

alt text

sessionlog.png (88.9 kB)
avatar image Neur0t1c Oct 24 '14 at 12:09 AM

Did you ever get it working? I'm stuck in the same problem.

avatar image Nanoxin Nov 20 '14 at 12:46 AM

So ... isn't it possible to use the OnlineSubsystemNull for hosting in LAN? Did I misunderstand that? I thought the OnlineSubsystemNull provides basic functionality for LAN games. Even though I am not able to find any games (it says successful hosts/finds, but the SearchResults.Num() is always 0 :( )

avatar image nan2cc Aug 29 '15 at 10:57 PM

Hello guys, I'm stuck in the same problem my SearchResults.Num() is always empty. before call my method to find sessions, i create a session successful but after that i call my FindSessions method and SearchResults is empty. Anyone can help me with this problem, please.

avatar image aoakenfoArchiact Nov 25 '16 at 07:24 PM

Same problem here. LAN works fine, but after setting LAN to false and bUsesPresence to false (to create an internet session), the results are always empty.

avatar image aoakenfoArchiact Nov 29 '16 at 01:51 AM

Tuns out bUsesPresence=false creates an internet session which is used for dedicated servers. It will callback on one of the steam game server ports which was being blocked by the router, resulting in a 'steam: failed to respond IP'. The solution was to use bUsesPresence=true to create a steam lobby. -debug and verbose logging were a major help in trying to figure out the steam subsystem.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I issue this problem with run PIE. after build a .exe no this problem!

more ▼

answered Nov 29 '16 at 02:46 AM

avatar image

少狼_
0 1 3 5

avatar image Sudeep Singh Jul 06 '17 at 04:54 AM

I am having the same issue. I cannot find sessions via steam. Can somebody please help me? I am using UE4.15. I have my appid. My game is greenlit on steam. I am using the advanced session plug-in. Finding session over router is easy but cannot find session when hosted at a different location.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question