Open danieloliveira117 opened 3 years ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hi @danieloliveira117, thanks for the report. I was able to replicate the issue. I noticed that the dialog box or prompt asking for notification permission is missing in the Mozilla Firefox browser app on an Android device.
I'm not really sure if this is a bug in the JS FCM SDK or in the Mozilla Firefox browser app. Let me check and update this thread if I have any information to share.
@looptheloop88 I forgot to add in the code above, but in Firefox it only shows the permission request if it originates from a user interaction (eg: click)
From Firefox 72 onwards, can only be called in response to a user gesture such as a click event.
Thanks for the additional information @danieloliveira117. I tried pasting the URL of my test app in the Notes app and clicked it, but the only prompt I got was the "Open with" available browsers.
Probably related to this Stack Overflow post.
@looptheloop88 I'm not 100% if its the same issue, but by doing a factory reset of the app. I was able to get the token/receive notifications correctly.
This is affecting us. If the user sets Firefox set as their default browser, our PWA web app (actually a TWA android app) fails to receive any browser push notifications.
Describe your environment
Describe the problem
In Firefox for Android when trying to get the messaging token it crashes with the following error:
The same code is functional in Chrome (Android, Windows, Ubuntu), Firefox (Windows, Ubuntu) and Edge (Windows).
Steps to reproduce:
Relevant Code:
Main app:
firebase-messaging-sw.js: