Description:
I'm developing an app using Ionic framework. Everything used to work fine, but since yesterday I experienced this error every time I run ionic cordova run android.
Environment
Ionic:
ionic (Ionic CLI) : 4.8.0 (C:\Users\Mauro\AppDataRoamingnpmnode_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.1
Cordova:
cordova (Cordova CLI) : not installed
Cordova Platforms : android 7.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 2.0.0, (and 15 other plugins)
System:
NodeJS : v10.15.0 (C:\Program Filesnodejsnode.exe)
npm : 6.6.0
OS : Windows 8.1
My Plugins:
cordova-plugin-actionsheet 2.2.2 "ActionSheet"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-email-composer 0.8.15 "EmailComposer"
cordova-plugin-facebook4 3.2.0 "Facebook Connect"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-googlemaps 2.4.6 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.0.5 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-qrscanner 2.6.0 "QRScanner"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.1 "SocialSharing"
es6-promise-plugin 4.1.0 "Promise"
mx.ferreyra.callnumber 0.0.2 "Cordova Call Number Plugin"
onesignal-cordova-plugin 2.4.6 "OneSignal Push Notifications"
uk.co.workingedge.phonegap.plugin.launchnavigator 3.2.2 "Launch Navigator"
Steps to Reproduce Issue:
Anything else:
(crash stacktraces, as well as any other information here)
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all files for configuration ':classpath'.
Could not resolve gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.10.1, 0.99.99].
Required by:
project :
Could not resolve gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.10.1, 0.99.99].
Failed to list versions for gradle.plugin.com.onesignal:onesignal-gradle-plugin.
Unable to load Maven meta-data from https://plugins.gradle.org/m2/gradle/plugin/com/onesignal/onesignal-gradle-plugin/maven-metadata.xml.
Could not HEAD 'https://plugins.gradle.org/m2/gradle/plugin/com/onesignal/onesignal-gradle-plugin/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.
Get more help at https://help.gradle.org
BUILD FAILED in 7s
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all files for configuration ':classpath'.
Could not resolve gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.10.1, 0.99.99].
Required by:
project :
Could not resolve gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.10.1, 0.99.99].
Failed to list versions for gradle.plugin.com.onesignal:onesignal-gradle-plugin.
Unable to load Maven meta-data from https://plugins.gradle.org/m2/gradle/plugin/com/onesignal/onesignal-gradle-plugin/maven-metadata.xml.
Could not HEAD 'https://plugins.gradle.org/m2/gradle/plugin/com/onesignal/onesignal-gradle-plugin/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.
Get more help at https://help.gradle.org
BUILD FAILED in 7s
[ERROR] An error occurred while running subprocess cordova.
cordova run android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
same issue for me in native android studio
Hello,
The error notes that your system could not load the following URL;
https://plugins.gradle.org/m2/gradle/plugin/com/onesignal/onesignal-gradle-plugin/maven-metadata.xml
We have tested this and we are having no issues connecting to this URL. I recommend making sure you can load the file in a web browser.
If this does not load then there is an issue with your firewall, vpn, or proxy if you are using one. Lastly make sure your system date and time is correct.
If the URL does load in your browser then this issue is most likely due to your Java keystore and recommend trying this guide.
https://support.cloudbees.com/hc/en-us/articles/217078498-PKIX-path-building-failed-error-message
Thanks.
Same issue , native android studio. it has been working until yesterday. this timing could it be coincidence ?
system :
osx - mojave ( no vpn, firewall, antivirus )
up to date android studio
up to date gradle
Hello,
The error notes that your system could not load the following URL;
https://plugins.gradle.org/m2/gradle/plugin/com/onesignal/onesignal-gradle-plugin/maven-metadata.xmlWe have tested this and we are having no issues connecting to this URL. I recommend making sure you can load the file in a web browser.
If this does not load then there is an issue with your firewall, vpn, or proxy if you are using one. Lastly make sure your system date and time is correct.If the URL does load in your browser then this issue is most likely due to your Java keystore and recommend trying this guide.
https://support.cloudbees.com/hc/en-us/articles/217078498-PKIX-path-building-failed-error-messageThanks.
thanks for reply. In my browser that URL loads fine, I also tried to build on another connection and still got the same issue. Then i downloaded the certificate from that same URL and added it to the keystore, but nothing helped
before i tried use certificate and other things but there is no sulution for me. then i solved this problem with uninstall android studio and clear in localdrive-> users->user->Android studio 3.3 and other android studio folders and install again then problem is gone.
Glad you could fix it. For anyone else having this issue, try visiting the url in the browser. You should be seeing:
<metadata>
<groupId>gradle.plugin.com.onesignal</groupId>
<artifactId>onesignal-gradle-plugin</artifactId>
<version>0.12.1</version>
<versioning>
<latest>0.12.1</latest>
<release>0.12.1</release>
<versions>
<version>0.5.0</version>
<version>0.6.0</version>
<version>0.7.0</version>
<version>0.8.0</version>
<version>0.8.1</version>
<version>0.8.2</version>
<version>0.9.0</version>
<version>0.10.0</version>
<version>0.10.1</version>
<version>0.10.2</version>
<version>0.11.0</version>
<version>0.11.1</version>
<version>0.11.2</version>
<version>0.11.3</version>
<version>0.12.0</version>
<version>0.12.1</version>
</versions>
<lastUpdated>20181030020921</lastUpdated>
</versioning>
</metadata>
If you can access it through the browser, there should be no problem and you should be able to build. If not, trying m3talover's approach may work for you.
I have the same problem. I cannot load this URL:
https://plugins.gradle.org/m2/gradle/plugin/com/onesignal/onesignal-gradle-plugin/maven-metadata.xml
I tried on different PC and on my phone.
The site loads but it says:
Something bad happened
An error (id is: "cb0394") has been logged
Any idea if I can fix this on my end somehow?
Try this command, it worked for me
./gradlew clean
@wvansl It looks like Gradle's servers were having some issues when you posted. See this thread
https://github.com/OneSignal/OneSignal-Gradle-Plugin/issues/86#issuecomment-475152538
Hello,
Suddenly I m getting the following error
ERROR: Could not GET 'https://jitpack.io/gradle/plugin/com/onesignal/onesignal-gradle-plugin/'. Received status code 522 from server: Origin Connection Time-out
Any advice, please
Hello,
Suddenly I m getting the following error
ERROR: Could not GET 'https://jitpack.io/gradle/plugin/com/onesignal/onesignal-gradle-plugin/'. Received status code 522 from server: Origin Connection Time-outAny advice, please
Solved by following all the steps from OneSignal android docs
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/'}
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.4, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.google.com' }
}
@alexhorsa Already fixed the issue on https://github.com/jitpack/jitpack.io/issues/3983
But thanks for your help
I got it after removing oneSignal library - just removing oneSignal references from android/app/buildgradle fixed the problem.
Most helpful comment
Solved by following all the steps from OneSignal android docs