Search Unity

Socket Connection Problem at IOS

Discussion in 'Scripting' started by XAfgun, Mar 26, 2020.

  1. XAfgun

    XAfgun

    Joined:
    Oct 2, 2012
    Posts:
    33
    We are developing online game with Unity 2018.4. We used LiteNetLib and Lidgren as Network Library.

    Our build works on android, IOS, PC.

    We tested all things like low battery mode, slow connection mode with iPhone11 IOS 13.3.1 and all works well.

    We sent our game to Apple for review.

    After apple staffs are trying to connect our server. Peer connected but timeout in 5 sec. And at client side socket connection failed.

    Same os same device works well at our side additionally, iPhone 7, İphone 8+ etc works, too. PC, Android versions works, too.

    What can we do at this stage?
     
    IgorAherne likes this.
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,736
    Perhaps try it with a proxy that conditions the line to have bad network connection, i.e., lots of dropped packets.

    Also, be sure your server is fully reachable from places other than your own network.

    Finally when your app times out try, modify your build to gather up as much debugging information in the run (error, what it was doing, etc.) and send it back home to you via some kind of eventing system, such as Flurry.
     
    Joe-Censored likes this.
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Are you just testing local to the server? Have you tested with high latency? You might have connection timeouts set too short for example, but won't notice when you have a 10 ms ping locally. I've got a friend on another continent I usually ask to try my game whenever I want to do some latency testing, but you could use a VPN service to bounce your connection off another continent to induce some latency.

    If you want to get fancy, set up a computer as a network bridge using DummyNet, and use it to simulate any network conditions you want. Free software. Used to use it all the time when I worked for a network appliance company.
     
    nilsdr likes this.
  4. XAfgun

    XAfgun

    Joined:
    Oct 2, 2012
    Posts:
    33
    We tried at all network conditions on apple also we tried from about 8 different network.

    I will look forward to flurry.
     
  5. XAfgun

    XAfgun

    Joined:
    Oct 2, 2012
    Posts:
    33

    No tested on AWS EC2 instance with IPv4 and IPv6. Tested with high latency, too. Timeout was 5 seconds.
     
  6. kenfalco

    kenfalco

    Joined:
    Jul 18, 2012
    Posts:
    27
    Hi, we have exactly the same problem.
    Unity 2017.4.27f1 + Lidgren everything works well both in the local network and in WIFI and in 3g but it cannot connect to our server during the Apple review.
    Our game has been in the Apple store since 2012 and we haven't changed anything in the network library.
    It seems as if something has changed in their network or infrastructure.
    Anyone have a suggestion?

    Code (CSharp):
    1. Apr 03 2020 21:23:53 IPV6 SOCKET CREATED!
    2. Apr 03 2020 21:23:54 Connector.cs -> Connecting to :www.oursite.com 14240
    3. Apr 03 2020 21:23:54 Netpeer.cs -> Connecting 37.xxx.xxx.xxx
    4. Apr 03 2020 21:23:55 Netpeer.cs ----> Connect remoteEndPoint :::ffff:37.xxx.xxx.xxx:14240
    5. Apr 03 2020 21:23:55 Must pass an IPv4 address to MapToIPv6
    6. Apr 03 2020 21:23:55 Socket bound to :::0: True
    7. Apr 03 2020 21:23:55 m_configuration.LocalAddress : ::
    8. Apr 03 2020 21:23:55 IPV6 BIND TO :::0
    9. Apr 03 2020 21:23:56 Network thread started
    10. Apr 03 2020 21:23:56 Resending Connect...
    11. Apr 03 2020 21:23:58 Resending Connect...
    12. Apr 03 2020 21:24:01 Resending Connect...
    13. Apr 03 2020 21:24:04 Resending Connect...
    14. Apr 03 2020 21:24:07 Connector.cs ---> Disconnected
     
    Last edited: Apr 4, 2020
    omer12 likes this.
  7. omer12

    omer12

    Joined:
    Oct 10, 2015
    Posts:
    6
    #kenfalco
    I'm having the same problem, have you found a solution?
     
    Last edited: Apr 26, 2020
  8. HARPGAME

    HARPGAME

    Joined:
    Oct 4, 2019
    Posts:
    2
    Same problem here, any solution ?
     
  9. IgorAherne

    IgorAherne

    Joined:
    May 15, 2013
    Posts:
    393
    Last edited: Jun 23, 2020
  10. RevenantX

    RevenantX

    Joined:
    Jul 17, 2012
    Posts:
    148