[UE4.7.2] Getting userId: Invalid Error for Multiplayer

My friend and I are trying to work on a project together, and we’re starting off with the Third Person Example. We want to make a multiplayer game, so I looked into the networking and port-forwarded the correct port (7777). After that, he was able to connect to me from his editor if I ran a dedicated server in mine, this method worked for about an hour. It has since stopped working, and I am now getting an error message that says:

LogNet: Login request: /Game/ThirdPersonBP/Maps/ThirdPersonExampleMap userId: Invalid

This happens when he tries to connect to me, so I know the signal is at least making it through. I did some searching and it seems like many other people have had similar issues, but I was unable to find a response that actually solved the problem.

We have even started over the project to make sure that we didn’t accidentally change a setting, and we still have had no luck. The strange thing is that if I run it outside of the editor (from the Launch option rather than Play), he is actually able to connect to me (from his editor), although this will crash him as soon as either one of us terminates the connection.

I can post more of the logs if necessary,

Thanks!

To my knowledge connecting from one machine to another while in PIE is not supported. The reason is that the “map package” that you’d have is a temporarily saved version of your level at the time you started PIE. Even if the other user has the same map, they don’t have the exact same map path/GUID wise. If you got further it will tell you that you don’t have the same content and fail.

If you don’t chose an online platform (Steam, etc), you should be using the OnlineSubsystemNULL interface and you should still always get a valid, albeit fake, UserId. It would look like a GUID with the machine name in it (see GenerateRandomUserId())

That being said, the user id Invalid message you see shouldn’t be a big deal. It is simply logging the NMT_Login phase of handshaking. I’d expect more errors/info above and below that indicating the actual error (which may be what I described above). The client logs from your friend would probably show the right thing, but including both logs would be best. Can you unsuppress DevNet and DevOnline logs?

DefaultEngine.ini

[Core.Log]
LogNet=verbose
LogOnline=verbose