Search Unity

Internet access failing when connnected via wifi: java.net.ConnectException: failed to connect to

Discussion in 'Android' started by bug5532, Sep 30, 2019.

  1. bug5532

    bug5532

    Joined:
    Aug 16, 2011
    Posts:
    307
    I'm having a really odd issue that seems to only affect a few devices. My app is failing to connect to anywhere whilst on WiFi. I get the error
    Code (CSharp):
    1. java.net.ConnectException: failed to connect to "server"
    What makes this stranger is that it will work with a freshly installed apk, this is what I've tried.

    1. WiFi On, Uninstall game, install game via apk.
    2. Open game, everything works!
    3. Kill game, Open game, everything works!
    4. Kill game, turn WiFi Off, turn Wifi On, Open game, ConnectException Error :(
    5. Turn WiFi Off (4g On), Open game, everything works!
    6. Turn Wifi On, Open game, ConnectException Error :(

    It's trying to connect to facebookGraph, unity and my server. All give the same error.
    I've also tested this on a different wifi network.

    This only happens on some devices, but I have absolutely no clue why, any ideas???
     
  2. bug5532

    bug5532

    Joined:
    Aug 16, 2011
    Posts:
    307
    I found the cause: pic below

    no idea how that got set though???!

    Anyone know if that can be set from within the app? by accident somehow?