Cannot connect via Steam with my friend."SteamAPI failed to initialize"

Hi all

I’m really enjoying the course. But I cannot get my game to connect via Steam. Eventually I have downloaded the full project from Github ( https://github.com/UnrealMultiplayer/3_Steam_Multiplayer/tree/master/UnrealProject/PuzzlePlatforms/Source/PuzzlePlatforms )

I changed the line in defaultengine.ini to “[OnlineSubsystemSteam] bEnabled=true”
I also added line “SessionSettings.bUseLobbiesIfAvailable = true;” into the GameInstance cpp file.

My LOG file tells me Steam failed to initialize because conditions not met. But what conditions?

I read somewhere that a 32x32 .ico file was needed to connect. But SpaceWar doesn’t seem to have such ico file. And I didn’t see it referred to in the tutorial series.

Part of log here:

LogSteamShared: Display: Loading Steam SDK 1.51
LogSteamShared: Steam SDK Loaded!
LogOnline: OSS: Creating online subsystem instance for: Steam
LogSteamShared: Warning: SteamAPI failed to initialize, conditions not met.
LogOnline: Warning: STEAM: Steamworks: SteamUtils() failed!
LogOnline: Warning: STEAM: Steamworks: SteamUser() failed!
LogOnline: Warning: STEAM: Steamworks: SteamFriends() failed!
LogOnline: Warning: STEAM: Steamworks: SteamRemoteStorage() failed!
LogOnline: Warning: STEAM: Steamworks: SteamUserStats() failed!
LogOnline: Warning: STEAM: Steamworks: SteamMatchmakingServers() failed!
LogOnline: Warning: STEAM: Steamworks: SteamApps() failed!
LogOnline: Warning: STEAM: Steamworks: SteamNetworking() failed!
LogOnline: Warning: STEAM: Steamworks: SteamMatchmaking() failed!
LogOnline: STEAM: [AppId: 0] Client API initialized 0
LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
LogOnline: Warning: STEAM: Steam API failed to initialize!
LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
LogOnline: OSS: Unable to create OnlineSubsystem module Steam
LogOnline: OSS: Creating online subsystem instance for: NULL

Please help me :smiley: I am so close yet so far to having my games on Steam :stuck_out_tongue:

Edit: Is it perhaps to do with the Steam SDK version? Currently I am unsure where I need to put the Steamworks SDK. According to this ( Online Subsystem Steam | Unreal Engine Documentation) I have to change the readonly file ‘Steamworks.build.cs’ to reflect the current version I am using. I had downloaded the latest SDK (1.39a). But I don’t know if I need to change the path in the Engine ‘Steamworks.build.cs’ file or inside my project (which is what it actually says in that link) but I cannot find any reference to Steamworks SDK version inside my project. Of course I am trying to use this with UE4.27.

Hi Clunk,

There’s an additional line of code needed for 4.27 - they changed something. I can’t remember exactly what it was but it caused a lot of grief for others until the solution was found. I can’t be sure but I believe this was patched in the video. The line in question needs to be added before creating the session. this is:
SessionSettings.bUseLobbiesIfAvailable=true;

I don’t know why this was changed but it is possible the value was defaulted to true previously and now isn’t.

As for Steam SDK - you no longer need to use the version you build as it is now included in unreal so it is not that. The latest Steamworks SDK is 1.53a.

The error, to me would indicate you’re having issues with Steam itself. The Steam client has to be running and you need a registered account before you can use the Steam SDK. Other players must be in the same region as well.

I am not sure if any of this will help you.

1 Like

Thanks for the help here. However I did already add that bUseLobbiesIfAvailable line.

Very strangely whilst I was trying different stuff, I also noticed in my Engine/source/ThirdParty/Steamworks folder that the build specifies 1.51. I also downloaded 1.51 and noticed the files differed from those I had in my Engine folders. So I replaced the folder with the one I downloaded and now the game does connect via Steam :smiley:

Very happy I got there in the end. But very weird that I had to download the SDK myself if it is meant to just be included.

Appreciated all the help here though. I have been trying to learn getting a game onto Steam for a very long time and now I think I am almost ready to publish

1 Like

Thanks for sharing the solution Clunk.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms