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

[Bug or Feature] Could't call navigaor.serviceWorker.register in Child App #2950

Open
eryue0220 opened this issue Apr 25, 2024 · 0 comments
Open

Comments

@eryue0220
Copy link

What happens?

While calling navigator.serviceWorker.register in Child App, it will cause an error and make the whole app down. On the other hand, the location.origin in child app's code will change to the main's

Mini Showcase Repository(REQUIRED)

https://github.com/eryue0220/qiankun-test-demo

How To Reproduce

Steps to reproduce the behavior:

  1. cd qiankun-test-demo
  2. run cd main && npm i && npm start to start main app
  3. run cd child && npm i && npm start to start child app
  4. visit http://localhost:3000 in browser

Expected behavior

  1. Calling navigator.serviceWorker.register API in child app will not cause an error;
  2. location.origin should points at its real app.

Context

  • qiankun Version: 2.10.16
  • Platform Version: Mac OS 14.1
  • Browser Version: Chrome latest version
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