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

Print message to emphasize the need to grant host permissions when a MV3 extension is loaded #2980

Open
Rob--W opened this issue Dec 7, 2023 · 0 comments

Comments

@Rob--W
Copy link
Member

Rob--W commented Dec 7, 2023

In Firefox, MV3 extensions are not granted host permissions at install time (MDN: host_permissions: Requested permissions and user prompts). This includes patterns in content scripts and host_permissions. To avoid developer confusion, we should emphasize the need to grant the permissions manually, e.g. by recommending to add -u about:addons (and toggling the permissions manually) or through the extension's own UI.

The condition for printing the message is:

  • manifest_version > 3
  • host_permissions or content_scripts is non-empty.

Suggested implementation:

  • Declare an array (to hold the informative messages). E.g. called helpful_messages
  • When target is Firefox (condition in source code), and manifestData.manifest_version > 3 and content_scripts or host_permissions are non-empty arrays, append the help text to the helpful_messages array.
  • When the browsers have finally launched, call log.info(); for each message (after extensionRunner.run();)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant