Quantcast

aerogear-cordova-push

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

aerogear-cordova-push

lumaruma
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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] aerogear-cordova-push

Julio Cesar Sanchez Hernandez
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,

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





--
View this message in context: http://aerogear-users.1116366.n5.nabble.com/aerogear-cordova-push-tp925.html
Sent from the aerogear-users mailing list archive at Nabble.com.
_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users


_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] aerogear-cordova-push

Erik Jan de Wit
and be sure to have cordova.js in your index.html like so:

<script type="text/javascript" src="cordova.js"></script>

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:
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,

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





--
View this message in context: http://aerogear-users.1116366.n5.nabble.com/aerogear-cordova-push-tp925.html
Sent from the aerogear-users mailing list archive at Nabble.com.
_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users


_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users




--
Cheers,
       Erik Jan

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: aerogear-cordova-push

lumaruma
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



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] aerogear-cordova-push

Julio Cesar Sanchez Hernandez
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,

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'
  <http://aerogear-users.1116366.n5.nabble.com/file/n951/Aerogear_Error.jpg>

Please let me know what i am doing wrong or what is missing here?!

Thanks and best regards
Martin Gross







--
View this message in context: http://aerogear-users.1116366.n5.nabble.com/aerogear-cordova-push-tp925p951.html
Sent from the aerogear-users mailing list archive at Nabble.com.
_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users


_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] aerogear-cordova-push

lumaruma
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] aerogear-cordova-push

lumaruma
Hi Aerogear team,

please could you help me about my last question from Nov 17, 2016, 12:26pm?!

Thanks and best regards
Martin Gross
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] aerogear-cordova-push

Ali Ok
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,

please could you help me about my last question from Nov 17, 2016, 12:26pm?!

Thanks and best regards
Martin Gross



--
View this message in context: http://aerogear-users.1116366.n5.nabble.com/aerogear-cordova-push-tp925p964.html
Sent from the aerogear-users mailing list archive at Nabble.com.
_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users


_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] aerogear-cordova-push

lumaruma
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] aerogear-cordova-push

jeff01
This post has NOT been accepted by the mailing list yet.
Can you let me know where did you get the sample app? Does it work with FCM? Thank you.
Loading...