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

ensureContentScript fails on *.pixiebrix.com after an extension reload #4189

Closed
fregante opened this issue Aug 31, 2022 · 2 comments
Closed
Labels
bug Something isn't working low priority runtime

Comments

@fregante
Copy link
Contributor

fregante commented Aug 31, 2022

I mentioned this before but apparently I did not open an issue.

ensureContentScript doesn't take any action in some cases:

  • when the extension was granted access to the host
    • because injection is handled by webext-dynamic-content-scripts
  • when manifest already includes the host
    • because injection is handled by the browser

There's one small case that's not covered though:

  • after an extension reload, the browser won't inject the extension onto existing tabs like webext-dynamic-content-scripts does
    • you can see this behavior when installing any new web extension and nothing happens until you refresh the open tabs

Marking this as low priority as extension reload/update is rare, but we actually do it on install, so it could potentially affect users during boarding.

Repro

  1. Ensure you don't have *:/*/* (due to an injection bug)
  2. Open pixiebrix.com
  3. Reload extension
  4. Click browser action on the pixiebrix.com tab

Real-world scenarios

  • user has multiple pixiebrix.com tabs open, installs extension; PB won't work on those tabs
  • the user is on app.pixiebrix.com and the extension is silently updated in the background
@fregante
Copy link
Contributor Author

@fregante
Copy link
Contributor Author

Fixed by #5899

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low priority runtime
Development

No branches or pull requests

2 participants