Cast of IpConnection /Engine/Transient.IpConnection_32 to LocalPlayer failed

I’m posting the answer here because I couldn’t find any answers on the Internet.

If Unreal crashes with the error:

Cast of IpConnection /Engine/Transient.IpConnection_32 to LocalPlayer failed

In my case, the error was caused by the node (GetPlayerController) because the link to the character was already empty.

It is strange that this occurred with 2 or more simultaneous clients.

But with (Server) + (Client) there was no such error.

Someone wrote that (GetPlayerController=0) causes errors in multiplayer, but in my case everything works fine.