Is there an HTTP error code to go with that? I guess the first thing to do is to try to determine if there’s a remote problem (e.g. 404) or it’s an error on the Circle side (e.g. proxy issue). Are there some more complex logs? (I don’t know what binary does this download).
I am glad to see others are having the issue so it isn’t my gradle build files or something but not actually glad…
No HTTP error codes. If there were I could trace it further. After it goes through the list of files it wants to download it spits out: [17:56:00]: ▸ FAILURE: Build failed with an exception. [17:56:00]: ▸ * What went wrong: [17:56:00]: ▸ A problem occurred configuring root project 'CCGo'. [17:56:00]: ▸ > Could not resolve all files for configuration ':classpath'. [17:56:00]: ▸ > Could not download httpclient.jar (org.apache.httpcomponents:httpclient:4.1.1) [17:56:00]: ▸ > Could not get resource 'https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar'. [17:56:00]: ▸ > Response 304: Not Modified has no content! [17:56:00]: ▸ * Try: [17:56:00]: ▸ Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. [17:56:00]: ▸ BUILD FAILED [17:56:00]: ▸ Total time: 1 mins 45.766 secs
…and fails.
The kicker is that is sometimes it will succeed but as time has gone on it has failed more often until now it’s most of the time.
It might be on jcenter.bintray.com’s side as it is always files from there but mostly ‘httpclient-4.1.1.jar’.
That was what I was looking for. That feels like something that Circle’s HTTP cache could be doing though (as well as an issue on the remote server).
If you can identify a file that fails, perhaps you could do a wget for it prior to this failing step, in order to determine whether it is a problem with the binary that requests it, or whether it is a problem stemming from outside of your build.
Hmm, my logs don’t include an http response. Gradle, invoked by fastlane, is generating the error in our instances. I need to find the config flag to make fastlane add --debug switch to gradle.
....
Download https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'numboxmobile'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not download bcpkix-jdk15on.jar (org.bouncycastle:bcpkix-jdk15on:1.48)
> Could not get resource 'https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar'.
> java.lang.NullPointerException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I can build locally with no issue which makes me wonder what is different between the connection I have with bintray and what CircuitCI has with bintray.
I do not know enough about how CircleCI caches common files like this (I know I would cache everything I could since bandwidth is expensive). Getting a HTTP 304 does point towards this caching system being the culprit on one side or the other.
Without drilling into CircleCI itself (which I do not have time to do) I don’t know for sure.
I do know that I have a chance to get a successful build so we just mash the rebuild button until it works.
It just occurred again for me. I’m not getting a 304.
I received a 502.
▸ Download https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar
[14:23:11]: ▸ FAILURE: Build failed with an exception.
[14:23:11]: ▸ * What went wrong:
[14:23:11]: ▸ A problem occurred configuring root project 'numboxmobile'.
[14:23:11]: ▸ > Could not resolve all dependencies for configuration ':classpath'.
[14:23:11]: ▸ > Could not download httpmime.jar (org.apache.httpcomponents:httpmime:4.1)
[14:23:11]: ▸ > Could not get resource 'https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar'.
[14:23:11]: ▸ > Could not GET 'https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar'. Received status code 502 from server: Bad Gateway
Ok then. Maybe not the caching system. I think it’s a network issue on one side or the other. The fact I can download things with the same links as what CircleCI is using points towards CircleCI’s network infrastructure being the culprit.
Not necessarily. The remote side could be dealing with HTTP request headers incorrectly - for example, related to cacheing - so the fault could still be on either side. The GH issue suggests to me that it’s the bintray side, but since I don’t need this myself I have not looked into it deeply.
I don’t know, you tell us . Have you seen the GitHub link in the question duplicate linked above? Is seems to be resolved for others, are you sure you are getting the same issue?
Oh yeah… Sorry @halfer, it started working again and I just kept going. In the end I think (not know) it was not CircleCI’s end. Haven’t had an issue with it since.