Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSLHandshakeException Error #859

Closed
Peter-Emad opened this issue Oct 8, 2019 · 5 comments
Closed

SSLHandshakeException Error #859

Peter-Emad opened this issue Oct 8, 2019 · 5 comments

Comments

@Peter-Emad
Copy link

Peter-Emad commented Oct 8, 2019

Hello,

I'm trying to generate a device id through OneSignal SDK (idsAvailable) but I'm getting the below error in the log cat, I've verified that the device has internet access but I still get that error and it goes on an endless loop trying to generate the device id .

The only case I got it to work and successfully generate a device id was when using a VPN, so my question is what can i do to generate an id without VPN and in case there's an error while generating the id how can i add an error listener so as not to go on an endless loop.

2019-10-08 14:44:00.325 29282-29325/? W/OneSignal: OneSignalRestClient: null Error thrown from network stack. 
    javax.net.ssl.SSLHandshakeException: Connection closed by peer
        at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
        at com.android.org.conscrypt.NativeSsl.doHandshake(NativeSsl.java:375)
        at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:224)
        at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:192)
        at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:149)
        at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:112)
        at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184)
        at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126)
        at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95)
        at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281)
        at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:461)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:407)
        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:538)
        at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
        at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:26)
        at com.onesignal.OneSignalRestClient.startHTTPConnection(OneSignalRestClient.java:177)
        at com.onesignal.OneSignalRestClient.access$100(OneSignalRestClient.java:44)
        at com.onesignal.OneSignalRestClient$4.run(OneSignalRestClient.java:108)
        at java.lang.Thread.run(Thread.java:764)
@rgomezp
Copy link
Contributor

rgomezp commented Oct 9, 2019

Howdy,
It sounds like you're having a network error. Can you try on a different network? Which country are you in?

@Peter-Emad
Copy link
Author

Hi,
I've tried multiple networks and still facing the same issue. it only works using VPN clients.
I'm in Egypt.

@rgomezp
Copy link
Contributor

rgomezp commented Oct 9, 2019

We are looking into how best to communicate with Egypt on how best to resolve this issue. If you want to reach out to your ISP and let them know they should unblock OneSignal, that would be helpful.

@Peter-Emad
Copy link
Author

okay thank you.

@rgomezp rgomezp closed this as completed Oct 9, 2019
iSWORD pushed a commit to iSWORD/OneSignal-Android-SDK that referenced this issue Jan 13, 2020
It appears that subdomains of onesignal.com are not blocked by the Egyptian ISP TE Data (also known as WE)

Fixes OneSignal#919, OneSignal#883, OneSignal#859, OneSignal#855, OneSignal#849, OneSignal#847
@SuleymanovTat
Copy link

W/OneSignal: OneSignalRestClient: null Error thrown from network stack.
javax.net.ssl.SSLHandshakeException: Handshake failed
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:396)
at com.android.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:123)
at com.android.okhttp.Connection.connect(Connection.java:151)
at com.android.okhttp.Connection.connect(Connection.java:187)
at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:238)
at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:134)
at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:382)
at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:369)
at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:287)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:457)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:130)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants