Hi Aerogear team,
I am trying to get your Cordova demo example with Plugin Aerogear-cordova-push (3.0.1) running in my app. But got back following exception: -->"Uncaught ReferenceError: push is not defined" If referencing the java scripts "aerogear.ajax.js" and "aerogear-push.js" directly in index.html, i got following error message: --> "Uncaught TypeError: Cannot read property 'register' of undefined" Please could you help me here?! Thanks and best regards Martin Gross |
Hi. You don't have to reference any of the plugin .js files in your index.html, they are loaded by Cordova. Remove them from the index.html and try again. On Tue, Oct 11, 2016 at 7:08 PM, lumaruma <[hidden email]> wrote: Hi Aerogear team, _______________________________________________ Aerogear-users mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/aerogear-users |
and be sure to have cordova.js in your index.html like so:
This will load the plugins, but it will only work in a simulator or on a device. On Tue, Oct 11, 2016 at 7:13 PM, Julio Cesar Sanchez Hernandez <[hidden email]> wrote:
Cheers, Erik Jan _______________________________________________ Aerogear-users mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/aerogear-users |
In reply to this post by lumaruma
Hi Aerogear team,
I tried to get the 'AeroGear Cordova Push Plugin' example running with no luck! Following steps were done: - Setup a project and app registration using Firebase Console - Downloaded the google-services.json to WWW folder - Configured the AeroGear UnifiedPush Server - Create a Cordova application according the 'Getting Started' docu (https://aerogear.org/docs/guides/aerogear-cordova/AerogearCordovaPush/) - Installed the aerogear-cordova-push plugin - At running of the cordova app got following error message: 'Push is not defined' ![]() Please let me know what i am doing wrong or what is missing here?! Thanks and best regards Martin Gross |
Did you install the plugin before or after copying the google-services.json? you have to do it after or the plugin won't be installed if the file doesn't exist. Also, do you have the cordova.js linked in your index.html? Did you create the app with the same id as the one you used in firebase console? On Wed, Nov 16, 2016 at 8:00 PM, lumaruma <[hidden email]> wrote: Hi Aerogear team, _______________________________________________ Aerogear-users mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/aerogear-users |
Hi Aerogear team,
thank you for your answer. Yes, I placed the google-services.json after installing the plugin! Now I have reinstalled the plugin, but get following at build: ******************************************************* C:\eNoteAero\eNoteAero2>cordova build android --stacktrace ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_101 FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'android'. > Could not resolve all dependencies for configuration ':classpath'. > Could not resolve com.google.gms:google-services:3.0.0. Required by: :android:unspecified > Could not resolve com.google.gms:google-services:3.0.0. BUILD FAILED Total time: 5.755 secs > Could not get resource 'https://repo1.maven.org/maven2/com/google/gms/google-services/3.0.0/google-services-3.0.0.pom'. > Could not HEAD 'https://repo1.maven.org/maven2/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 'https://jcenter.bintray.com/com/google/gms/google-services/3.0.0/google-services-3.0.0.pom'. > Could not HEAD '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.android.tools.build:gradle:1.2.3+. Required by: :android:unspecified > Could not resolve com.android.tools.build:gradle:1.2.3+. > Failed to list versions for com.android.tools.build:gradle. > Unable to load Maven meta-data from https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml. > Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/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 > Could not resolve com.android.tools.build:gradle:1.2.3+. > Failed to list versions for com.android.tools.build:gradle. > Unable to load Maven meta-data from https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml. > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/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. ******************************************************* Please could you help me here?! Thanks in advance and best regards Martin Gross |
Hi Aerogear team,
please could you help me about my last question from Nov 17, 2016, 12:26pm?! Thanks and best regards Martin Gross |
Hello Martin, Are you behind a proxy? This might be related to that. Greetings, Ali On Fri, Nov 18, 2016 at 6:58 PM, lumaruma <[hidden email]> wrote: Hi Aerogear team, _______________________________________________ Aerogear-users mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/aerogear-users |
Hi AreoGear team, hi Ali,
thank you for your hint! After configuring the proxy for npm and gradle it was working: npm: npm config set proxy http://<Host>:<Port> npm config set https-proxy http://<Host>:<Port> .gradle.properties: systemProp.http.proxyHost=<Host> systemProp.http.proxyPort=<Port> systemProp.https.proxyHost=<Host> systemProp.https.proxyPort=<Port> Best regards Martin Gross |
Free forum by Nabble | Edit this page |