-
Notifications
You must be signed in to change notification settings - Fork 955
Closed
Labels
Description
- Operating System version: Windows 10
- Browser version: Chrome 79
- Firebase SDK version: 7.0.0+
- Firebase Product: Messaging
Problem
Currently we are using Firebase SDK 6.5.0. Whenever we update to version 7.0.0 or later (we tried multiple versions including 7.0.0 and 7.8.0) Messaging stops working.
It looks like the background messaging keeps working when the website does not have focus. However when the website does have focus the FCM messaging does not work.
Ofcourse we followed the changelog and enabled the FCM Messaging API.
Relevant Code:
The following code is used in version 6.5.0 and works fine, but breaks in 7.0.0 or after:
// Imports
import * as firebase from 'firebase/app';
import 'firebase/messaging';
// Messaging
this.messaging = firebase.messaging();
// Subscribing to messages
this.messaging.onMessage((result: any) => {
console.log(result);
});
GoktuqCan and ricardodebeijer