Failed to execute 'subscribe' on 'PushManager': Subscription failed - no active Service Worker
## What this teaches
How to failed to execute 'subscribe' on 'PushManager': Subscription failed - no active Service Worker.
## The problem
Issue firebase/firebase-js-sdk#7575 (closed, 78 comments): ### Operating System MacOS ### Browser Version All browser ### Firebase SDK Version 10.2.0 ### Firebase SDK Product: Messaging ### Describe your project's tooling Nextjs 13 with Page setup. Example Repo -> https://github.com/2manoj1/nextjs-firebase-example/tree/main ### Describe the problem Same problem as https://github.com/firebase/firebase-js-sdk/issues/5797 Sometimes calling messaging getToken returns the error: Failed to execute 'subscribe' on 'PushManager': Subscription failed - no active Service Worker.
## What worked (verified answer)
Upgrade the Firebase JS SDK to 11.1.0 or later. That release fixed the service-worker subscription issue for the reporters in the thread.
## Source
gh:firebase/firebase-js-sdk#7575 - https://github.com/firebase/firebase-js-sdk/issues/7575