Closed
Bug 1412128
Opened 7 years ago
Closed 7 years ago
WebExtension fails to get the right host permissions for tab even when key is in manifest.json
Categories
(WebExtensions :: Untriaged, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1411641
People
(Reporter: u604707, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20171026100047
Steps to reproduce:
I created an extension that uses `chrome.tabs.executeScript()` in order to inject some JS into a webpage. I believe I have all the right permissions (and more!) in my manifest.json, and the extension works fine, receiving the correct permissions in Chrome. I think this is a Firefox issue with granting permissions to extensions.
Steps to reproduce:
* install the extension (link below), or any extension with correct permissions in manifest.json
* navigate to a *sandboxed page without the 'allow-script' permission set* (see below for valid links)
* attempt to use `chrome.tabs.executeScript()`
## Useful links
- My extension https://addons.mozilla.org/en-US/firefox/addon/colorcode/
- My extension's source https://github.com/callodacity/ColorCode
- A web page that works http://codemirror.net/addon/edit/continuelist.js
- A web page that doesn't work (sandboxed, etc.) https://raw.githubusercontent.com/codemirror/CodeMirror/master/src/display/Display.js
Very easy way to see the difference is to install the extensions both in Chrome and Firefox (links on GitHub), and navigate to the above pages - in Chrome both work, in Firefox only one works.
Actual results:
Results in no script being executed and "Error: Missing host permission for the tab" being logged to the console.
Expected results:
Since there are appropriate permissions in the manifest.json, the exension should have had host permissions, and the script should have been executed.
This exact same manifest.json and API calls work as expected in Chrome, granting permissions to the extension.
As an extra note this is the manifest.json in the extension: https://github.com/callodacity/ColorCode/blob/master/manifest.json
Comment 2•7 years ago
|
||
looks like probably a duplicate of bug 1411641?
Component: Untriaged → WebExtensions: Untriaged
Product: Firefox → Toolkit
Updated•7 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Yep, that issue looks like it's representing the same bug. We can follow it there - thanks!
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•