OneSignal / OneSignal-Android-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native Android or Amazon app with OneSignal. https://onesignal.com
Other
604 stars 368 forks source link

Could not resolve gradle.plugin.com.onesignal #707

Closed maurosemproni closed 5 years ago

maurosemproni commented 5 years ago

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\AppData\Roaming\npm\node_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 Files\nodejs\node.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:

  1. (your steps here)

Anything else:

(crash stacktraces, as well as any other information here)

FAILURE: Build failed with an exception.

BUILD FAILED in 7s Error: cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

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.
m3talover commented 5 years ago

same issue for me in native android studio

jkasten2 commented 5 years ago

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.

eyildiz commented 5 years ago

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

maurosemproni commented 5 years ago

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.

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

m3talover commented 5 years ago

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.

rgomezp commented 5 years ago

Glad you could fix it. For anyone else having this issue, try visiting the url in the browser. You should be seeing: `

gradle.plugin.com.onesignal onesignal-gradle-plugin 0.12.1 0.12.1 0.12.1 0.5.0 0.6.0 0.7.0 0.8.0 0.8.1 0.8.2 0.9.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.11.2 0.11.3 0.12.0 0.12.1 20181030020921

`

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.

wvansl commented 5 years ago

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?

vincentferniot commented 5 years ago

Try this command, it worked for me ./gradlew clean

jkasten2 commented 5 years ago

@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

kareemzok commented 5 years ago

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

alexhorsa commented 5 years ago

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

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' }
}
kareemzok commented 5 years ago

@alexhorsa Already fixed the issue on https://github.com/jitpack/jitpack.io/issues/3983 But thanks for your help

maihemboom commented 4 years ago

I got it after removing oneSignal library - just removing oneSignal references from android/app/buildgradle fixed the problem.