UE 5.1 Steam Sockets Problem

Hi, I’m encountering session problems after upgrading engine to 5.0-5.1. I can create session, find it from another machine but can’t joinable. After unsuccesfull join attempt, game crashs when I create session and trying to load new map (Couldn’t spawn player).

I’ve changed SteamSocketsNetDriver to SteamNetDriver and disabled Steam Sockets plugin but it doesn’t work with Shipping build. Development build and SteamNetDriver is working. I’ve tried 7777 and 27015 ports, didn’t worked. Anyone has an idea? Am I the only person having troubles with Steam Session?

1 Like


I’ve found this code block on SteamSocketsSubsystem. It returns false on shipping builds. Maybe it prevents joining under the hood.

I also have this bug. I’m trying to find out whether Epic is aware of it… 5.1 seems to have a few game breaking issues.

5.0.3 had Seamless Travel bug which happens when Client loads map before Server, client controller wasn’t spawning in that stuation. I’ve needed to upgrade engine to 5.1 for fix. Now I’m encountering with this joining problem.
I’m wondering if Epic Stuff looking into forums to help us and share their knowledge? It looks like they’re waiting for another user who struggles too many days-weeks find a solution will help us.

1 Like

Bumping because I need steam sockets to work!

1 Like

This was exactly my situation as well… :frowning:

UPDATE: I’ve tried with blank TPS project, same problem. (Different PCs, different Steam accounts, Shipping build, Steam overlay is working) I’ve also tried to make a bug report but log file is necessary. Shipping build has no log files so I don’t know what to do.

■■■■. Hopefully Epic becomes aware of this then. Steam sockets are quite important!

Bump for visibility

We’re also getting this after upgrading to 5.1, it’s impossible to join a session now. We get this log repeatedly which suggests the client is connected but every packet is being rejected.

LogHandshake: Incoming: Rejecting game packet with invalid session id (0 vs 0) or connection id (7 vs 0).

I found a workaround by changing GVerifyNetClientID to 0 in StatelessConnectHandlerComponent.cpp

1 Like

Thanks for the information. Can you make a pull request for next engine update? I don’t want to build engine from source :confused:

It’s not a fix for the actual issue, it’s just forcing the handshake validation to skip verifying the client. They have this console command net.VerifyNetClientID but it doesn’t work because they made a mistake in the code:

So I’ll create a pull request for this which will allow you to use the console variable instead.

Edit: Someone already reported this and it has been merged in https://github.com/EpicGames/UnrealEngine/commit/1bd988a781c6762f641a09cedb81aafe4a1e428e

2 Likes

Thanks a lot :slight_smile: I’m marking this as solved, I’ll try it in 5.1.1 and reply again.

1 Like

Great news! woohoo

I’m still getting the issue, but I’m getting problems with PacketHeader reading:

On the log there is LogNet: Failed to read PacketHeader and this ensure is triggering (FBitReader::SetOverflowed()):

P.S. Sorry for the messy log pasting, I don’t know how to properly paste it here :joy:

[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: === Handled ensure: ===
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error:
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: Ensure condition failed: false [File:G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Core\Private\Serialization\BitReader.cpp] [Line: 263]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: FBitReader::SetOverflowed() called! (ReadLen: 32, Remaining: 2, Max: 2)
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: Stack:
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff60fe37907 MyGame.exe!FBitReader::SetOverflowed() [G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Core\Private\Serialization\BitReader.cpp:262]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff60fe34ab4 MyGame.exe!FBitReader::SerializeBits() [G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Core\Public\Serialization\BitReader.h:57]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff614e3f578 MyGame.exe!FNetPacketNotify::ReadHeader() [G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Engine\Private\Net\NetPacketNotify.cpp:146]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff614df09b5 MyGame.exe!UNetConnection::ReceivedPacket() [G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Engine\Private\NetConnection.cpp:2684]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff614df5657 MyGame.exe!UNetConnection::ReceivedRawPacket() [G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Engine\Private\NetConnection.cpp:1810]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff60e2ec322 MyGame.exe!USteamSocketsNetConnection::HandleRecvMessage() [G:\GitHub\UE5\UnrealEngine\Engine\Plugins\Runtime\Steam\SteamSockets\Source\SteamSockets\Private\SteamSocketsNetConnection.cpp:228]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff60e2f230e MyGame.exe!USteamSocketsNetDriver::TickDispatch() [G:\GitHub\UE5\UnrealEngine\Engine\Plugins\Runtime\Steam\SteamSockets\Source\SteamSockets\Private\SteamSocketsNetDriver.cpp:313]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff614e2948b MyGame.exe!TBaseUObjectMethodDelegateInstance<0,UNetDriver,void __cdecl(float),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:618]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff60e35c85a MyGame.exe!TMulticastDelegate<void __cdecl(float),FDefaultDelegateUserPolicy>::Broadcast() [G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Core\Public\Delegates\DelegateSignatureImpl.inl:975]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff614cbf175 MyGame.exe!UWorld::Tick() [G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1378]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff614a09a78 MyGame.exe!UGameEngine::Tick() [G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Engine\Private\GameEngine.cpp:1778]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff60c8afa93 MyGame.exe!FEngineLoop::Tick() [G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5367]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff60c8cc18c MyGame.exe!GuardedMain() [G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Launch\Private\Launch.cpp:202]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff60c8cc25a MyGame.exe!GuardedMainWrapper() [G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:107]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff60c8cf1e6 MyGame.exe!LaunchWindowsStartup() [G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:244]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff60c8df884 MyGame.exe!WinMain() [G:\GitHub\UE5\UnrealEngine\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:283]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff616ae1bba MyGame.exe!__scrt_common_main_seh() [D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff8497074b4 KERNEL32.DLL!UnknownFunction
[2022.12.10-01.29.05:108][926]LogOutputDevice: Error: [Callstack] 0x00007ff84b7226a1 ntdll.dll!UnknownFunction

Oh really? Is it just happening when joining the session? And what’s your build configuration?

Yeah, I’m on Development build configuration. I’m trying to debug to see what’s happening, and from what I see the PacketHeader is overflowing, but I don’t know why. Maybe it’s the SteamSockets plugin and the max packet size set to 1024.

EDIT: Solved the issue, I had to disable the net verify client ID and session ID on both client and server :joy:

Ok :smiley: How did you disabled?

WIth these two console commands:

net.VerifyNetSessionID 0
net.VerifyNetClientID 0

or by editing the engine source code and disabling the global variables there instead of using the console commands. This is a temporary fix though, because there is an issue with the system and Steam, but it should not be disabled because it gives additional security on UDP packets.

1 Like