[AdvancedSessions] Tried to connect with an address with protocol Stea using a socket with protocol IPv4

I’m using advanced sessions and trying to start a server using a shortcut

D:\UE_4.25\Engine\Binaries\Win64\UE4Editor.exe “D:\UnrealProjects\PROJECT_NAME\PROJECT_NAME.uproject” -log -server

When I do so and it creates the advanced sessions I get this warning but I can see the server in the steam server browser, just not in my game when launched stand-alone:
LogSockets: Warning: Tried to connect with an address with protocol Steam using a socket with protocol IPv4

Same. Problem.

For anyone coming across this, although I don’t have much clue on why really this happens. This worked for me. I’m using 4.27 and noticed after installing the Steam client I get a crash due to NetDriver becoming nullptr in this part of the engine code, when I pass -log -server:

if (NetDriver == nullptr)
{
	GEngine->BroadcastNetworkFailure(this, NULL, ENetworkFailure::NetDriverCreateFailure);
	return false;
}

FString Error;
if( !NetDriver->InitListen( this, InURL, false, Error ) )
{
	GEngine->BroadcastNetworkFailure(this, NetDriver, ENetworkFailure::NetDriverListenFailure, Error);
	UE_LOG(LogWorld, Log,  TEXT("Failed to listen: %s"), *Error );
	GEngine->DestroyNamedNetDriver(this, NetDriver->NetDriverName);

For some reason the first line inside the second if block invalidates NetDriver (there is a nullptr check before the second if). If I change it to the following, it won’t crash but does not listen either:

if (NetDriver == nullptr)
{
	GEngine->BroadcastNetworkFailure(this, NULL, ENetworkFailure::NetDriverCreateFailure);
	return false;
}

FString Error;
if( !NetDriver->InitListen( this, InURL, false, Error ) )
{
	GEngine->BroadcastNetworkFailure(this, NetDriver, ENetworkFailure::NetDriverListenFailure, Error);
	UE_LOG(LogWorld, Log,  TEXT("Failed to listen: %s"), *Error );
	if (!NetDriver) {
		return false;
	}
	GEngine->DestroyNamedNetDriver(this, NetDriver->NetDriverName);

So, how did I solved it for now? I tried to uninstall the Steam Client and sadly it did not work. So, I checked my System Restore backups and luckily I had one a few hours prior to the Steam installation. I restored the system to that point and viola it’s gone.

Perhaps Steam Client changes something, the Unreal plugin is not happy with.

I’ve come across multiple mentions that Steam Sessions are broken in 4.27. I tested it myself, and with the same configuration in 4.26 everything is fine, but in 4.27 Steam Session creation fails. It has nothing to do with Advanced Sessions, because I’ve tried it in 4.27 without Advanced Sessions installed, just with the standard OnlineSubsystemSteam enabled.

Thank you! Good to know.