SocketTimeoutException in com.android.org.conscrypt.NativeCrypto.SSL_read

876 views
Skip to first unread message

Александр Кузнецов

unread,
Jun 11, 2015, 11:09:38 PM6/11/15
to rob...@googlegroups.com
I'm doing https connections from my RoboVM app running in iPhone and they result in the following exception fairly often:

java.net.SocketTimeoutException: Read timed out
        at com.android.org.conscrypt.NativeCrypto.SSL_read(Native Method)
        at com.android.org.conscrypt.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java)
        at java.io.InputStream.read(InputStream.java)
        at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java)
        at java.io.BufferedInputStream.read(BufferedInputStream.java)
        at com.android.okhttp.internal.Util.readAsciiLine(Util.java)
        at com.android.okhttp.internal.http.RawHeaders.fromBytes(RawHeaders.java)
        at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java)
        at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java)
        at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java)
        at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java)
        at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java)
        at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java)
        ...

This seems to be a known issue in the android world, see for example, https://github.com/google/google-http-java-client/issues/146

Is it a known issue? 
Is there a workaround? 
What version of the android lib is used in roboVM?
How can I use a different lib/version?
Does it make sense to use android lib when running on iOS?

Niklas Therning

unread,
Jun 12, 2015, 1:35:59 AM6/12/15
to Александр Кузнецов, rob...@googlegroups.com
Is this also running behind the same proxy as in your other post? The RoboVM runtime class library is based on Android 4.4.3 and there's no way to use a more recent version.

Is your code using URLHttpConnection directly or through some 3rd party lib? You could try to use the included org.apache.http.client.HttpClient class instead. Or use the native APIs and NSURL.


--
You received this message because you are subscribed to the Google Groups "RoboVM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robovm+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexander Kouznetsov

unread,
Jun 12, 2015, 3:43:05 PM6/12/15
to Niklas Therning, rob...@googlegroups.com
It is behind the same proxy but it accesses the host on the same subnet so proxy shouldn't be involved.

The code invokes java.net.URL.openConnection() using it's own HttpClient lib.
Reply all
Reply to author
Forward
0 new messages