Skip to content

Conversation

jhuleatt
Copy link
Collaborator

@jhuleatt jhuleatt commented Aug 17, 2021

The reference docs show a separate getMessaging function specifically for service workers. This PR updates the sample to use that instead of from firebase/messaging.

In my testing, importing getMessaging from firebase/messaging caused errors such as:

TypeError: Cannot read property 'addEventListener' of undefined

and

FirebaseError: Messaging: This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc) (messaging/indexed-db-unsupported).

@jhuleatt
Copy link
Collaborator Author

leaving this as draft until firebase/firebase-js-sdk#5314 is resolved

@jhuleatt jhuleatt requested a review from egilmorez August 17, 2021 19:52
Copy link
Contributor

@egilmorez egilmorez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

@jhuleatt jhuleatt marked this pull request as ready for review September 3, 2021 17:26
@jhuleatt jhuleatt enabled auto-merge (squash) September 3, 2021 19:47
@jhuleatt jhuleatt merged commit 2b9c321 into master Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants