I've been following the document over in this resource to get Push-Notifications sending to a browser with a payload. (Chrome 53.0.2785.116 m).
I'm using the Nodejs Crypto library to generate the keys and they all pass the verification test created by the folks at Google.
I can send and receive a Push-Notification when I do not include the encrypted payload. As soon as I attach the 'raw_data' tag with the encrypted payload the browser no longer receives the Push-Notification (although Curl still comes back with a 'success(1)' response)
Below is the Curl message with and without the payload.
Without Payload -
curl --header "TTL:86400"
--header "Authorization: key=API_KEY"
--header "Encryption: salt=E2oUmcFWbb41wk5DuTbuoA"
--header "Crypto-Key: dh=SERVER_PUBLIC_KEY"
--header "Content-Encoding: aesgcm"
--header "Content-Type: application/json"
https://android.googleapis.com/gcm/send -d
"{\"registration_ids\":[\"CLIENT_KEY\"],\"content_available\":true}"
--insecure
With Payload -
curl --header "TTL:86400"
--header "Authorization: key=API_KEY"
--header "Encryption: salt=E2oUmcFWbb41wk5DuTbuoA"
--header "Crypto-Key: dh=SERVER_PUBLIC_KEY"
--header "Content-Encoding: aesgcm"
--header "Content-Type: application/json"
https://android.googleapis.com/gcm/send -d
"{\"registration_ids\":[\"CLIENT_KEY\"],\"raw_data\":\"UnGSxqxfy9yDwPgCVeXJibQyPX8Hz28\",\"content_available\":true}"
--insecure
Both return a success message
{"multicast_id":9197002368280649941,
"success":1,"failure":0,
"canonical_ids":0,
"results":[{"message_id":"0:1474618927798802%bc86b90cf9fd7ecd"}]}
but the latter is not received by the browser.
We're now into the fourth day of head scratching. Any help would be great.