HTML5 Socket Connection Failure

Preface

I know that HTML5 has been deprecated and I am using the community HTML5 branch found here: GitHub - UnrealEngineHTML5/Documentation. I compiled the Engine from that source.

Due to this being an HTML5 multiplayer game, I turned on the “Experimental WebSocket Networking Plugin”. I successfully compiled, packaged, and hosted the ThirdPerson example project on my Azure server. I can load the game in multiple browsers just fine.

Due to all of the trouble shooting I’ve been trying, I have disabled IIS on my Azure server and use the compiled HTML5LaunchHelper.exe that is generated during Packaging. I wanted to make sure both Local and Remote Azure were running the same Web Server experience.

Problem

The game will not connect to my remote dedicated game server using the terminal’s open command when I load the game from external Azure site (https://testwinvm.eastus.cloudapp.azure.com/VirtualShow.html). Example of this Scenario’s architecture below:

When I load the game from local (http://localhost:8000), the game connects perfectly fine to my remote dedicated game server. Example of this Scenario’s architecture below:

I’ve been inspecting the Debug Console between both scenarios. I thought this might be an CORS issue, but I do not notice any difference in the Headers being sent between the two scenarios. I thought maybe the MIME type encodings are incorrect between the two scenarios, but they look exactly the same. Example below, left is local/scenario two and right is remote/scenario one:

The only thing I notice in the Debug Console that is different between the two scenarios is after the game is already fully loaded in browser. When I execute the terminal’s open command, the console logs varying outputs.

Scenario One Output

Scenario Two Output

I can’t find the difference between Error Code 23 vs Error Code 26. Why does Error Code 26 still allow connection to the Dedicated Game Serve when Error Code 23 does not? Why does Error Code 23 produce malformed packets and ultimately close the connection to the Server? This is where I’m stumped and the only lead I have left.

EDITS

I believe I found the Error Codes for Socket Connections. Below is a snippet of the Error List. Error Code 26 is “Connection already in progress”. Error Code 23 is “Host is Unreachable”. Why would the Host be unreachable in scenario one while it can be easily reached in scenario two and loading the standalone win64 client?

var ERRNO_MESSAGES = {
 0: "Success",
 1: "Arg list too long",
 2: "Permission denied",
 3: "Address already in use",
 4: "Address not available",
 5: "Address family not supported by protocol family",
 6: "No more processes",
 7: "Socket already connected",
 8: "Bad file number",
 9: "Trying to read unreadable message",
 10: "Mount device busy",
 11: "Operation canceled",
 12: "No children",
 13: "Connection aborted",
 14: "Connection refused",
 15: "Connection reset by peer",
 16: "File locking deadlock error",
 17: "Destination address required",
 18: "Math arg out of domain of func",
 19: "Quota exceeded",
 20: "File exists",
 21: "Bad address",
 22: "File too large",
 23: "Host is unreachable",
 24: "Identifier removed",
 25: "Illegal byte sequence",
 26: "Connection already in progress",
 27: "Interrupted system call",
 28: "Invalid argument",
 29: "I/O error",
 30: "Socket is already connected",
.
.
.
 156: "Level 2 not synchronized"
};

Additional Notes

The project is hosted here: https://testwinvm.eastus.cloudapp.azure.com/VirtualShow.html

Project download to run locally is here: https://testwinvm.eastus.cloudapp.azure.com/VirtualShow.zip

The dedicated game server IP for terminal’s open command: 20.55.123.171

TL;DR It’s like Firefox is blocking my Socket Connection when it’s opening the site on a remote server… But it’s totally cool with Socket Connections if the site is being opened on localhost. I do not know why. Can you help?

Hey, Can you specify which version of engine you are using and share the code for connection you are using. Please share the solution too if you have solved it.