Node.JS node-gcm-Service only sends to one device

I am using node-gcm-service package to send message from my server to the registered devices. When there is one device, the message is successfully delivered, when there are two devices, only the first device (deviceIds[0]) receives the message. Both devices receive messages if they are the only device to which the message is sent or either device is the first device in the deviceIds array. Any ideas what might be going on? Below is the relevant code snippet.

Thank You, Gary

    function(cb) {
        var gcmSender = new gcm.Sender();
        gcmSender.setAPIKey("api-key");
        var gcmMessage = new gcm.Message({

            collapse_key: "floomit",

            data: {
                message:"new_photo",
                user:user,
                stream:streams[0].name
            },
            delay_while_idle:true,
            time_to_live:34,
            dry_run:false
        });

        gcmSender.sendMessage(
            gcmMessage.toString(),
            deviceIds,
            true,
            cb
        );
    }

Try this snippet hope it'll solve your issue... i tried with following code it's work fine with all devices.

 var gcm = require('node-gcm-service');
function (cb){
var gcmSender = new gcm.Sender();
    gcmSender.setAPIKey("google_api_key");
    var gcmMessage = new gcm.Message({

        collapse_key: "floomit",

        data: {
            message:"new_photo",
            user:user,
            stream:streams[0].name
        },
        delay_while_idle:true,
        time_to_live:34,
        dry_run:false
    });

var registrationIds = [];
registrationIds.push('xxxxxxxxxx1');
registrationIds.push('xxxxxxxxxxx2');
console.info(registrationIds);  

for(var i=0;i<registrationIds.length;i++){


        gcmSender.sendMessage(gcmMessage.toString(), registrationIds[i], true, function(err, data) {
            if (!err) {
                // do something
               console.info("data",JSON.stringify(data));
            } else {
                // handle error
               console.info("error",JSON.stringify(err));
            }
        });

}

}

The issue seems to be with the GCM service itself. For 2 devices, the 2nd device eventually received the message, not sure how many hours later. When I had 3 devices, 2 of them received the notification right away, the 3rd one, hasn't received it yet, after more than 30 minutes.