raix-push: Unable to send push for Android with Meteor 1.3.2.4
Hi,
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...
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 20
+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 😃
Got it working by following the updated Android instructions and switching to FCM. Thanks!
@cunneen
When I run by adding your package I am getting following error.
@jensljungblad @raix I have same issue with android Did you found any workaround?
@raix I still can’t get Android to work on Meteor 1.3.4.4 even with 3.0.3-rc.7. Is it supposed to?
My config:
After which I get the following error when pushing a message:
Same here and no solution posted in the different issues seems to help. Currently we are using the rc.5 branch with config similar to the one @crazybaud mentioned (only differences are that in one of the other issues it was stated that the project number has to be integer so we tried with and without quotes and we left out APN config due to the fact that we do not support iOS yet) and we’ve already tried to change the API key in Google’s console.
We’ve also tried with installing
cordova-plugin-device@1.1.1
and different other approaches but to no avail.Edit: Forgot to mention that we use the latest stable meteor release (1.4.x)
I’m getting the same thing on Meteor 1.3.4.4:
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
@MaxShv did you find a workaround?
@crazybaud I tried regenerating the api key a bunch of times but no luck… What version of Meteor are you on and how have you configured push?