pun 2 automatically disconnected in android device

hello,
i am facing this issue when demo app run on android device.It works fine in another device and also in editor but not on my device
Connect() to 'ns.exitgames.com' (InterNetworkV6) failed: System.Net.Sockets.SocketException (0x80004005): Network is unreachable.

Best Answer

  • Accepted Answer
    i don't know why this happening and showing different error but i am new in photon networking and stuck in it that's why i am posting question but it solved by changing scripting backend mono to IL2CPP.
    so thank you for your time.

Answers

  • Hi @sonal_dhole2,

    What is the PUN2 version you are using?
    What is the Unity version you are using?
    What is the scripting backend you are using? IL2CPP/mono? .Net2/.Net4.6?

    What other devices/machine (device model, OS) did you test this on?
    Are all these devices connected to the same network?
    Does this network use IPv6 only?
  • PUN V2.6
    UNITY 2018.3.3F1
    backend : mono/ .net4.x
    device : vivo 1803
    no they are not connected in same network
  • Hi @sonal_dhole2,

    Can you confirm that only that device how has this issue, has IPv6 address and the others have IPv4?
  • now in all devices it display same error.but now i solve it by changing scripting backend mono --> IL2CPP
    Thank you for your help @JohnTube
  • JohnTubeJohnTube mod
    edited February 11
    Hi @sonal_dhole2,

    now in all devices it display same error.
    Could you help us identify why this is happening so we could fix it? maybe others can't accept your workaround as a solution.

    when you say "all devices", are they all Android?
    are those devices still connected to a different network?
    so if all devices had this error, your game didn't work on all devices?
    could you check if they use IPv6 or IPv4? (Googling how to can help if you can't get this info)

    Thanks!
    your help is much appreciated.
  • when you say "all devices", are they all Android? yes they all are android devices

    are those devices still connected to a different network? yes

    so if all devices had this error, your game didn't work on all devices? it works bt after connecting network it automatically disconnected by message display in terminal
    Connect() to 'ns.exitgames.com' () failed: System.Net.Sockets.SocketException (0x80004005): Could not resolve host 'ns.exitgames.com'

    could you check if they use IPv6 or IPv4? don't know about this.
  • JohnTubeJohnTube mod
    edited February 11
    hey @sonal_dhole2,

    I'm having troubles following you
    In your original post the error was:
    Connect() to 'ns.exitgames.com' (InterNetworkV6) failed: System.Net.Sockets.SocketException (0x80004005): Network is unreachable.
    Now it's:
    Connect() to 'ns.exitgames.com' () failed: System.Net.Sockets.SocketException (0x80004005): Could not resolve host 'ns.exitgames.com'


    Anyways, I think I will stop investigating until someone else reports the issue from the original post.
    Thank you.
  • Accepted Answer
    i don't know why this happening and showing different error but i am new in photon networking and stuck in it that's why i am posting question but it solved by changing scripting backend mono to IL2CPP.
    so thank you for your time.
  • Same issue happened with me exactly. And the solution of changing the scripting to IL2CPP solved it for me.
  • JohnTubeJohnTube mod
    edited August 8
    Hey @sonal_dhole2, @Raheem,

    I would like to thank you again for your reports and feedback.
    But I need your help in reproducing, investigating and fixing this.

    The information I have right now is from @sonal_dhole2:

    It works fine in another device and also in editor but not on my device



    PUN V2.6
    UNITY 2018.3.3F1
    backend : mono/ .net4.x
    device : vivo 1803


    i solve it by changing scripting backend mono --> IL2CPP


    The information I have from @Raheem:

    it works perfectly on the editor, my Samsung Note 9, and my Samsung Tablet
    I tried to install it my older phone Galaxy S7, and the game doesn't connect to the Photon cloud


    the solution of changing the scripting to IL2CPP solved it for me.


    You both get this error/exception in the log:

    Connect() to 'ns.exitgames.com' (InterNetworkV6) failed: System.Net.Sockets.SocketException (0x80004005): Network is unreachable.


    @Raheem

    When this happend,
    What Unity version you were using?
    What PUN version you were using?

    @Raheem @sonal_dhole2,

    From the info I have, it looks like this happens on some Android devices and not all.
    Maybe the Android OS version is a hint.
    Could you find out the OS version for the tested Android devices? which one works and which one does not?
    Does this happen with old mono / .NET2 (3.5) if available?
    Also, could you find out if the network used has IPv6 or IPv4 and if those devices are using IPv4 or IPv6?

    Thanks a lot again for your help!
    Much appreciated.
  • Hi @sonal_dhole2, @Raheem,

    Could we give you a different Photon3Unity3d.dll version to test and try to reproduce again?
  • ya sure
  • JohnTubeJohnTube mod
    edited August 20
    Hi @sonal_dhole2,

    Thank you for offering to help test this.

    PUNv2.6 is quite old.

    PUN v2.14 has been released with a new library (Photon3Unity3d.dll) version already.
    Try that one.
Sign In or Register to comment.