Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull requests CI failing with "ConnectException", "IllegalStateException: Failed to find Build Tools revision 30.0.3" #5431

Closed
nicolas-raoul opened this issue Jan 13, 2024 · 5 comments · Fixed by #5434

Comments

@nicolas-raoul
Copy link
Member

nicolas-raoul commented Jan 13, 2024

Example with an empty pull request: https://github.com/commons-app/apps-android-commons/actions/runs/7511731633/job/20451652398#step:8:1

This could be a CI misconfiguration.
Anyone has any idea how to solve this?

NO-OP change to test our CI: #5432

@rohit9625
Copy link
Contributor

The problem could be due to the Deprecated Features used in Gradle Build.
In the logs, there is a TaskDependencyResolveException exception. I encountered the same error when running a test in the file MediaDetailInputFilter. The error is as follows:

`The following annotation processors are not incremental: butterknife-compiler-10.1.0.jar (com.jakewharton:butterknife-compiler:10.1.0), dagger-android-processor-2.23.jar (com.google.dagger:dagger-android-processor:2.23), dagger-compiler-2.23.jar (com.google.dagger:dagger-compiler:2.23).
Make sure all annotation processors are incremental to improve your build speed.

Task :app:testBetaDebugUnitTest FAILED
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:testBetaDebugUnitTest'.

Could not resolve all files for configuration ':app:jacocoAgent'.
Could not resolve org.jacoco:org.jacoco.agent:0.8.10.
Required by:
project :app
> Could not resolve org.jacoco:org.jacoco.agent:0.8.10.
> Could not get resource 'https://dl.google.com/dl/android/maven2/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10.pom'.
> No such host is known (dl.google.com)
> Could not resolve org.jacoco:org.jacoco.agent:0.8.10.
> Could not get resource 'https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10.pom'.
> No such host is known (repo.maven.apache.org)
> Could not resolve org.jacoco:org.jacoco.agent:0.8.10.
> Could not get resource 'https://plugins.gradle.org/m2/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10.pom'.
> Could not GET 'https://plugins.gradle.org/m2/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10.pom'.
> No such host is known (plugins.gradle.org)
> Could not resolve org.jacoco:org.jacoco.agent:0.8.10.
> Could not get resource 'https://jitpack.io/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10.pom'.
> Could not GET 'https://jitpack.io/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10.pom'.
> No such host is known (jitpack.io)
> Could not resolve org.jacoco:org.jacoco.agent:0.8.10.
> Could not get resource 'https://maven.google.com/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10.pom'.
> Could not GET 'https://maven.google.com/org/jacoco/org.jacoco.agent/0.8.10/org.jacoco.agent-0.8.10.pom'.
> No such host is known (maven.google.com)

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/8.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1m 37s
50 actionable tasks: 7 executed, 2 from cache, 41 up-to-date
6:05:16 PM: Execution finished ':app:testBetaDebugUnitTest --tests "fr.free.nrw.commons.upload.UploadMediaDetailInputFilterTest.testFilterControlCharacters"'.
`

So, we need to upgrade the gradle version of our app or there may be other problems too.

@nicolas-raoul
Copy link
Member Author

@rohit9625 Feel free to send a pull request implementing the change you recommend. Thanks! 🙂

@rohit9625
Copy link
Contributor

rohit9625 commented Jan 13, 2024

Sure @nicolas-raoul
But first I would like to confirm the change on PC for tests.

@rohit9625
Copy link
Contributor

Hey @nicolas-raoul
I tried something else related to proxy in our properties.gradle. Obviously the previous error is gone but this time I am facing some other errors, I don't know why?
I request you to please check the logs here :
https://github.com/rohit9625/apps-android-commons/actions/runs/7514555674/job/20457561417

Also tell if these lines in properties.gradle is necessary or not :

systemProp.http.proxyPort=0
systemProp.http.proxyHost=

@nicolas-raoul
Copy link
Member Author

@rohit9625

Fantastic! Not sure why these proxy settings were here, but they seem to be the problem indeed. :-)

Could you please send a pull request include this change, and also the debug information you added at rohit9625@e03651c ?

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants