I am trying to start the default flutter app on a company MAC laptop which is connected behind a proxy.
Upon clicking debug on my Android Studio (Connected to an Android Emulator API 28 (also tried API 30)) I am
gettting the following error:
Launching lib/main.dart on AOSP on IA Emulator in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:checkDebugAarMetadata'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not resolve io.flutter:flutter_embedding_debug:1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718.
Required by:
project :app
> Could not resolve io.flutter:flutter_embedding_debug:1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718.
> Could not get resource 'https://storage.googleapis.com/download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718/flutter_embedding_debug-1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718.pom'.
> Could not GET 'https://storage.googleapis.com/download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718/flutter_embedding_debug-1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718.pom'.
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
Could not resolve io.flutter:x86_debug:1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718.
Required by:
project :app
> Could not resolve io.flutter:x86_debug:1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718.
> Could not get resource 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_debug/1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718/x86_debug-1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718.pom'.
> Could not GET 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_debug/1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718/x86_debug-1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718.pom'.
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
Could not resolve io.flutter:x86_64_debug:1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718.
Required by:
project :app
> Could not resolve io.flutter:x86_64_debug:1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718.
> Could not get resource 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_64_debug/1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718/x86_64_debug-1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718.pom'.
> Could not GET 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_64_debug/1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718/x86_64_debug-1.0.0-0fdb562ac8068ce3dda6b69aca3f355f4d1d2718.pom'.
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
I was getting proxy errors prior to this which I've fixed by adding a gradle.properties file under the .gradle folder with following data:
systemProp.http.proxyHost=proxy.company.com
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=myId
systemProp.http.proxyPassword=myPass
systemProp.http.nonProxyHosts=localhost,127.0.0.1,0.0.0.0,.company.com
systemProp.https.proxyHost=proxy.company.com
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=myId
systemProp.https.proxyPassword=myPass
systemProp.http.nonProxyHosts=localhost,127.0.0.1,0.0.0.0,.company.com
I do have a truststore file which I use for other projects where it is needed such as Spring, JBoss, Tomcat related projects.
Unsure if this is the truststore file that is required
The file type is Java keyStore.
Inside the project, there is a gradlew file. Within there I added the following to point to that truststore file.
-Djavax.net.ssl.trustStore=truststore
This makes no difference and end up with same error. The path to truststore file is correct. Cos for testing, I added the following.
And it does throw a different error saying file not found as expected.
-Djavax.net.ssl.trustStore=truststore12345
This data seems to indicate some cert issues now. I am only using this locally.
Alternatively, is there a way I could by pass this security check?
Please advice. Thank you.
Related
I found a problem while importing project in castle eclipse enviroment
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not download systems-common-java8.jar (systems.uom:systems-common-java8:1.0)
> Could not get resource 'https://jcenter.bintray.com/systems/uom/systems-common-java8/1.0/systems-common-java8-1.0.jar'.
> Could not HEAD 'https://jcenter.bintray.com/systems/uom/systems-common-java8/1.0/systems-common-java8-1.0.jar'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not download si-units-java8.jar (si.uom:si-units-java8:1.2)
> Could not get resource 'https://jcenter.bintray.com/si/uom/si-units-java8/1.2/si-units-java8-1.2.jar'.
the error while build the project using command gradlew build
I've been desperately trying to use ROS2 and PX4, but I can't compile all of the necessary packages: Fast-RTPS-Gen
For people to know PX4:
I am using Gradle version 6.3 installed with sdk, as explained on the PX4 website.
I have download the version 1.0.4 from the Fast-RTPS-Gen repository
When I try to compile it with Gradle, I have a certificate (see end of question).
My question is: how can I bypass this? Since I'm not gonna develop anything on Java, I just really need this one thing to compile, I'm really interested in the quickest, dirtiest way I can bypass this certificate check.
I have tried adding a certificate from the Maven repo with keystool but I just can't get it to work.
> Task :buildIDLParser FAILED
FAILURE: Build failed with an exception.
* Where:
Build file '/home/evandro/Fast-RTPS-Gen/thirdparty/idl-parser/idl.gradle' line: 89
* What went wrong:
Could not determine the dependencies of task ':idl-parser:jar'.
> Could not resolve all files for configuration ':idl-parser:compile'.
> Could not resolve org.antlr:antlr4:4.5.
Required by:
project :idl-parser
> Could not resolve org.antlr:antlr4:4.5.
> Could not get resource 'https://repo.maven.apache.org/maven2/org/antlr/antlr4/4.5/antlr4-4.5.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/antlr/antlr4/4.5/antlr4-4.5.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve org.antlr:antlr4:4.5.
Required by:
project :idl-parser
> Could not resolve org.antlr:antlr4:4.5.
> Could not get resource 'https://repo.maven.apache.org/maven2/org/antlr/antlr4/4.5/antlr4-4.5.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/antlr/antlr4/4.5/antlr4-4.5.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve org.antlr:stringtemplate:3.2.
Required by:
project :idl-parser
> Could not resolve org.antlr:stringtemplate:3.2.
> Could not get resource 'https://repo.maven.apache.org/maven2/org/antlr/stringtemplate/3.2/stringtemplate-3.2.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/antlr/stringtemplate/3.2/stringtemplate-3.2.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
* 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.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.4/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 653ms
4 actionable tasks: 2 executed, 2 up-to-date
As far as I am aware, it is not possible to disable JVM cert validation by configuration. As you are getting a cert validation failure for https://repo.maven.apache.org, which should not happen on most systems, I am going to guess that you are behind a corporate firewall.
If you are on Windows, try setting the environment variable JAVA_TOOL_OPTIONS to (exactly):
-Djavax.net.ssl.trustStoreType=Windows-ROOT -Djavax.net.ssl.trustStore=NUL
If you are on Mac, try setting it to:
-Djavax.net.ssl.trustStoreType=KeychainStore -Djavax.net.ssl.trustStore=/dev/null
If none of those work, you can copy the existing keystore of your JVM, and add your corporate certs to it using keytool, which is easy enough to look up with Google. In this case you would use these settings in the env var:
-Djavax.net.ssl.trustStore=/my/trust_store -Djavax.net.ssl.trustStorePassword=my_password
Managed to solve it by compiling with sudo:
sudo env "PATH=$PATH" gradle assemble
Took me the whole day since I know nothing about gradle, and it ended up just being a stupid simple solution. I proposed to add this as a note on the PX4 install guide.
I'm completely new to programming and just set up AndroidStudio on Ubuntu inside a VirtualMachine.
I set up JDK and SDK, everything went fine - but when I tried to create my first project, the compilation fails immediately (see error message below).
I already tried:
changing the gradle version in build.gradle
changed the distributionURl in gradle-wrapper.properties to https://services.gradle.org/distributions/gradle-6.4-all.zip
exporting and importing the certificates from a browser
setting 'Accept non-trusted certificates automatically' to true
Error message:
A problem occurred configuring root project 'HelloWorld'.
Could not resolve all artifacts for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:4.1.1.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:4.1.1.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.1/gradle-4.1.1.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/4.1.1/gradle-4.1.1.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve com.android.tools.build:gradle:4.1.1.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.1/gradle-4.1.1.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/4.1.1/gradle-4.1.1.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Just Upgraded Android Studio to 4.1 and gradle version to 4.1.0
I get this error on build:
Execution failed for task ':app:javaPreCompileDebug'.
Could not resolve all files for configuration ':app:debugAnnotationProcessorClasspath'.
Could not download kotlinx-metadata-jvm-0.0.5.jar (org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.0.5)
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.0.5/kotlinx-metadata-jvm-0.0.5.jar'.
> Could not HEAD 'https://repo.jfrog.org/artifactory/libs-release-bintray/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.0.5/kotlinx-metadata-jvm-0.0.5.jar?referrer'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I have tried invalidate cache/restart, clead and rebuild and connecting from an unrestricted wifi network. I also tried to roll back to version 4.0.2 but the problem still occurs. Any ideas?
I am trying to make a mod for Minecraft Forge 1.12.2, mdk file forge-1.12.2-14.23.5.2854-mdk. Problem is, when i right-click inside this folder, open Powershell and run the ./gradlew setupDecompWorkspace eclipse command, it comes up with an error log:
forge-1.12.2-14.23.5.2854-mdk> ./gradlew setupDecompWorkspace eclipse To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradlDaemon will be stopped at the end of the build stopping after processing
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'forge-1.12.2-14.23.5.2854-mdk'.
Could not resolve all artifacts for configuration ':classpath'.
Could not resolve net.minecraftforge.gradle:ForgeGradle:3.+.
Required by:
project :
> Failed to list versions for net.minecraftforge.gradle:ForgeGradle.
> Unable to load Maven meta-data from https://files.minecraftforge.net/maven/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml.
> Could not get resource 'https://files.minecraftforge.net/maven/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml'.
> Could not GET 'https://files.minecraftforge.net/maven/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Failed to list versions for net.minecraftforge.gradle:ForgeGradle.
> Unable to load Maven meta-data from https://jcenter.bintray.com/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml.
> Could not get resource 'https://jcenter.bintray.com/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml'.
> Could not GET 'https://jcenter.bintray.com/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Failed to list versions for net.minecraftforge.gradle:ForgeGradle.
> Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml.
> Could not get resource 'https://repo.maven.apache.org/maven2/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml'.
> Could not GET 'https://repo.maven.apache.org/maven2/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
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.
Get more help at https://help.gradle.org
BUILD FAILED in 6s
Could somebody please help me with this? I am not sure what else to try.
(Couldn't make a comment because not enough reputation) They might have changed the way how you should set up your mod environment. According to their instructions, you should first run the command gradlew genEclipseRuns, which will generate the runClient and runServer configurations that will allow you to click the "Run" button in eclipse. After that, you should run the command gradlew eclipse. This should set up your Eclipse folder. What I usually do after that is go into Eclipse, go to File, then Import, then in the search bar search for Existing Gradle Projects. Put in the directory text box the directory of the Forge MDK you have extracted, and click done. It should start importing the necessary libraries needed. After that, you are all set.
It seems that the links that Forge is trying to extract data from are outdated because if you try clicking on them they lead to a 404 Error. (The file must have been deleted).