PKIX path validation failed while running Grails new project - ssl

I've created a new Grails 4.0.2 application and ran it, got the
FAILURE: Build failed with an exception.
* What went wrong:
Could not download web.jar (org.grails.profiles:web:4.0.0)
> Could not get resource 'https://repo.grails.org/grails/core/org/grails/profiles/web/4.0.0/web-4.0.0.jar'.
> Could not HEAD 'https://repo.grails.org/grails/core/org/grails/profiles/web/4.0.0/web-4.0.0.jar'.
> sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed
* 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
CONFIGURE FAILED in 9s
Any ideas?

The JDK or certificate store you are using is out of date. Update to a more recent version of your JDK distribution or add the missing certificates manually.
This is because of Sectigo's AddTrust External CA Root Expiring May 30, 2020

Related

Cannot run the app execution failed in react-native

FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processDevelopmentDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
ERROR:C:\Hool\hoolers\Hoolapp\android\app\build\intermediates\incremental\developmentDebug\mergeDevelopmentDebugResources\merged.dir\values\values.xml:404: AAPT: error: resource drawable/rn_edit_text_material (aka com.hoolproject.beta:drawable/rn_edit_text_material) not found.
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* 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
I am trying to run the react-native app, but it always shows ':app:processDevelopmentDebugResources'.
I tried all of the solutions in stackoverflow but it doesn't resolve
--stacktrace:
Configure project :app
Reading env from: .env
Configure project :react-native-reanimated
AAR for react-native-reanimated has been found
C:\Hool\hoolers\Hoolapp\node_modules\react-native-reanimated\android\react-native-reanimated-70-jsc.aar
FAILURE: Build failed with an exception.
What went wrong:
Task 'installDebug' is ambiguous in root project 'hool'. Candidates are: 'installBotDebug', 'installBotDebugAndroidTest', 'installDebugAndroidTest', 'installDevelopmentDebug', 'installDevelopmentDebugAndroidTest', 'installProductionDebug', 'installProductionDebugAndroidTest'.
Try:
Run gradlew tasks to get a list of available tasks.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Exception is:
org.gradle.execution.TaskSelectionException: Task 'installDebug' is ambiguous in root project 'hool'. Candidates are: 'installBotDebug', 'installBotDebugAndroidTest', 'installDebugAndroidTest', 'installDevelopmentDebug', 'installDevelopmentDebugAndroidTest', 'installProductionDebug', 'installProductionDebugAndroidTest'.
Thanks in advance!

Could not resolve all artifacts for configuration ':segment_analytics-react-native:classpath'

A problem occurred configuring project ':segment_analytics-react-native'.
Could not resolve all artifacts for configuration ':segment_analytics-react-native:classpath'.
Could not resolve com.android.tools.build:gradle:3.1.4.
Required by:
project :segment_analytics-react-native
> Could not resolve com.android.tools.build:gradle:3.1.4.
> Could not get resource 'https://maven.google.com/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom'.
> Could not HEAD 'https://maven.google.com/com/android/tools/build/gradle/3.1.4/gradle-3.1.4.pom'.
> The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other p
rotocols to be used. See: https://docs.gradle.org/7.2/userguide/build_environment.html#gradle_system_properties
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to fin
d 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 30s
at makeError (D:\test_app\node_modules\execa\index.js:174:9)
at D:\test_app\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (D:\test_app\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\test_app\node_modules\react-native\node_modules\#react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
can someone suggest a way to resolve this issue?
for me, the solution was to install
#segment/sovran-react-native
yarn add #segment/sovran-react-native

" unable to find valid certification path to requested target" android studio

I have been struggling with this error for a long time and still could not find a solution to it. I have installed android studio 4 on Ubuntu 16.04.6 LTS. I am connected to the internet behind a proxy. I googgled it and set the configuration, but with no luck.
Any help is appricated. Find below the error exception.
Thank you in advance.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'RALAPP5'.
Could not resolve all artifacts for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:2.3.3.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:2.3.3.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.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:2.3.3.
> Could not get resource 'http://jcenter.bintray.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom'.
> Could not GET 'http://jcenter.bintray.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom'. Received status code 403 from server: Forbidden
Could not resolve com.google.gms:google-services:3.0.0.
Required by:
project :
> Could not resolve com.google.gms:google-services:3.0.0.
> Could not get resource 'https://jcenter.bintray.com/com/google/gms/google-services/3.0.0/google-services-3.0.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/google/gms/google-services/3.0.0/google-services-3.0.0.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.google.gms:google-services:3.0.0.
> Could not get resource 'http://jcenter.bintray.com/com/google/gms/google-services/3.0.0/google-services-3.0.0.pom'.
> Could not GET 'http://jcenter.bintray.com/com/google/gms/google-services/3.0.0/google-services-3.0.0.pom'. Received status code 403 from server: Forbidden
Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'RALAPP5'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:75)
at
Get more help at https://help.gradle.org
BUILD FAILED in 876ms
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.5/userguide/command_line_interface.html#sec:command_line_warnings

react native apk build fail when using react-native-razorpay

I'm trying to build an signed apk for my react-native code. I've used react-native-razorpay library for payment integration purpose.
On running cd android && ./gradlew assembleRelease in my project root directory I got stuck on following error.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-razorpay:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* 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 22s
102 actionable tasks: 2 executed, 100 up-to-date
While running ./gradlew assembleRelease --info i get following in the last few lines-
....
....
Successfully started process 'command '/Users/clove/Library/Android/sdk/build-tools/27.0.3/aapt''
/Users/clove/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/37abea56216e7a3ad9a6c076b6dd1a92/res/values-v24/values-v24.xml:3:5-157: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
/Users/clove/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/37abea56216e7a3ad9a6c076b6dd1a92/res/values-v24/values-v24.xml:4:5-135: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
/Users/clove/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/37abea56216e7a3ad9a6c076b6dd1a92/res/values-v26/values-v26.xml:13:5-16:13: AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
> Task :react-native-razorpay:verifyReleaseResources FAILED
Putting task artifact state for task ':react-native-razorpay:verifyReleaseResources' into context took 0.0 secs.
Up-to-date check for task ':react-native-razorpay:verifyReleaseResources' took 0.0 secs. It is not up-to-date because:
Task has failed previously.
All input files are considered out-of-date for incremental task ':react-native-razorpay:verifyReleaseResources'.
Unable do incremental execution: full task run
QueuedCruncher is using /Users/clove/Library/Android/sdk/build-tools/27.0.3/aapt
Shutdown finished in 0ms
:react-native-razorpay:verifyReleaseResources (Thread[Daemon worker Thread 18,5,main]) completed. Took 0.402 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-razorpay:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --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 1m 16s
102 actionable tasks: 9 executed, 93 up-to-date
Found a solution. Turned out that the problem was due to configuration mismatch. the gradle version I was using was above 3, which requires the android sdk version 25 or above. Whereas react-native-razorpay was shipped with sdk version 23. So I changed those settings in node_modules and the build completed successfully.

Robotium : com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir

Input:
C:\Users\Irvin\Desktop\Robotium\gradlew.bat -Dorg.gradle.daemon=true
assembleDebugAndroidTest -u -b
C:\Users\Irvin\Desktop\Robotium\executorproject\build.gradle
Output:
FAILURE: Build failed with an exception. * What went wrong: A
problem occurred configuring root project 'executorproject'. > Failed
to notify project evaluation listener. >
com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V
* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. * Get more help at https://help.gradle.org BUILD FAILED in 2s
What actually went wrong here ? I still cant figure it out for 3 days.