o3de-multiplayersample icon indicating copy to clipboard operation
o3de-multiplayersample copied to clipboard

Connection cannot be established successfully between an Android client and Windows server

Open junbo75 opened this issue 2 years ago • 4 comments

Describe the bug When tried to connect an Android client to a Windows server, I got log messages on both of the client and server side about the outgoing/incoming connection. However, the connection wasn't established successfully and the client didn't load any level.

Steps to reproduce Steps to reproduce the behavior:

  1. Build Asset Processor and MultiplayerSample.ServerLauncher on Windows
  2. Create self-signed certificate using OpenSSL. Add the certificate and private key files under the project root.
  3. Create an autoexec.game.setreg file under the project Registry folder with the following content:
{
    "O3DE": {
        "Autoexec": {
            "ConsoleCommands": {
                "net_UdpUseEncryption": "true",
                "net_TcpUseEncryption": "true",
                "net_SslExternalCertificateFile": "<certificate_file_name>.pem",
                "net_SslExternalPrivateKeyFile": "<private_key_name>.pem",
                "net_SslExternalContextPassword": "<password>"
            }
        }
    }
}
  1. Modify https://github.com/o3de/o3de-multiplayersample/blob/development/autoexec.cfg to add the connect <windows_server_ip> command
  2. Process all the Android and Windows assets using Asset Processor
  3. Build MultiplayerSample.GameLauncher following O3DE instructions
  4. Deploy MultiplayerSample.GameLauncher to the Android device
  5. Remove the connect <windows_server_ip> command from autoexec.cfg and start MultiplayerSample.ServerLauncher on Windows using the MultiplayerSample.ServerLauncher.exe --console-command-file=server.cfg command
  6. Launch MultiplayerSample on the Android device

Expected behavior Android client is able to connect to the server and game level is loaded successfully

Actual behavior

  • Got a message from the Android client: "New outgoing connection to remote address: 192.168.13.104:33450"
  • Got a message from the Windows server: "<11:07:33> (Logger) - New incoming connection from remote address: 192.168.13.48:44146"
  • No log messages on either the client or the server side about the connection status updates and no level is loaded on the client side.

Screenshots/Video Server side: server Client: Screenshot_20220331-111329_MultiplayerSample Screenshot_20220331-111336_MultiplayerSample Screenshot_20220331-111536_MultiplayerSample

Found in Branch Latest O3DE dev branch and MultiplayerSample dev branch@8dee2e5f527

Desktop/Device (please complete the following information):

  • Device: PC and Samsung
  • OS: Windows and Android

Additional context Add any other context about the problem here. Server(1).log android_client_log (1).txt

junbo75 avatar Mar 25 '22 00:03 junbo75

I'll try to repro this issue and attach screenshots.

junbo75 avatar Mar 25 '22 00:03 junbo75

Will leave in triage pending extra information from @junbo75

lmbr-pip avatar Mar 31 '22 17:03 lmbr-pip

@lmbr-pip Just added screenshots and logs.

junbo75 avatar Mar 31 '22 18:03 junbo75

Issue accepted in sig-network triage on 4/7/2022.

AMZN-puvvadar avatar Apr 07 '22 17:04 AMZN-puvvadar