-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: registration_ids must be a string or an array of 1 element #5
Comments
Hi, Can you give your code that create this issue ? Thanks. |
var gcm = require('node-gcm-service'); var message = new gcm.Message(); var sender = new gcm.Sender(); var registration_ids = ['regid1', 'regid2']; sender.sendMessage(message.toString(), registration_ids, false, function(err, data) { |
Hi, I found the bug and correct it (2c125c1). I just publish a newer version of module Close this issue when all is good for you. |
This doesn't fix the problem. Now an array <= 1000 elements will generate up 1000 requests that all fail because of the registration_ids being a string now. I guess it should be like this:
|
Or maybe better: if (registration_ids.length <= 1000) |
Unfortunatelly this is still not fixed |
Hello there,
I've tried declaring
var registration_ids = ['regid1', 'regid2'];
and
var registration_ids = 'regid1';
But it doesnt seem to work. I keep coming back to that error
The text was updated successfully, but these errors were encountered: