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

missing docs to register properly multiple clients with prompt for update #3124

Closed
userquin opened this issue Oct 14, 2022 · 2 comments
Closed

Comments

@userquin
Copy link

userquin commented Oct 14, 2022

Library Affected:
workbox-window

Browser & Platform:
Latest Google Chrome on Windows 10.

Issue or Feature Request Description:
We're trying to solve a problem when using workbox-window on vite-plugin-pwa when using prompt for update strategy using https://developer.chrome.com/docs/workbox/handling-service-worker-updates/.

Depending on the client that fires the sw installation and the client where the reload is fired, workbox-window is firing some weird events on the original client that fires the sw installation: also preventing the logic to reload the app in that client.

For more context you can check this PR comment: vite-pwa/vite-plugin-pwa#394 (comment)

You can clone the repo and checkout the branch https://github.com/vite-pwa/vite-plugin-pwa/tree/userquin/fix-reload-prompt-multiple:

  • from root folder run pnpm install && pnpm run build
  • from root folder run pnpm run examples: follow the wizard with default values (vue, prompt for update...) or use the fw you want (except sveltekit).
  • follow instructions on previous PR comment
@userquin
Copy link
Author

userquin commented Oct 14, 2022

We're also dealing with the Ready to work offline message/prompt/dialog and also with the selfDestroying sw, the code can be found here: https://github.com/vite-pwa/vite-plugin-pwa/blob/userquin/fix-reload-prompt-multiple/src/client/build/register.ts

@userquin
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant