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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

SSL connectivity errors on Android

Discussion in 'Android' started by liortal, Jun 6, 2016.

  1. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,559
    Hi,

    We are seeing these random errors on Android on multiple devices:

    javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found

    javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x67179700: Failure in SSL library, usually a protocol error
    error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x5989076a:0x00000000)

    I've seen something similar that is related to UnityWebRequest:
    https://issuetracker.unity3d.com/issues/ssl-failure-with-www-32bit-os-x-player

    I wonder if this should cover the bug we're seeing as well? if not, what can we do to resolve this issue ?
     
  2. Kazs99

    Kazs99

    Joined:
    Jan 25, 2013
    Posts:
    16
    I have the same error on some Android devices (about 1%) :

    javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x665154c8: Failure in SSL...

    Dictionary<string, string> getHeaders
    {
    get
    {
    headers = new Dictionary<string, string>();
    headers["Content-Type"] = "application/json";
    headers["Authorization"] = "Bearer " + accessToken;
    return headers;
    }
    }

    WWW www = new WWW("https://url, null, getHeaders);

    if (www.error != null)
    {
    Debug.Log(www.error)
    }
     
  3. BlackFly

    BlackFly

    Joined:
    Mar 24, 2015
    Posts:
    5
    We are experiencing this issue on our test Samsung S4 but not on an S5 nor S6. We are attempting to download assetbundles from an Amazon S3 bucket which uses a certificate "symantec class 3 secure server ca - g4" certificate. I read an article stating that Android should no longer trust this certificate as it was being retired. I'm not sure whether this could be the issue given that the more recent phones can connect using HTTPS to the S3 bucket without any problems.

    Any suggestions on how I can troubleshoot or debug this issue?
     
  4. heroichippo1

    heroichippo1

    Joined:
    Mar 30, 2015
    Posts:
    36
    Also experiencing this issue from time to time when downloading asset bundles @Vincent Zhang Any updates as to why?

    Happens usually on first install of our game on a S5 device.
     
  5. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    343
    Just upgraded from 5.3.4 to 5.4.4 and i noticed this same issue on S5.
     
  6. kareldr

    kareldr

    Joined:
    Feb 9, 2017
    Posts:
    1
    also have this error on a samsung galaxy tab 3! on a samsung galaxy tab A it does work.. using unity 5.5.
    any news on this?
     
  7. QuantumCalzone

    QuantumCalzone

    Joined:
    Jan 9, 2010
    Posts:
    262
    bump?

    Getting this on my android galaxy s6 Unity5.6
     
  8. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,642
    We need a bug report with an URL that fails. The error described look like server certificate is not trusted.
     
  9. tyoc213

    tyoc213

    Joined:
    Nov 14, 2011
    Posts:
    168
    Some androids doesnt know all the handshake protocols/encryptions.. so they will fail, you need to setup more broad handshakes in the server to let the handshake be negotiated correctly according to each device (even iOS could have this issues), see the chipers configuration.



    Also you need to have a valid SSL, if not, you need to bypass it, remember that unity uses mono and so, the trusted certified list is... mmmm... well I dont know where it is but it is different from iOS, Android and WIn...
     
  10. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,642
    This last part is not true for UnityWebRequest. It uses trusted certificates from Android.
     
  11. JanusAnderson

    JanusAnderson

    Joined:
    Apr 30, 2013
    Posts:
    27
    Anyone find a solution for this? This seems to be still happening in Unity 5.5.3p2. FWIW, there were no problems until upgrading to 5.5.3, we have a live game and several players have reported that the android version became inoperable.
     
  12. adamspector-jrg

    adamspector-jrg

    Joined:
    Mar 14, 2017
    Posts:
    4
    Also, happening to %2 of our users and 25% of those users are on some version of Android 4.x
    Seeing errors like these:
    E/Unity ( 7846): java.net.SocketTimeoutException: SSL handshake timed out
    E/Unity ( 7846):
    E/Unity ( 7846): (Filename: Line: 388)
    E/Unity ( 7846):
    E/Unity ( 7846): error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x40c2c70a:0x00000000)
    E/Unity ( 7846): javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException:
     
  13. Echo____G

    Echo____G

    Joined:
    Dec 30, 2015
    Posts:
    6
    It still has this problem at 2018.2.14f1
     
  14. RodrigoAbreu

    RodrigoAbreu

    Joined:
    Jan 29, 2013
    Posts:
    12
    Still happening on 2019.1.2f1
     
  15. DarekRusin

    DarekRusin

    Joined:
    Nov 15, 2013
    Posts:
    47
    I was just stuck on this (using Amazon Fire), but it went away after device reboot. Just letting people from the future know to try this action first ;)
     
  16. Danielp299

    Danielp299

    Joined:
    Feb 22, 2014
    Posts:
    1
    Still happening on 2019.4.27f1