Skip to content

Enshrouded Host does not allow others to join due to network error "Packet from 0 is smaller than the header" #238

Description

@digby-chicken-caesar

Hi @Detanup01,

The folks at NucleusCoop recommended that I share my findings with you!

I tried to add this research to the bottom of Issue #156, but i wasn't sure you would receive it. I apologize if it causes you extra noise.

Symptom: Unable to join dedicated servers when playing Enshrouded via GBE.
In NucleusCoop, the 2nd instance launches and can join player 1's game but will never load.

The Enshrouded devs re-introduced their Steam API changes in the most recent update,
https://enshrouded.com/news/enshrouded-thralls-of-twilight-update
"Re-enabled the current Steam API for network connections. Changes have been made to take into account users hosting on home networks."

Patch #7 v.0.8.01 "resolved" this issue originally caused by Update #5 by reverting their Steam API :
https://enshrouded.com/news/changelog-for-patch-7-v-0-8-0-1
"The previous version of the Steam API is now used again while we are investigating reports of lags and stuttery network connections when using the current Steam API version."

I found that we can review each instance's Enshrouded application logs while Nucleus is running.
In doing so I have found an error that occurs when Player2 joins Player1's game!

For me, logs were found in these directories while Nucleus was running; these appear to be copies of the game files found in "...\Steam\steamapps\common\Enshrouded"
C:\NucleusCoOp\content\Enshrouded\Instance0\enshrouded.log
C:\NucleusCoOp\content\Enshrouded\Instance1\enshrouded.log

In Enshrouded v0.8.1.0, it is clear that Player 2 is waiting for some action by Player 1, aka "Peer #0" in this case but automatically timeouts and cancels after 8 seconds...

I believe root cause resides in the difference between the old/new Steam APIs:
Deprecated: ISteamNetworking
Currently used: ISteamNetworkingSockets

[I 00:01:20,210] [online] Requested lobby data for lobby 109775242726233976.
[I 00:01:20,260] [online] Entered lobby (109775242726233976).
[I 00:01:20,260] [OnlineProviderSteam] 'JoinOrCreateGame' (up)!
[I 00:01:20,276] Initializing P2P api: NetworkingMessages
[I 00:01:20,276] [online] Added peer #0 (76561199023125438)
[I 00:01:20,276] [OnlineProviderSteam] 'SetLobbyData' (up)!
[I 00:01:20,276] [OnlineLocalPlayerSteam] started transition from 'SignedIn' to 'InGame' (current='<invalid>')!
[I 00:01:20,293] [OnlineLocalPlayerSteam] 'AddPlayerToLobby' (up)!
[I 00:01:20,293] [OnlineLocalPlayerSteam] finished transition from 'SignedIn' to 'InGame' (current='InGame')!
[I 00:01:20,293] [OnlineProviderSteam] 'JoinLocalPlayers' (up)!
[I 00:01:20,326] [online] Session accepted by peer #0
[I 00:01:22,512] [gameframework] Window became active ...
...
...omitting vulkan swap chain errors associated with vkQueuePresentKHR & vkAcquireNextImageKHR, as they occur for Instance0/Player1 as well.
...
[E 00:01:30,262] [online] Timeout for peer #0
[I 00:01:30,262] [online] Removed peer #0

I analyzed what happens when playing a normal v.0.8.1.0 online game through Steam:
Here, we can see some action from [OnlineProviderSteam] that takes place directly after "Session accepted by peer #0"

[I 00:00:46,535] Initializing P2P api: NetworkingMessages
[I 00:00:46,550] [online] Added peer #0 (76561197997223686)
[I 00:00:46,550] [OnlineProviderSteam] 'SetLobbyData' (up)!
[I 00:00:46,550] [OnlineLocalPlayerSteam] started transition from 'SignedIn' to 'InGame' (current='<invalid>')!
[I 00:00:46,552] [OnlineLocalPlayerSteam] 'AddPlayerToLobby' (up)!
[I 00:00:46,552] [OnlineLocalPlayerSteam] finished transition from 'SignedIn' to 'InGame' (current='InGame')!
[I 00:00:46,552] [OnlineProviderSteam] 'JoinLocalPlayers' (up)!
[I 00:00:47,202] [online] Session accepted by peer #0
[I 00:00:47,268] [OnlineProviderSteam] 'ConnectToPeers' (up)!
[I 00:00:47,268] [OnlineProviderSteam] finished transition from 'Initialized' to 'InGame' (current='InGame')!
[I 00:00:47,270] [Session] 'JoinOnline' (up)!
[I 00:00:47,334] [session] Swap player index 1 and 0.
[I 00:00:47,334] [SessionPlayer] started transition from 'Free' to 'Remote_InSession' (current='<invalid>')!
[I 00:00:47,334] [session] Remote player added. Player handle: 0(0)
[I 00:00:47,334] [SessionPlayer] 'JoinGame' (up)!
[I 00:00:47,334] [SessionPlayer] finished transition from 'Local' to 'Local_InSession' (current='Local_InSession')!
[I 00:00:47,334] [SessionPlayer] 'Reserve' (up)!
[I 00:00:47,334] [SessionPlayer] 'WaitForJoin' (up)!
[I 00:00:47,334] [SessionPlayer] finished transition from 'Free' to 'Remote_InSession' (current='Remote_InSession')!
[I 00:00:47,339] [Session] 'JoinPlayers' (up)!
[I 00:00:47,339] [Session] finished transition from 'Lobby' to 'Client_Online' (current='Client_Online')!
[I 00:00:47,352] [play] start creation step GameServerCreate
[I 00:00:47,352] [play] start creation step GameServerInit

