Firebase-js-sdk: Microsoft Edge 42.17134.1.0: messaging().getToken() returns exception

Created on 1 May 2018  路  2Comments  路  Source: firebase/firebase-js-sdk

[REQUIRED] Describe your environment

  • Operating System version: Windows 10
  • Firebase SDK version: 4.13.0
  • Firebase Product: messaging

[REQUIRED] Describe the problem

With notification permission granted, messaging().getToken() resolves into an exception: {code: 20, message: "AbortError", name: "AbortError"}

Steps to reproduce:

  1. setup basic service worker
  2. request permission: firebase.messaging().requestPermission()
  3. get token: firebase.messaging().getToken()

Relevant Code:

firebase.messaging().getToken()
.then(token => console.log(token))
.catch(e => console.error(e)

However, this notification demo works, (not fcm): https://whatwebcando.today/local-notifications.html

messaging

Most helpful comment

Hi @mmermerkaya.
Any updates on that?
Thanks

All 2 comments

Edge is not yet in our list of supported browsers.

That demo works because it's not using the Push API, which is the API FCM uses to get push messages from the server. Notifications API (that is demoed in that page) is the API that only _displays_ a notification.

Edge 17 (released just 3 days ago) does support Push API, and we're currently working on making FCM available on Edge.

Hi @mmermerkaya.
Any updates on that?
Thanks

Was this page helpful?
0 / 5 - 0 ratings