firebase / firebase-js-sdk

Firebase Javascript SDK
https://firebase.google.com/docs/web/setup
Other
4.8k stars 884 forks source link

Android Edge: This site has been updated in background #2482

Open kanadaj opened 4 years ago

kanadaj commented 4 years ago

[REQUIRED] Describe your environment

[REQUIRED] Describe the problem

Steps to reproduce:

Relevant Code:

We use the following Service Worker:

importScripts('https://www.gstatic.com/firebasejs/7.6.1/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/7.6.1/firebase-analytics.js');
importScripts('https://www.gstatic.com/firebasejs/7.6.1/firebase-messaging.js');
firebase.initializeApp({
    apiKey: "...",
    authDomain: "...",
    projectId: "...",
    messagingSenderId: "...",
    appId: "...",
});
const messaging = firebase.messaging();

This works perfectly fine in Chrome, but strangely enough Edge doesn't seem to receive the notification payload.

rommelpe commented 4 years ago

Thanks for reporting, @kanadaj. I was able to get the same behavior and indeed, it only occurs in Edge.

edge-notif I created a bug (b/147214252) internally, and progress updates will be posted here as well. Thanks.

woutf commented 4 years ago

Hi @rommelpe, I found this issue through Google because I switched to Edge for Android but noticed website notifications not working anymore like they should. Are there any updates on this?

hdoro commented 3 years ago

This happens on Windows, too, if your Edge instances are all closed. I believe this might be an intended behavior of the browser.

Firefox for example chooses to not show push notifications until the user opens the browser again. Seems like different design choices, not an error with the SDK 🤔

ergec commented 3 years ago

Same problem with FCM REST. Android Edge displays notification "This site was updated in the background" . Notification does not interact, does not open the provided link, no icon is shown.

Vijayakumarktm commented 2 years ago

Same problem. I'm getting "this site has been updated in the background". Also not receiving message in onMessage.

I'm using Reac.js "react": "^17.0.2", "firebase": "9.6.7",

Any one can help?

dwyfrequency commented 1 year ago

@Vijayakumarktm is this issue on Android Edge as well? If so, can you add the following details

This issue hadn't been updated in since 2020 so I want to confirm it's still the same issue. Also, would you be able to provide a minimal repo where this issue can be reproduced?

kanadaj commented 1 year ago

@dwyfrequency I haven't even seen push notifications in Edge lately tbh, so I'm not certain that it even works anymore at all. I'm on Android 13 and Edge 114.0.1823.61

(And yes, notifications are enabled for Edge)