I downgraded my game back to Update v.0.8.0.1 and had player2 join player1's game and saw a completely different process for joining the game successfully:

[I 00:00:18,307] [gameframework] Window became active ...
[I 00:00:23,350] [OnlineLocalPlayerSteam] started transition from 'SignedOut' to 'SignedIn' (current='<invalid>')!
[I 00:00:23,359] [OnlineLocalPlayerSteam] 'CheckSignInState' (up)!
[I 00:00:23,403] [OnlineLocalPlayerSteam] 'RequestAuthToken' (up)!
[I 00:00:23,403] [OnlineLocalPlayerSteam] finished transition from 'SignedOut' to 'SignedIn' (current='SignedIn')!
[I 00:00:23,404] [steam] Refreshing internet servers
[I 00:00:23,404] [online] Requested lobby data for lobby 109775241907953519.
[E 00:00:23,422] [online] No Dedicated Server Found
[E 00:00:23,422] [online] No Dedicated Server Found
[E 00:00:23,422] [online] No Dedicated Server Found
[I 00:00:26,298] [input] openVirtualKeyboard for user 0(1) (title:Enter password text:)
[I 00:00:30,288] [gameframework] Window became active ...
[I 00:00:33,665] -------------- Session ----------------
[I 00:00:33,665] Machines:
[I 00:00:33,665]   m#0(128): up 0 (0), down 0 (0), remote 0 (0), limit 2,048, lost 0, ping 9,223,372,036,854 ms, EstablishingBaseline
[I 00:00:33,665] ---------------------------------------
[I 00:00:35,367] [input] closeVirtualKeyboard for user 0(1)
[I 00:00:42,452] PregameFSM:  triggered 'Menu done'
[I 00:00:42,452] PregameFSM:        'Menu'::Exit #0
[I 00:00:42,452] 
[I 00:00:42,461] PregameFSM:        'ToPlayState'::Enter #0
[I 00:00:42,461] 
[I 00:00:42,461] [pregame] Start Play
[I 00:00:42,461] [pregame] start destruction step Search
[I 00:00:42,461] [pregame] start destruction step Init
[I 00:00:42,461] [play] start creation step Init
[I 00:00:42,461] [play] start creation step LoadingScreenStart
[I 00:00:42,461] [graphics] Reducing shader compilation task worker count in graphics system!
[I 00:00:42,461] [play] start creation step LoadSessionResources
[I 00:00:42,461] [play] start creation step Session
[I 00:00:42,466] [Session] started transition from 'Lobby' to 'Client_Online' (current='<invalid>')!
[I 00:00:42,466] [session] Swap machine index 1 and 0.
[I 00:00:42,466] [Session] 'PrepareGame' (up)!
[I 00:00:42,466] [SessionPlayer] started transition from 'Local' to 'Local_InSession' (current='<invalid>')!
[I 00:00:42,466] [OnlineProviderSteam] started transition from 'Initialized' to 'InGame' (current='<invalid>')!
[I 00:00:42,466] [SessionPlayer] 'ConnectLocalToGame' (up)!
[I 00:00:42,477] [online] Requested lobby data for lobby 109775241907953519.
[I 00:00:42,527] [online] Entered lobby (109775241907953519).
[I 00:00:42,527] [OnlineProviderSteam] 'JoinOrCreateGame' (up)!
[I 00:00:42,544] [online] Added Peer #0.
[I 00:00:42,544] [OnlineProviderSteam] 'SetLobbyData' (up)!
[I 00:00:42,544] [OnlineLocalPlayerSteam] started transition from 'SignedIn' to 'InGame' (current='<invalid>')!
[I 00:00:42,561] [OnlineLocalPlayerSteam] 'AddPlayerToLobby' (up)!
[I 00:00:42,561] [OnlineLocalPlayerSteam] finished transition from 'SignedIn' to 'InGame' (current='InGame')!
[I 00:00:42,561] [OnlineProviderSteam] 'JoinLocalPlayers' (up)!
[I 00:00:43,011] [OnlineProviderSteam] 'ConnectToPeers' (up)!
[I 00:00:43,011] [OnlineProviderSteam] finished transition from 'Initialized' to 'InGame' (current='InGame')!
[I 00:00:43,014] [Session] 'JoinOnline' (up)!
[I 00:00:43,032] [session] Swap player index 1 and 0.
[I 00:00:43,032] [SessionPlayer] started transition from 'Free' to 'Remote_InSession' (current='<invalid>')!
[I 00:00:43,032] [session] Remote player added. Player handle: 0(0)
[I 00:00:43,032] [SessionPlayer] 'JoinGame' (up)!
[I 00:00:43,032] [SessionPlayer] finished transition from 'Local' to 'Local_InSession' (current='Local_InSession')!
[I 00:00:43,032] [SessionPlayer] 'Reserve' (up)!
[I 00:00:43,032] [SessionPlayer] 'WaitForJoin' (up)!
[I 00:00:43,032] [SessionPlayer] finished transition from 'Free' to 'Remote_InSession' (current='Remote_InSession')!
[I 00:00:43,037] [Session] 'JoinPlayers' (up)!
[I 00:00:43,037] [Session] finished transition from 'Lobby' to 'Client_Online' (current='Client_Online')!
[I 00:00:43,044] [play] start creation step GameServerCreate
[I 00:00:43,044] [play] start creation step GameServerInit
[I 00:00:43,044] [play] start creation step GameClientCreate
[I 00:00:43,045] [play] start creation step GameClientInit

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions