Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It happens when the requested URL responds with an erroneous or self-signed certificate. While testing or distributing the app to friends, setting <code>&lt;application android:debuggable="true"...&gt;</code> in <code>AndroidManifest.xml</code> is enough — it automatically bypasses certificate errors.</p> <p>But Google Play Store will not accept an APK with <code>android:debuggable="true"</code>. First of all, the certificates, of course, need to be fixed. But while that happens, here is a workaround for PhoneGap/Cordova 3:</p> <ol> <li><p>In your app package create a subclass for <code>CordovaWebViewClient</code>:</p> <pre><code>public class SSLAcceptingCordovaWebViewClient extends CordovaWebViewClient { public SSLAcceptingCordovaWebViewClient(CordovaInterface cordova, CordovaWebView view) { super(cordova, view); } @Override public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) { handler.proceed(); } } </code></pre></li> <li><p>Same for <code>IceCreamCordovaWebViewClient</code>:</p> <pre><code>public class SSLAcceptingIceCreamCordovaWebViewClient extends IceCreamCordovaWebViewClient { public SSLAcceptingIceCreamCordovaWebViewClient(CordovaInterface cordova, CordovaWebView view) { super(cordova, view); } @Override public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) { handler.proceed(); } } </code></pre></li> <li><p>in <code>&lt;Your App Name&gt;.java</code> add an override for <code>makeWebViewClient</code>:</p> <pre><code>@Override protected CordovaWebViewClient makeWebViewClient(CordovaWebView webView) { if(android.os.Build.VERSION.SDK_INT &lt; android.os.Build.VERSION_CODES.HONEYCOMB) { return new SSLAcceptingCordovaWebViewClient(this, webView); } else { return new SSLAcceptingIceCreamCordovaWebViewClient(this, webView); } } </code></pre></li> </ol> <p><em>Et voilà!</em> SSL errors will be disregarded. However, never use erroneous certificates. Try to fix them first and use this dirty workaround only when you run out of other solutions.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload