Skip to content

getToken in Android Chrome fails w/ DOMException: Registration failed - push service error on getToken #152

Closed
@Matt-Jensen

Description

@Matt-Jensen

[REQUIRED] Describe your environment

  • Operating System version: Android Galaxy S8
  • Firebase SDK version: 4.3.0
  • Firebase Product: messaging

[REQUIRED] Describe the problem

When requesting a registration token, w/ Chrome running on Android devices, the request is rejected with the following error message:
DOMException: Registration failed - push service error

Please note I was able to successfully trigger push notifications with the following:

curl -X POST -H "Authorization: key=AAAAgYxQHeQ:APA91bG9v5eZxk6a-ugXhymJRnRKpZ6Tp-11esJpdJsF1eme4HL_8_yCiTetBr7Rin4bVCBNF1nL9bBLqpKlZDoxm5ql_y7SqdY5exIBmKQ8wla_Zdur0mjtJcVcfMW668LmAmQ6P4p9" -H "Content-Type: application/json" -d '{
  "notification": {
    "title": "Portugal vs. Denmark",
    "body": "5 to 1",
    "icon": "firebase-logo.png",
    "click_action": "https://firebase-messaging-error.herokuapp.com/"
  },
  "to": "<REG_TOKEN_INSTANCE_ID>"
}' "https://fcm.googleapis.com/fcm/send"

on Chrome desktop.

Steps to reproduce:

I have recreated and published the example code from firebase/quickstart-js/messaging at this heroku application. To recreate this error visit this application with an android device and click the "request permission" which will invoke the getToken method. You should see the above error message logged in your console.

Relevant Code:

I have published the code of the above application here. The code that triggers the error is here.

Thanks in advance for your help!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions