flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

feat(firebase_messaging, web): Added serviceWorkerRegistration to GetTokenOptions

Open remcoanker opened this issue 10 months ago • 5 comments

Description

Added serviceWorkerRegistration to GetTokenOptions for web. This was needed to be able to use a custom service worker. I used Object? for the interface for compatibility, with an assert in the web implementation.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • [ ] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • [ ] All existing and new tests are passing.
  • [ ] I updated/added relevant documentation (doc comments with ///).
  • [ ] The analyzer (melos run analyze) does not report any problems on my PR.
    • melos run analyze does not exist
  • [x] I read and followed the Flutter Style Guide.
  • [ ] I signed the CLA.
    • I tried, but I keep getting the error: A server error occurred, please try your request again.
  • [x] I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • [ ] Yes, this is a breaking change.
  • [x] No, this is not a breaking change.

remcoanker avatar Feb 28 '25 13:02 remcoanker

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Feb 28 '25 13:02 google-cla[bot]

I tried to sign the CLA, but I always get the error: A server error occurred, please try your request again.

remcoanker avatar Feb 28 '25 13:02 remcoanker

The CLA website works again, i've signed it.

remcoanker avatar Mar 04 '25 13:03 remcoanker

Hi @remcoanker, could you add a test for this?

SelaseKay avatar Mar 11 '25 16:03 SelaseKay

@remcoanker - have you actually tried passing in the serviceWorkerRegistration into getToken()? It might help if you demonstrate how this works in the firebase messaging example app.

russellwheatley avatar May 13 '25 13:05 russellwheatley

Hey @remcoanker. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Jul 17 '25 01:07 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@remcoanker if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Jul 28 '25 18:07 google-oss-bot