Closed rodcisal closed 3 years ago
Hello!
I'm trying to set up some listeners on the client so when a user clicks/taps a notification they get redirected to a given page.
Unfortunately, I keep getting this error, it's like the method on was not defined on CordovaPush.push
on
CordovaPush.push
if (Meteor.isCordova) { CordovaPush.push.on('notification', (data) => { console.log('this is my message: ', data); }); }
Uncaught TypeError: Cannot read property 'on' of undefined", source: http://localhost:12936/__cordova/packages/modules.js?hash=55cb7bef26805d041a9361b564a0b4b4af91cffc
I'm on Meteor 1.10.2
cordova-plugins
cordova-plugin-android-permissions@1.0.2 cordova-plugin-customurlscheme@5.0.1 cordova-plugin-device@2.0.2 cordova-plugin-dialogs@2.0.1 cordova-plugin-inappbrowser@3.2.0 cordova-plugin-media-capture@1.4.3 cordova-plugin-vibration@3.1.0 cordova-plugin-x-socialsharing@5.6.8 cordova-support-google-services@1.4.0 cordova-uxcam@3.2.2 cordova.plugins.diagnostic@3.0.2 me.dispatch.crosswalk-permissions@file://./permissions phonegap-plugin-push@2.1.2
versions
accounts-base@1.6.0 accounts-password@1.6.1 activitree:push@2.0.7 alanning:roles@2.1.1 aldeed:collection2@3.0.6 allow-deny@1.1.0 autoupdate@1.6.0 babel-compiler@7.5.3 babel-runtime@1.5.0 base64@1.0.12 binary-heap@1.0.11 blaze-tools@1.0.10 boilerplate-generator@1.7.0 browser-policy@1.1.0 browser-policy-common@1.0.11 browser-policy-content@1.1.0 browser-policy-framing@1.1.0 caching-compiler@1.2.2 caching-html-compiler@1.1.3 callback-hook@1.3.0 check@1.3.1 coffeescript@1.0.17 dburles:factory@1.1.0 ddp@1.4.0 ddp-client@2.3.3 ddp-common@1.4.0 ddp-rate-limiter@1.0.7 ddp-server@2.3.1 deps@1.0.12 didericis:callpromise-mixin@0.0.1 diff-sequence@1.1.1 dynamic-import@0.5.2 ecmascript@0.14.3 ecmascript-runtime@0.7.0 ecmascript-runtime-client@0.10.0 ecmascript-runtime-server@0.9.0 ejson@1.1.1 email@1.2.3 es5-shim@4.8.0 fetch@0.1.1 fortawesome:fontawesome@4.7.0 fourseven:scss@4.12.0 geojson-utils@1.0.10 hot-code-push@1.0.4 html-tools@1.0.11 htmljs@1.0.11 http@1.4.2 id-map@1.1.0 inter-process-messaging@0.1.1 johanbrook:publication-collector@1.1.0 jquery@1.11.11 juliancwirko:postcss@1.3.0 lacosta:method-hooks@1.5.4 launch-screen@1.2.0 livedata@1.0.18 lmieulet:meteor-coverage@2.0.2 localstorage@1.2.0 logging@1.1.20 matb33:collection-hooks@0.9.1 mdg:validated-method@1.2.0 meteor@1.9.3 meteor-base@1.4.0 meteortesting:browser-tests@0.2.0 meteortesting:mocha@0.6.0 minifier-css@1.5.1 minifier-js@2.6.0 minimongo@1.6.0 mizzao:timesync@0.5.1 mizzao:user-status@0.6.8 mobile-experience@1.1.0 mobile-status-bar@1.1.0 modern-browsers@0.1.5 modules@0.15.0 modules-runtime@0.12.0 momentjs:moment@2.27.0 mongo@1.10.0 mongo-decimal@0.1.1 mongo-dev-server@1.1.0 mongo-id@1.0.7 nimble:restivus@0.8.12 npm-bcrypt@0.9.3 npm-mongo@3.7.1 ordered-dict@1.1.0 ostrio:cookies@2.6.0 ostrio:files@1.14.2 practicalmeteor:chai@2.1.0_1 practicalmeteor:mocha-core@1.0.1 promise@0.11.2 raix:eventemitter@1.0.0 raix:eventstate@0.0.5 random@1.2.0 rate-limit@1.0.9 react-meteor-data@0.2.16 reactive-dict@1.3.0 reactive-var@1.0.11 reload@1.3.0 retry@1.1.0 routepolicy@1.1.0 service-configuration@1.0.11 session@1.2.0 sha@1.0.9 shell-server@0.5.0 simple:json-routes@2.1.0 socket-stream-client@0.3.0 spacebars-compiler@1.1.3 srp@1.1.0 standard-minifier-js@2.6.0 static-html@1.2.2 templating-tools@1.1.2 tmeasday:check-npm-versions@0.3.2 tracker@1.2.0 tunifight:loggedin-mixin@0.1.0 typescript@3.7.6 underscore@1.0.10 url@1.3.0 webapp@1.9.1 webapp-hashing@1.0.9
TIA
I did a meteor reset plus rm -rf node_modules, restarted the app several times and it seems to be working now. Thanks anyway.
Hello!
I'm trying to set up some listeners on the client so when a user clicks/taps a notification they get redirected to a given page.
Unfortunately, I keep getting this error, it's like the method
on
was not defined onCordovaPush.push
I'm on Meteor 1.10.2
cordova-plugins
versions
TIA