I've created Cordova Android app, and I'm facing this issue:
When on 3G/4G, whenever I try to make request towards my server I get the error:
ERR_TUNNEL_CONNECTION_FAILED.
When I am on WIFI everything works fine. This is not happening on all Android devices, I am facing this issue on Samsung Galaxy A5 (nd some other Androids).
I've discovered that if we use HTTP instead of HTTPS everything is fine.
Also according to https://www.sslshopper.com/ssl-checker.html and https://www.digicert.com/help/ everything seems to be fine with our SSL cert.
How can we solve this issue?
-
Check your Proxy settings. If possible remove the proxy and try again.Akshay Tilekar– Akshay Tilekar2017年01月30日 11:34:49 +00:00Commented Jan 30, 2017 at 11:34
-
have you implemented payment gateway in your app ??Akshay Tilekar– Akshay Tilekar2017年01月30日 11:38:09 +00:00Commented Jan 30, 2017 at 11:38
-
What does any payment gateway have to do with this? We are not using any external payment gateways, just Android in-app purchaseshyperN– hyperN2017年01月30日 11:44:54 +00:00Commented Jan 30, 2017 at 11:44
-
it blocks the proxy requestsAkshay Tilekar– Akshay Tilekar2017年01月30日 12:06:24 +00:00Commented Jan 30, 2017 at 12:06
-
Thanks, I had no ideahyperN– hyperN2017年01月30日 12:13:14 +00:00Commented Jan 30, 2017 at 12:13
3 Answers 3
This usually happens because your provider is configuring a proxy in your device. Try checking your current APN setting and deleting the fields proxy and port from it.
This also can be caused if you are using a port different from 443
7 Comments
I wonder if you have found your answer or not, but still want to post answer for others looking for the solution: Note that Cordova doesn't allow https calls to Servers with untrusted ssl certificate installed on them. You can ignore this error and continue by making a small change in a cordova file.
Open "\cordova\platforms\android\CordovaLib\src\org\apache\cordova\ CordovaWebViewClient.java". In 'onReceivedSslError' method, comment the else part and add handler.proceed() instead.
Comments
This issues happens with mobile data connection because the default Access Point that came with carrier generally have proxy that will not allowing SSL Tunneling. All you have to do is to set Proxy and Port to nothing.
Also ensure to use only port 443 for HTTPS.