ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.31k stars 206 forks source link

Not working getting the issue TypeError: Object.keys called on non-object #119

Closed mssrandhir closed 9 years ago

mssrandhir commented 9 years ago

Am using node-gcm in my sails js application to send push notifications to android devices.But when am calling the method:

// Set up the sender with you API key var sender = new gcm.Sender('my-api-key'); var registrationIds = []; //push the device id's to array for (var i = 0; i < users.length; i++) { registrationIds.push(users[i].Device_Id); } // ... trying only once sender.sendNoRetry(message, registrationIds, function(err, result) { if (err) { console.error(err); } else { console.log(result); } });

Am getting the error TypeError: Object.keys called on non-object oie_gtqcqamuniva

hypesystem commented 9 years ago

Did you fix your issue? How?

mdjaman commented 9 years ago

Ping @mssrandhir did you fix it? If so can you write how it could help folks like me