Question

As a teleworker I use a VPN with a proxy.pac (config file is available at http://proxy.mycompany.com/proxy.pac).

To update packages Android SDK Manager, the following proxy settings work properly:

HTTP Proxy Server: proxy.mycompany.com
HTTP Proxy Port: 80

In Android Studio I work on an Android-Gradle project using crashlytics. I have set the same parameters in Proxy HTTP.

A gradle assembleDebug command fails when checking crashlytics apikey:

:myproject-project:compileDebugNdk UP-TO-DATE                                                           
:myproject-project:preBuild                
:myproject-project:preDebugBuild                
:myproject-project:checkDebugManifest                 
:myproject-project:prepareDebugDependencies                 
:myproject-project:compileDebugAidl UP-TO-DATE      
:myproject-project:compileDebugRenderscript UP-TO-DATE      
:myproject-project:generateDebugBuildConfig UP-TO-DATE      
:myproject-project:processDebugManifest UP-TO-DATE      
> Building 32% > :myproject-project:crashlyticsCleanupResourcesDebug

then after timeout:

ERROR - Crashlytics Developer Tools error.                         
com.crashlytics.reloc.org.apache.http.conn.HttpHostConnectException: Connect to api.crashlytics.com:443 [api.crashlytics.com/54.225.193.37, api.crashlytics.com/54.243.69.50, api.crashlytics.com/54.243.106.90, api.crashlytics.com/54.243.136.142, api.crashlytics.com/54.243.186.185, api.crashlytics.com/107.21.114.251, api.crashlytics.com/184.72.240.69, api.crashlytics.com/54.225.68.102] failed: Connection timed out:     connect
    at com.crashlytics.reloc.org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:138)
    ...

I have tried to set gradle properties in ~/.gradle/gradle.properties file:

systemProp.http.proxyHost=proxy.mycompany.com
systemProp.http.proxyPort=80

... but it not seems to be a great idea as I have a warning in HTTP Proxy settings (those settings are obsolete).

I have ask people from network to snif what happens, and there are access failure on URLs like http://dl-ssl.google.com (same that are used in Android SDK manager), or EC2 on Amazon (possibly used by crashlytics, isn't it?).

Of course all this runs perfectly when I'm directly connected in my company's LAN.

Any idea of what could happen? Any workaround?

Thanks for support. Jean

EDIT:

Solution is to set https proxy server and port in ~/.gradle/gradle.properties file. In my case, http parameters seems useless.

systemProp.https.proxyHost=proxy.mycompany.com
systemProp.https.proxyPort=80

Thanks for you help!

Was it helpful?

Solution

Hemal from Crashlytics here. Can you set https.proxyHost and https.proxyPort? In addition, if you have one, go ahead and set https.proxyUser and https.proxyPassword as well! This should take care of it for ya :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top