Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

unity said they support ipv6 but apple reject my game for IPv6 network connection (unity 5.6.3f1)

Discussion in 'Multiplayer' started by bouemama, Nov 10, 2017.

  1. bouemama

    bouemama

    Joined:
    Dec 6, 2016
    Posts:
    18
    hi, this is apple msg :

    We discovered one or more bugs in your app when reviewed on an iPhone and iPad running iOS 11.1 on Wi-Fi connected to an IPv6 network.
    Specifically, we were unable to start the gameplay because we encountered connection issues.


    the game connect to server and get data from database via www request All its okay but when client click join room server not response and get TimeOut alert as result .

    info :
    +hosted on ovh dedicated server
    +ubuntu linux standalone headless
    +connected with ipv4 clients only (the problem)
    +i use StartServer() function serverside listening to 7777 port and default StartClient() on client side probably the problem on startclient or server listening only to ipv4

    any solution plz !!
     
  2. MCoburn

    MCoburn

    Joined:
    Feb 27, 2014
    Posts:
    71
    Hmm. Does your server have a IPv6 address? If not, you will not be able to serve content to your clients over IPv6.

    What exactly are you trying to do? Get content over IPv6 or connect to a IPv6 host?
     
  3. bouemama

    bouemama

    Joined:
    Dec 6, 2016
    Posts:
    18
    hi Mcoburn,

    Does your server have a IPv6 address?
    my server ip is ipv4
    If not, you will not be able to serve content to your clients over IPv6
    i can serve content via www request for client with ipv6

    What exactly are you trying to do :
    i have a loading scene that load user data info over www request ,whene user data loaded
    user redirect to offline scene then user can select a room (host) to join ;

    apple attache a screen from offline scene and they said they cant connect to host via Wi-Fi connected to an IPv6 network.

    so a client with ipv6 cant join the host but im sure he can communicate with server via www request
    when a user click join room a startClient function fired on client ;
    i dont know why a client with ipv6 can connected to apache :80 and cannot connect to host on same server
     
    Last edited: Nov 11, 2017
  4. MCoburn

    MCoburn

    Joined:
    Feb 27, 2014
    Posts:
    71
    Okay. So from what I can understand:

    Your server has a IPv4 address only. Ok, got it.

    I am assuming that the client device has both IPv4 and IPv6 addresses. No problems with this however if the client is IPv6 only (which is very rare but let's say there's a very low chance that it could happen) then it will not be able to connect to a IPv4 server since IPv6 uses different addressing.

    So from what I understand is this:

    Your loader contacts your server and fetches a user profile (let's say that for arguments sake).
    It then loads the Host/Room Select screen. From there you select the Host you want to join and let the game connect, etc.

    Apple's description is a little vague - when they mean host did they mean game host or the web server?

    The only issue I can think of is that the IPv6 is a link-local or temporary IPv6 link. How is the host instances configured? Is this a binary build running on your server or another device? If it's a dedicated-type setup on a Windows/Linux box, then you will need to ensure the appropriate firewall ports are open.

    You might also be running into an issue with firewalls. Off the top of my head, I believe this is needed when you're behind a restrictive firewall. Alternatively, StartHost is listening on an IPv4 address of the device instead of the IPv6 address.
     
    bouemama likes this.
  5. bouemama

    bouemama

    Joined:
    Dec 6, 2016
    Posts:
    18
    thanks for ur response )

    Your server has a IPv4 address only. Ok, got it.

    there is a option in my ovh panel to add ipv6 ip to my server but i dont think problem is ovh server

    Apple's description is a little vague - when they mean host did they mean game host or the web server?
    they absolutely mean game host [the headless instance] because they give me a screen from offline scene
    i have :
    +loading scene (its load the game settings and make a call to myserverIPV4:80/GetUserInfo.php via www unity api )
    +offline scene (where client can browse available host and select one to join ex ip:7778 )
    +online scene (when client join a host)
    if loading scene fail getting user info the user never move to the "offline scene" so the ipv6 apple user stuck on
    "offline scene" that mean he successful connect to my server via web or www request.

    they give me a screen with connection TimeOut and this alert shown only if a user click on join host btn
    and server not response for (delay of seconds) .

    The only issue I can think of is that the IPv6 is a link-local or temporary IPv6 link. How is the host instances configured? Is this a binary build running on your server or another device? If it's a dedicated-type setup on a Windows/Linux box, then you will need to ensure the appropriate firewall ports are open.

    +i export a linux headless instance from the unity and host it on ubuntu system on ovh dedicated server
    +i run multi instance each instance listening to different port
    +all target post are "forward"

    the setup is okay cause already a user with ipv4 can connect to server and join host with no problems
    the only ipv6 users has this issue.

    unity already said they fix the ipv6 problems but im on unity 5.6.3 and still face ipv6 connection issue
    https://blogs.unity3d.com/2016/05/10/unity-and-ipv6-support/
     
  6. MCoburn

    MCoburn

    Joined:
    Feb 27, 2014
    Posts:
    71
    Hmm...

    To help debugging further, what I would do is if you have a intermission screen that says "Now Connecting..." or similar, try making a UI Text object, then attach a script (example code is below). You'd want to be populating it with the Host Address and Port that the networkManager is using - ipAddress and port are the properties you want which allows you to examine if NetworkManager is having issues parsing/connecting to IPv6 stuff.

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using UnityEngine.UI;
    4.  
    5. public class DebugNetworkManagerConnectorText : MonoBehaviour {
    6.   public NetworkManager m_SrcNetworkManager;
    7.   private Text m_Output;
    8.  
    9.   private void Start() {
    10.     m_Output = GetComponent<Text>();
    11.  
    12.     if(m_SrcNetworkManager == null || m_Output == null) {
    13.       enabled = false;
    14.       return;
    15.   }
    16.  
    17.   private void LateUpdate() {
    18.     if(m_Output != null) m_Output.text = string.Format("IP: {0}\nPort: {1}", m_SrcNetworkManager.ipAddress, m_SrcNetworkManager.port);
    19.   }
    20. }
    21.  
    Ensure you set up a reference to the network manager or the script won't run.

    Stuff like this is great for visual debugging.

    Do you have IPv6 in your testing environment network?