Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request: generate or support web/firebase-messaging-sw.js #215

Open
1 task done
jakusb opened this issue Sep 14, 2023 · 8 comments
Open
1 task done

request: generate or support web/firebase-messaging-sw.js #215

jakusb opened this issue Sep 14, 2023 · 8 comments
Labels
enhancement New feature or request Needs Attention OP created or responded to issue and it needs attention.

Comments

@jakusb
Copy link

jakusb commented Sep 14, 2023

Is there an existing feature request for this?

  • I have searched the existing issues.

Command

flutterfire configure --include-messaging

Description

Running "flutterfire configure" works like a charm for normal Firebase operations, but is missing out on Cloud Messaging assistance. We now need to still manually and hardcoded introduce our own firebase-messaging-sw.js for web.

Steps to reproduce the behavior:
Run "flutterfire configure"
Notice web/firebase-messaging-sw.js is not created

Expected behavior
web/firebase-messaging-sw.js or any working equivalent should be created, optionally through flag or always

Reasoning

messaging is important component of many apps.
Hardcoding should be avoided where possible

Additional context and comments

No response

@fourman-alex
Copy link

fourman-alex commented Feb 1, 2024

This is a major headache and one which is hard to find the cause or a solution until you stumble on firebase/flutterfire#11678
This should be documented somehow, maybe as interim workaround flutterfire configure prints a warning when configuring web, if firebase_messaging was added in pubspec.

@amrgetment
Copy link

amrgetment commented Feb 1, 2024

For flavors when you generate that file:
my solution by using IndexedDB and Hive
firebase/flutterfire#12146
While the best solution is
flutter/flutter#141371

@JayceeZ
Copy link

JayceeZ commented Mar 25, 2024

I think this is the official reference to how to create the service worker:
https://firebase.google.com/docs/cloud-messaging/flutter/receive#web

Copy link

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@github-actions github-actions bot added the Stale label Sep 30, 2024
@amrgetment
Copy link

No it is not fixed yet

@github-actions github-actions bot added Needs Attention OP created or responded to issue and it needs attention. and removed Stale labels Sep 30, 2024
@NashIlli
Copy link

+1

Copy link

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@github-actions github-actions bot added the Stale label Nov 15, 2024
@amrgetment
Copy link

No it is not fixed yet

@github-actions github-actions bot removed the Stale label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Needs Attention OP created or responded to issue and it needs attention.
Projects
None yet
Development

No branches or pull requests

6 participants