Quick answer: Confirm the user is signed in via IOnlineIdentity::GetLoginStatus. Verify DefaultPlatformService in DefaultEngine.ini matches your intended backend. Use LogOnline log category for diagnostic output.
A multiplayer prototype calls SessionInterface->CreateSession(0, NAME_GameSession, Settings). The callback fires with bWasSuccessful = false. No specific error returned. The Steam overlay is running; the build is on the Steam version; settings look fine.
OnlineSubsystem Quick Audit
Before CreateSession can succeed:
- The OnlineSubsystem is loaded and active.
- The local user is signed in (identity layer).
- The session settings are valid.
- The backend (Steam, Epic) is reachable.
Failure in any layer aborts session creation.
Step 1: Verify Subsystem Config
DefaultEngine.ini should contain:
[OnlineSubsystem]
DefaultPlatformService=Steam
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
GameServerQueryPort=27015
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
For Steam specifically. For Epic, replace with EpicOnlineServices. SteamDevAppId 480 is the Spacewar test app — works for development; replace with your real app ID before shipping.
Step 2: Identity Check
IOnlineSubsystem* OSS = IOnlineSubsystem::Get();
if (!OSS) {
UE_LOG(LogTemp, Error, TEXT("OSS not loaded"));
return;
}
IOnlineIdentityPtr Identity = OSS->GetIdentityInterface();
if (Identity->GetLoginStatus(0) != ELoginStatus::LoggedIn) {
UE_LOG(LogTemp, Error, TEXT("Not logged in to OSS identity"));
return;
}
If LoginStatus is NotLoggedIn or UsingLocalProfile, CreateSession will fail. Trigger login via the platform’s flow before any session API.
Step 3: Session Settings Sanity
FOnlineSessionSettings Settings;
Settings.NumPublicConnections = 4; // at least 1
Settings.bShouldAdvertise = true;
Settings.bAllowJoinInProgress = true;
Settings.bIsLANMatch = false;
Settings.bUsesPresence = true;
Settings.bAllowJoinViaPresence = true;
NumPublicConnections = 0 silently fails on Steam. Set to your intended player count.
Step 4: Read the OSS Logs
Set LogOnline and LogOnlineSession to Verbose in DefaultEngine.ini:
[Core.Log]
LogOnline=Verbose
LogOnlineSession=Verbose
Rerun. Output Log shows the specific failure reason: “identity not logged in”, “subsystem disabled”, “invalid settings”. Read and act accordingly.
Steam-Specific Trap: Wrong Process
If you launch the editor from explorer instead of through Steam, the Steam SDK initialization may fail. Either:
- Launch through Steam (using a steam_appid.txt file for development).
- Or place a
steam_appid.txtin the editor binary directory with your app ID.
Verifying
Add comprehensive logging around session calls. The OnCreateSessionComplete should fire with bWasSuccessful = true within a few seconds. If still failing, the verbose log will pinpoint the layer.
“OnlineSubsystem failures cascade through layers. Identity, settings, subsystem, backend — check each one.”
Wire a debug UI showing OSS status (subsystem name, identity status, session count) — saves hours diagnosing in builds.