jenkinsci / fabric-beta-publisher-plugin

DEPRECATED: A Jenkins plugin that lets you publish Android apps to Fabric Beta
MIT License
24 stars 17 forks source link

Timeout with proxy #41

Open ybentlili opened 5 years ago

ybentlili commented 5 years ago

Hello, I'm trying to use the plugin to upload my release with Jenkins. I have a timeout issue. I m using a proxy. It is configured into manage plugins -> advanced . java.net.SocketTimeoutException: connect timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at okhttp3.internal.Platform.connectSocket(Platform.java:121) at okhttp3.internal.io.RealConnection.connectSocket(RealConnection.java:185) at okhttp3.internal.io.RealConnection.buildConnection(RealConnection.java:170) at okhttp3.internal.io.RealConnection.connect(RealConnection.java:111) at okhttp3.internal.http.StreamAllocation.findConnection(StreamAllocation.java:187) at okhttp3.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:123) at okhttp3.internal.http.StreamAllocation.newStream(StreamAllocation.java:93) at okhttp3.internal.http.HttpEngine.connect(HttpEngine.java:296) at okhttp3.internal.http.HttpEngine.sendRequest(HttpEngine.java:248) at okhttp3.RealCall.getResponse(RealCall.java:243) at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:201) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163) at okhttp3.RealCall.execute(RealCall.java:57) at retrofit2.OkHttpCall.execute(OkHttpCall.java:174) at fabric.beta.publisher.FileUtils.downloadCrashlyticsTools(FileUtils.java:31) at fabric.beta.publisher.FabricBetaPublisher.prepareCrashlytics(FabricBetaPublisher.java:191) at fabric.beta.publisher.FabricBetaPublisher.publishFabric(FabricBetaPublisher.java:116) at fabric.beta.publisher.FabricBetaPublisher.perform(FabricBetaPublisher.java:87) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:736) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:682) at hudson.model.Build$BuildExecution.post2(Build.java:186) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:627) at hudson.model.Run.execute(Run.java:1762) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:421)

ganeshvl commented 5 years ago

is there any work around for this ?

ybentlili commented 5 years ago

This problem is due to my internal network. it is limited by proxy. I have try to add proxy with Console System.setProperty("http.proxyHost","my proxy") System.setProperty("http.proxyPort","port") System.setProperty("https.proxyHost","proxy") System.setProperty("https.proxyPort","port") System.setProperty("http.proxyUser","login") System.setProperty("https.proxyUser","login") System.setProperty("http.proxyPassword","password") System.setProperty("https.proxyPassword","password") I saw a new issue Executing command: [java, -Dhttp.proxyHost=, -Dhttp.proxyPort=, -Dhttps.proxyHost=, -Dhttps.proxyPort=, -jar, /tmp/crashlytics-devtools4538374411381403422.jar, -androidRes, ., -apiKey, , -apiSecret, , -androidManifest, /tmp/xml7855977159358607643.tmp, -uploadDist, path_apk, -betaDistributionNotifications, false] Exception in thread "main" com.crashlytics.tools.android.exception.PluginException: Distribution upload failed. at com.crashlytics.tools.android.DeveloperTools.processProperties(DeveloperTools.java:667) at com.crashlytics.tools.android.DeveloperTools.processArgsInternal(DeveloperTools.java:348) at com.crashlytics.tools.android.DeveloperTools.main(DeveloperTools.java:273) Caused by: com.crashlytics.tools.android.exception.DistributionException: The upload distribution task failed because it received invalid input. Contact support@fabric.io for help.

I think that the problem, by default the plugin only accept (path and pw) and not (user and password) https://github.com/jenkinsci/fabric-beta-publisher-plugin/blob/master/src/main/java/fabric/beta/publisher/FabricBetaPublisher.java Is there any method to add UserName and password for plugin ?