-
Notifications
You must be signed in to change notification settings - Fork 928
getToken in Android Chrome fails w/ DOMException: Registration failed - push service error on getToken #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Have you tried running your web app on other versions of Chrome? (Chrome beta and Chrome Dev). Also what version of Chrome is running that is throwing the error (Settings > About Chrome)? The error sounds like there is an issue with push service. Normally this is the result of Chrome ending up with a corrupt database. |
Chrome 50.0.3029.83 |
Ah, I suspect this is an issue in Chrome 50 that is fixed in newer versions of Chrome. This bug was closed with the same error message with no real solution: https://bugs.chromium.org/p/chromium/issues/detail?id=464365 I tried your demo on Chrome for Android Stable (61.0.3163.98) and got a token without an issue. |
Thanks for confirming, I think future users will find this useful. While I do have concerns about the usefulness of the error message, I'm closing this issue because it does not originate with firebase-js-sdk. |
Hi, I have a similar problem. I have a PWA app using Polymer 2.0 and firebase. Firebase messaging is throwing very similar error. ncaught (in promise) DOMException: Registration failed - push service error The messaging doesn't work in Chrome Desktop - [Google Chrome is up to date Code used my-app.html (PolymerElement) <script src="bower_components/firebase/firebase-app.js"></script> <script src="bower_components/firebase/firebase-auth.js"></script> <script src="bower_components/firebase/firebase-database.js"></script> <script src="bower_components/firebase/firebase-firestore.js"></script> <script src="bower_components/firebase/firebase-messaging.js"></script> <script src="bower_components/firebase/firebase-storage.js"></script>
class MyApp extends Polymer.Element {
_requestFcmPermission() { ... other html code .... And the firebase-messaging-sw.js importScripts('/bower_components/firebase/firebase-app.js'); firebase.initializeApp({ var messaging = firebase.messaging(); messaging.setBackgroundMessageHandler(function(payload) { var notificationTitle = payload.notification.title; Manifest.json includes "gcm_sender_id": "103953800507", Request help to resolve the issue. |
[REQUIRED] Describe your environment
[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:
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!
The text was updated successfully, but these errors were encountered: