Does Next-PWA service worker take a long time to get activated #166
Unanswered
pranayperiwal
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am working on an app that uses notifications. However, the struggle I am having is to register the service worker and get it active and controlling the page in the first run of the app. It seems like it takes a very long time to register and not on the first run. I need to kill the app maybe once or twice, and only after that does the notification subscription work.
I am using the classic VAPID keys method of enabling notifications.
Is there something I should know about service workers i.e. is this expected behaviour? If it's not, happy to add all my code in.
This is what my custom service worker looks like:
This is my next.config.mjs:
Beta Was this translation helpful? Give feedback.
All reactions