Connection problem from Mobile client using cellular networking (not WIFI)

We have a custom Photon Server plugin running on an AWS EC2 instance and everything is working great when connecting from a PC client or a mobile client which is connected using a WIFI connection.

However when a mobile client attempts to connect whilst not using WIFI (e.g. using a 4G cellular connection) then OnConnectedToMaster() is never called, although it also doesn't fail to connect it just seems to get stuck.

After enabling full network logging it seems the following gets called repeatedly after Connect() is called:
ReceiveLoop() got a WouldBlock exception. This is non-fatal. Going to continue.

I can't seem to see what's behind it, but maybe OnConnectedToMaster() is being prevented from being called somehow?
Has anyone had a similar experience?

Is there anything different about a cellular connection compared to using WIFI that needs setting up on the server or client?

Thanks!

Comments

  • So I'm logging some more info and it looks like the client is stuck Connecting To Master when using a 4G connection (but again it's fine when connected via WIFI)
    Maybe the mobile network carrier is blocking access to port 4530 which is the default Photon port for client -> master sever TCP connections?

    Has anyone had issues with this before? Is there another port that mobile games use for TCP that is allowed by most 4G networks? Or am I looking at the wrong thing here..
  • Probably no one reading this but the problem weirdly seemed to fix itself!
    I was in the middle of checking which packets were getting sent and received server side and then when I next tried running a game without WIFI it all just worked...
    Initially I thought it was related to me trying to switch the server into using IPv6 but after reverting those changes it carried on working.

    Potentially some ports were getting blocked by my mobile network service provider, but otherwise I guess it was just one of those phantom bugs!
  • hey, @ToddRivers

    I'm very sorry. Not sure how I missed your question.

    so, I'm glad that everything works. Photon neither client nor server does not do any difference between different transport layers. so, if you are using 4G ok, wifi ok. if transport layer is ok we are also work as expected.

    What I would check is client side code. sometimes developers transit to new stage when previous is not finished yet. this may lead to different race conditions - usually everything just works but sometimes it does not because some delay happened on the previous stage. Do you see what I mean?

    So you changed your transport layer. it may work differently in sense of delays. Mya be in your client code there is some race condition. Please check that you start to connect to master when you finished with name server.

    Also, this kind of questions are more client side. and if you would ask there you would get more sane support.

    best,
    ilya