Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCM - Rarely receiving topic messages

I'm using phonegap-plugin-push and GCM for push notifications on iOS and Android. The last three weeks I've had no problems what so ever. However out of nowhere it stopped functioning normally. I receive about 1/20 messages sent.

I'm using GCM's topic messaging. When I send a message I get a successful response.

Object {message_id: <MESSAGE_ID>}

But I only rarely seem to receive the message.

If I send a message directly to a device(registration_token) the message is received properly.

I've tested with both a jquery ajax request as with a request from a C# back-end. Both resulting in the same.

My jQuery test script:

    $.ajax({
        url: "https://gcm-http.googleapis.com/gcm/send",
        type: "POST",
        dataType: "json",
        crossDomain: true,
        headers: {
            "Authorization": "key=<AUTH_KEY>",
            "Content-type": 'application/json'
        },
        data: JSON.stringify({
            to: "/topics/" + topics,
            priority: 'high',
            content_available: true,
            notification: {
                body: msg,
                title: "Test",
                sound: "bubble.wav"
            },
            data: {
                soundname: "bubble.wav",
                test: "test"
            }
        })
    }).done(function (attr) {
        console.log('done');
        console.log(attr);
    }).error(function (err) {
        console.log('err');
        console.log(err);
    });

Tested on both android and iOS. Same results for both.

like image 902
iDobbler Avatar asked Aug 29 '16 12:08

iDobbler


1 Answers

It looks like they finally acknowledged the outage: https://status.firebase.google.com/incident/Cloud%20Messaging/16002

like image 92
Robbie Avatar answered Oct 03 '22 02:10

Robbie