Android can't connect using Photon Realtime

Hi everyone,
Whenever I try to connect to my game server with an android device, I get the following error from debugReturn:

ERROR PeerBase.cpp onConnect() 422 4294967295 Connection error return: 1023

which seems to indicate a server exception occurred. Is there any known reason why this would happen specifically on Android devices? Using the exact same code on a Macbook Pro (connected to the same wireless network) it works just fine.
If it matters any, I've seen this issue on both a Xiaomi Pocophone F1 and a OnePlus 6.
Thanks!

Comments

  • Hi @dennens.

    The API reference docs for status code 1023 say the following:

    the PhotonPeer encountered an exception while opening the incoming connection to the server. The server could be down / not running.

    This means that the client encountered a socket error, because the server could not be reached.
    This might happen when your client does not have a connection to the network on which your server is or if it gets blocked by a firewall or router.

    It is strange that you can reach the same server from your macbook on the same WiFi.
    However that indicates that the server is working fine and that your client code is also correct.

    Can you reach the server from your phone with a ping app that does not use Photon? Does it work, when you switch the transport protocol in the Photon client from UDP to TCP (you might also try switching it in the OS X client to make sure that TCP connections work from there)?
  • dennensdennens
    edited June 15
    Hi @Kaiserludi , thanks for your response. Changing to tcp doesn't change anything - on android, the error still occurs, and on Mac it works as it did before.

    I'm using a default Photon Cloud App, is there any way to obtain its ip? I tried using wireshark to capture packets, but pinging the IP that resulted from that just ends up timing out


    I feel pretty dumb now - I was missing the android.permission.INTERNET permission in my android manifest. Adding this fixed the problem. Thanks for the help!
Sign In or Register to comment.