Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Very mysterious connection error

Discussion in 'iOS and tvOS' started by realragnvaldr, Jan 17, 2022.

  1. realragnvaldr

    realragnvaldr

    Joined:
    Jul 21, 2019
    Posts:
    41
    I made an app for iOS and Android, which uses Microsoft Azure's platform for server side stuff. It uses UnityWebrequest to communicate with the server (via php API calls)

    One of the players of my app reported a very mysterious problem. He has a phone with two sim cards (private and work). When he is on sim card #1, the app works as it should. But when he is on sim card #2, he gets a "Cannot connect to destination host", whenever the app tries to contact the server.

    One of our first hypotheses was that somehow the network of sim card #2 blocks calls to the Azure server. However, the strange thing is, if he copy-pastes the exact same URL that gives problems in the UnityWebrequest call into his browser, he gets a valid server response.

    Any ideas on what could possibly be the problem here are highly appreciated.

    Thanks!

    EDIT: The player has just informed me that if he switches the simcard to another device, it does actually work. So it seems to be a weird combination of sim + device.
     
    Last edited: Jan 20, 2022
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You could use Charles Proxy to see what is happening, they have a new iOS version that works well. Or you can just use Charles on your Mac/PC and point to it from your device https://support.unity.com/hc/en-us/articles/115002917683-Using-Charles-Proxy-with-Unity
     
    realragnvaldr likes this.