Make devtools an optional permission
Categories
(WebExtensions :: General, enhancement, P1)
Tracking
(firefox77 fixed)
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: mbugzillam, Assigned: mixedpuppy)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:71.0) Gecko/20100101 Firefox/71.0
Steps to reproduce:
This is a request to make DevTools access an optional permission.
Currently the only way to request DevTools access is to specify devtools_page in the manifest, which results in a permissions warning at install time. This is a shame, as only a subset of the users of the extension I maintain would actually need to use the DevTools part of it, and I'd like people to be able to install the extension without any warnings.
Thanks for your time in considering this. Context and related issues can be found below.
// Background
I maintain an extension that helps people navigate with the keyboard, via landmark regions [0]. It also contains a DevTools panel to help web-devs understand how their code relates to the landmarks on their pages.
Whilst the extension needs to run on every page (in order to tell the user how many landmarks there are via the browserAction badge), I've been experimenting with requesting <all_urls> at runtime, so that it doesn't require any permissions to install.
Unfortunately because the only way to request the DevTools permission is to set devtools_page in the manifest, the user is always required to authorise it, even if they aren't going to actually use it.
// Related issues
There are several other issues that ask for permissions to be made optional:
- Bug 1458585: Allow more permissions to be used as an optional permission [doesn't mention DevTools in the thread, but the submitted patch did include it, though I am not sure if the patch was taken forward]
- Bug 1459941: Let geolocation be an optional permission
- Bug 1548011: Make proxy an optional permission
- Bug 1386673: Make Contextual Identity extensions be an optional permission
- Bug 1399109: Add
management
as an optional permission
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Updated•4 years ago
|
Pushed by scaraveo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/74dce6390e5e support devtools as an optional extension permission r=rpl
Comment 3•4 years ago
|
||
Backed out changeset 74dce6390e5e (bug 1606862) for Xpcshell failures in extensions/test/xpcshell/test_ext_startup_perf.js. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=300115699&repo=autoland&lineNumber=5115
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=74dce6390e5eb6e236c7aab1f7cc9c202dc6ed6e
Backout:
https://hg.mozilla.org/integration/autoland/rev/5d949e7f4d271e40d5dfce60e32f22be51012290
Pushed by scaraveo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8a0b81f6263e support devtools as an optional extension permission r=rpl
Comment 5•4 years ago
•
|
||
Backed out changeset 8a0b81f6263e (Bug 1606862) for causing devtools failures at devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_extension.js
Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=8a0b81f6263e9197fae61b2a65a775055d452398
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=300130455&repo=autoland&lineNumber=8115
[task 2020-04-30T02:42:07.785Z] 02:42:07 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-04-30T02:42:07.787Z] 02:42:07 INFO - TEST-UNEXPECTED-FAIL | devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_extension.js | no tasks awaiting on messages - Got ["devtools-page-ready"], expected []
[task 2020-04-30T02:42:07.789Z] 02:42:07 INFO - Stack trace:
[task 2020-04-30T02:42:07.790Z] 02:42:07 INFO - chrome://mochikit/content/browser-test.js:test_is:1297
[task 2020-04-30T02:42:07.792Z] 02:42:07 INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:ExtensionTestUtils.loadExtension/<:36
[task 2020-04-30T02:42:07.793Z] 02:42:07 INFO - chrome://mochikit/content/browser-test.js:nextTest:549
[task 2020-04-30T02:42:07.794Z] 02:42:07 INFO - chrome://mochikit/content/browser-test.js:timeoutFn:1160
[task 2020-04-30T02:42:07.796Z] 02:42:07 INFO - setTimeout handler*chrome://mochikit/content/browser-test.js:Tester_execTest:1107
[task 2020-04-30T02:42:07.797Z] 02:42:07 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:904
[task 2020-04-30T02:42:07.798Z] 02:42:07 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:918
[task 2020-04-30T02:42:07.800Z] 02:42:07 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-04-30T02:42:07.801Z] 02:42:07 INFO - TEST-UNEXPECTED-FAIL | devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_extension.js | Extension left running at test shutdown -
[task 2020-04-30T02:42:07.802Z] 02:42:07 INFO - Stack trace:
[task 2020-04-30T02:42:07.803Z] 02:42:07 INFO - chrome://mochikit/content/browser-test.js:test_ok:1269
[task 2020-04-30T02:42:07.804Z] 02:42:07 INFO - chrome://mochikit/content/tests/SimpleTest/ExtensionTestUtils.js:ExtensionTestUtils.loadExtension/<:117
[task 2020-04-30T02:42:07.806Z] 02:42:07 INFO - chrome://mochikit/content/browser-test.js:nextTest:549
[task 2020-04-30T02:42:07.807Z] 02:42:07 INFO - chrome://mochikit/content/browser-test.js:timeoutFn:1160
[task 2020-04-30T02:42:07.808Z] 02:42:07 INFO - setTimeout handler*chrome://mochikit/content/browser-test.js:Tester_execTest:1107
[task 2020-04-30T02:42:07.810Z] 02:42:07 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:904
[task 2020-04-30T02:42:07.811Z] 02:42:07 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:918
[task 2020-04-30T02:42:07.960Z] 02:42:07 INFO - GECKO(1224) | [Parent 1224: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 0x7efcb23b4400 == 7 [pid = 1224] [id = {971e8244-2351-4eef-9ca8-f49f44b936be}] [url = about:devtools-toolbox]
[task 2020-04-30T02:42:08.077Z] 02:42:08 INFO - GECKO(1224) | MEMORY STAT | vsize 3675MB | residentFast 506MB | heapAllocated 178MB
Backout by dvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ae6d6d6f6e4b Backed out changeset 8a0b81f6263e for causing devtools failures at devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_extension.js
Assignee | ||
Comment 7•4 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=744ab063b71c13bc783f479a28baa3a4959c1b01
Pushed by scaraveo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7ee1e3242808 support devtools as an optional extension permission r=rpl
Comment 9•4 years ago
|
||
bugherder |
Assignee | ||
Updated•4 years ago
|
Reporter | ||
Comment 10•4 years ago
|
||
Hi and thanks for implementing this :-). I noticed there are some public release notes now about optional permissions coming in Firefox 77 [0] - I gathered from this thread that devtools is included, but it's not mentioned there - do they need to be updated?
Do the developer docs and compat data [1] need updating too? (Apologies if that's already in-progress, or not applicable for the upcoming release.)
[0] https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/77#Changes_for_add-on_developers
[1] https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/optional_permissions
Comment 11•6 months ago
|
||
Better late than never - this permission still needs documenting in the release notes and
Comment 12•6 months ago
|
||
Description
•