Open v3rron opened 7 years ago
It looks like a FCM API credentials problem. I had the same error with GCM, migrating to [v3.0.3-rc.7] and FCM fixed it (using Server key (legacy token) and Sender ID).
I followed this ANDROID GUIDE.
@macakraca I'm doing the same here. Migrated to v3.0.3-rc.7. Migrated Google to Firebase, regenerated Server Key, copied that key to gcm.apiKey
in the config.
Did you use raix:push-update
or raix:setuser
methods by any chance?
@v3rron no.
server:
Meteor.methods({
serverNotification: function(text, title, subscribed_users) {
var badge = 1
var push = Push.send({
from: 'push',
title: title,
text: text,
badge: badge
gcm: {
style: 'inbox',
summaryText: 'Unread: %n%'
},
apn: {
sound: 'default'
},
payload: {
title: title,
text: text
},
query: {
userId: {$in: subscribed_users}
},
notId: Math.round(new Date().getTime()/1000)
});
}
});
client:
if (Meteor.isCordova) {
// push
Push.Configure({
android: {
senderID: ***,
alert: true,
badge: true,
sound: true,
vibrate: true,
clearNotifications: true
// icon: '',
// iconColor: ''
},
ios: {
alert: true,
badge: true,
sound: true
}
});
Push.setBadge(0);
}
hi @v3rron how did you get to see the log generated by Push? Can you pls help.
Cheers rajpa
My app is receiving FCM messages from the Firebase console but not from my server.
Since we migrated from Google GCM to FCM on Firebase and upgraded the package to v3.0.3-rc.7, I can't get Android notifications to work. Here's my settings.json
This is my server/push.js
And this is my client/push.js:
iOS Notifications are working, but that's the log I get for Android notifications:
PS: all the keys and sensitive info was modified before posting. PPS: tried to downgrade back to 3.0.2 with old GCM key, but still can't get Android notifications to work, even though it's currently working with our production code. Hers's the error message: