Could not resolve all files - RN Android test builder


#1

This has progressively become worse over the last few weeks.

When building our React-Native mobile app the build fails due to CircleCI’s inability to download certain files from their sources.

It mainly fails with:
Could not get resource 'https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar'.

…but sometimes fails on other files as well.

When I try the download links it is failing on myself the files download fine. When I build the app locally it is fine.

This is highly annoying and makes CircleCI’s build check irrelevant since it can not be trusted. There are too many false negatives.


#2

We’ve been having the same issues over the last two weeks or so, Circle 2.0; pulling dependencies out of jcenter.bintray.com


#3

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).


#4

I am glad to see others are having the issue so it isn’t my gradle build files or something but not actually glad… :wink:

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’.


#5

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.


#6

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.

#7

That’s the other file that fails for me as well.


#8

I read too fast and didn’t catch that.

HTTP 304 does point towards a caching issue.


#9

I’m also experiencing this issue intermittently. Is this being actively investigated?


#10

Have you narrowed down whether the problem is on the local Circle side, or on the remote Jcenter side?


#11

Duplicate: Error Downloading Dependencies for Android with Gradle


#12

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.

That is a long winded way of saying IDK… :upside_down_face:


#13

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

#14

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.


#15

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.


#16

We are experiencing the same issue and have been for some time now at random. Today, we have had almost 0 successful builds.


#17

same experience here
any progress on this?


#18

I don’t know, you tell us :smiley:. 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?


#19

oh it happened a month ago and since i haven’t tried yet haha.
i need to retry it sometime soon! :slight_smile:


#20

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.

So for me, it is no longer an issue.