Lately there was an SSL change with Amazon. So, many examples and my own personal project have stopped working. What could be the cause of this, and how to fix it?
-
1If you want to have self-answered question make sure to post question into question and answer into answer part. Also answer should contain explanation - in current half-line state it will likely collect downvotes due to it very low quality. – Alexei Levenkov Jan 15 '17 at 03:56
-
Thanks for wanting to post a Q/A pair. I have moved the answer to the answer box, but I wonder if the question could be fleshed out a bit? Do you have a code sample that would illustrate the problem prior to fixing it? – halfer Jan 22 '17 at 11:59
2 Answers
(Posted on behalf of the OP)
I didn't have onReceivedSslError
method implemented. Without this method, the url simply doesn't load; nothing presented in the onReceivedError
. The hidden clue is "301 Moved Permanently" which you will only see with Chrome Browser debugging and chrome://inspect/
.
Here is how I solved it:
- Import https://github.com/WebPlatformTest/WebView-Browser.
- Start the app.
- Go to "www.google.com" - fine.
- Go to "http://www.amazon.com", nothing.
- Go to your Windows Chrome Browser app and chrome://inspect/#devices. Notice the "301 Moved Permanently".
Add:
@Override
public void onReceivedSslError(WebView view, final SslErrorHandler
handler, SslError error) {
handler.proceed();
}
Solves the needed SSL redirect.

- 19,824
- 17
- 99
- 186
I just posted the exact same question yesterday. Looks like it is an issues with Chrome versions 53 and 53. Have a read here: How to mitigate weird webview SSL/HTTPS errors in webview?
Issue can be fixed by upgrading to latest webview version by download/installing webview app from google which will update to Chrome version 55: https://play.google.com/store/apps/details?id=com.google.android.webview
It appears we have two options: 1) Implement onReceivedSslError to ignore SSL error, however, there is a chance google play will reject the app. 2) The other option is to force users to upgrade their webview version if they encounter the SSL error and have 53 or 53 version Chrome...

- 1
- 1

- 41
- 3
-
I believe you are correct in understanding the root of the problem. It does go back to Chrome 53. Ignoring the SSL error allowed me to test further but did not solve the problem. Testing now with Chrome 55, the onReceivedSslError is not hit when loading an amazon web page. So, I'll change my code to present the user with a prompt, if the SSL error occurs in the future. Sadly I have a low reputation and can't cast a vote for your answer but thanks. – Howard Thompson Jan 24 '17 at 21:44