Unable to send push for Android with Meteor 1.3.2.4
See original GitHub issueHi,
Sorry I left this as a comment on Issue #153 but this morning it occurs to me that in light of the different error situation, I should probably have created a separate issue. So I’m doing that here. Here was my comment:
Glad I found this thread as it seems to get me closer.
After running ‘meteor add cordova:cordova-plugin-device@1.1.1’, I get
I20160511-00:28:02.938(-7) (android:http://localhost:12488/706a87c28afe2f2833e09f1faae76451d1e9bdb6.js:179) Push.Token: I20160511-00:28:02.943(-7) (android:http://localhost:12488/706a87c28afe2f2833e09f1faae76451d1e9bdb6.js:223) Token: {"gcm":"APA91bECNHQBuGl1W0DdANTBcX3bafsxwABndUhKCl3KZGT0xWpoLOjL95GjdgkUGxPR-k9J7kFdncH3V7InSaIEOB6X6BQrJrQssM8ev5jTn7nSqidjazVMxJqvZfm033PaWO8b0LEl"} I20160511-00:28:02.944(-7) (android:http://localhost:12488/706a87c28afe2f2833e09f1faae76451d1e9bdb6.js:179) Got token: I20160511-00:28:16.770(-7) (android:http://localhost:12488/706a87c28afe2f2833e09f1faae76451d1e9bdb6.js:223) sending notification I20160511-00:28:18.696(-7) (android:http://localhost:12488/706a87c28afe2f2833e09f1faae76451d1e9bdb6.js:179) Push.Notification: I20160511-00:28:18.697(-7) (android:http://localhost:12488/706a87c28afe2f2833e09f1faae76451d1e9bdb6.js:179) Push.Message: Got message while app is open:
Now, I am still using some Meteor.startup() code from when I first successfully used raix:push, last July(!). I have this code from back then still:
`Meteor.startup(function () { console.log(‘inside notifications.js’); Push.allow({ send: function(userId, notification) { // Allow all users to send to everybody - For test only! return true; } });
Push.debug = true;
/* do something with push token*/ Push.addListener(‘token’, function(token) { console.log('Token: ’ + JSON.stringify(token)); });
Push.addListener(‘notification’, function(notification) { console.log('notification: ’ + JSON.stringify(notification)) });
Push.addListener(‘startup’, function(notification) { console.log('Routing Push: ’ + JSON.stringify(notification)); Router.go(‘warbleShow’, {_id: notification.payload.warbleId}); }); }); `
In light of the messages I mentioned in that first bit of output, I tried closing the application and sending the test notification from localhost:3000 (is that even supposed to work??), and I got:
I20160511-00:30:40.853(-7)? Push: Send message "Hello" via query {} I20160511-00:30:40.855(-7)? Push: Sent message "Hello" to 0 ios apps 0 android apps I20160511-00:30:40.857(-7)? Push, GUIDE: The "Push.appCollection" is empty - No clients have registred on the server yet...
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (1 by maintainers)
+1
I20160630-11:29:50.679(-4)? Push: Sent message “test” to 0 ios apps 1 android apps I20160630-11:29:50.784(-4)? Unauthorized I20160630-11:29:50.787(-4)? ANDROID: Result of sender is null
Our install :
meteor add raix:push@3.0.3-rc.5
config.push.json
file.Client side :
Server side :
mobile-config.js
:hope it helps 😃