vendredi 1 décembre 2017

Firebase message not received

I initialize Web firebase and I get Token:

http://ift.tt/2ANoUxN

I get current token after it is created and I send it in simple message:

curl -X POST -H "Authorization: key=AAAA_XXXMYKEYXXXw26gv" -H "Content-Type: application/json" -d '{
    "to" : "fo3aexgjsbQ:APA91bEWh47m2cVoflhQ_E__E31jbQpoyaHZTRKmkJIG7Uaarrw0KwvCYYCnNTMmaQIcKBFrq2fGFEBj-nVB9obE-wf4FiTCKedR_gWdMPfc8bNgpK5MQ7SsLmcVRWLlert3AXXdbuzk",
    "data" : {
      "body" : "This is an FCM notification message!",
      "title" : "FCM Message",
    }
}' "http://ift.tt/1TmHkUo"

I get the following success result:

{"multicast_id":8683406144829883570,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1512147661586241%2fd9afcdf9fd7ecd"}]}

The problem is that nothing is displayed or printed in the console! I am sending request, I see success and... nothing happend both when website is opened and when it is closed!

Here is my firebase-messaging-sw.js file placed in root directory:

http://ift.tt/2AMYHzs

I also tried to set configuration this way:

firebase.initializeApp({
  'messagingSenderId': '1091715558873'
});

I specified manifest:

http://ift.tt/2zSR1vj




Aucun commentaire:

Enregistrer un commentaire