Issue
For my app, the user enters a server name, and the app should try HTTPS, and fall back to HTTP if HTTPS fails. fine.
I understand about using WebViewClient.onReceivedSslError()
to handle the SSL error, and that works fine most of the time. However, occasionally, I see that this method is not called, despite seeing these two lines in the log,
08-17 08:55:33.430: W/chromium(3264): external/chromium/net/http/http_stream_factory_impl_job.cc:865: [0817/085533:WARNING:http_stream_factory_impl_job.cc(865)] Falling back to SSLv3 because host is TLS intolerant: svcstable1.hs.trcint.com:80
08-17 08:55:33.490: E/chromium(3264): external/chromium/net/socket/ssl_client_socket_openssl.cc:780: [0817/085533:ERROR:ssl_client_socket_openssl.cc(780)] handshake failed; returned -1, SSL error code 1, net_error -107
this will happen sporadically. it will fail 3x in a row, then works fine and I can't get it to fail again.
At this point, I'm contemplating fetching the page contents myself and setting the data into the web view. I'd rather not do that, but it seems like my only option at this point.
Any ideas?
Solution
I was never able to find the reason or solution to this. I ended up using HttpClient
to "test" the connection before handing it off to the WebView
.
Very much a pain especially when WebView
has what would seem to be robust error handing mechanisms.
Answered By - Jeffrey Blattman
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.