BoltEngine / Bolt-Tracker

New issue tracker for Photon Bolt
10 stars 2 forks source link

Client on different router can not join the server #133

Closed dushukai closed 4 years ago

dushukai commented 5 years ago

Describe the bug If 2 players under different routers but under one same network. They cannot connect each other.

To Reproduce Steps to reproduce the behavior:

  1. First client connect to your home network and StartServer()
  2. Set up another router at home but use the same WAN.
  3. Second client StartClient() and connect to the session.
  4. Client See error "OpJoinLobby is only allowed when connected to a Master Server. Current Server: GameServer, current State: Leaving"
  5. Server See Error "[PUNCH FAILED] Local Player 1 with Remote Player 2"

Expected behavior Expected No Error.

Actual behavior Error shows and can not connect the the server.

Screenshots image image

Desktop (If applicable, please complete the following information):

Additional context

herpdederp commented 5 years ago

We've fixed the "OpJoin" issue and made other improvements to connecting in 1.2.9. Can you try with the latest Bolt version?

dushukai commented 5 years ago

I rollback to 1.2.9. Now there's no error but there's the warnings. "[PUNCH FAILED] Local Player 1 with Remote Player 2" server side but "[PUNCH FAILED] Local Player 2 with Remote Player 1" client side.

And they are still not connected, everything just stuck, no more log. image image

ramonmelo commented 5 years ago

@dushukai Can you run a test using an empty project with the Getting Started sample, for example, on Bolt 1.2.9 and send us the complete logs of server and client?

Keep in mind that the NAT punch is not guaranteed to always work.

dushukai commented 5 years ago

Server.log Client.log

ramonmelo commented 5 years ago

@dushukai Your logs are from different connection process. The server is creating the session ae7090b2-b34c-49e3-827b-8326affab2cd, but the client is connecting to session 3dbb217e-9209-4c80-9ce7-b1842629ba51.

In order to better understand the issue, we need the corresponding logs from the same connection attempt.

dushukai commented 5 years ago

Server.log

dushukai commented 5 years ago

Client.log

ramonmelo commented 5 years ago

Hello @dushukai,

Looking at the logs you sent, it seems you are indeed able to connect, not directly, but via the relayed connection. Also, one of your peers is able to receive and reply in the punch process, but the other doesn't. This is an expected behavior on some network configurations as some routers can block traffic between the peers. You can read more about the NAT punch process here and here.

Can you check again using our sample game linked here? And send the logs?

ramonmelo commented 4 years ago

Closing, as there is no response from the dev.