Implement "webExtenstion.uninstall" command
Categories
(Remote Protocol :: WebDriver BiDi, task, P3)
Tracking
(firefox137 fixed)
| Tracking | Status | |
|---|---|---|
| firefox137 | --- | fixed |
People
(Reporter: whimboo, Assigned: chrmod)
References
()
Details
(Whiteboard: [webdriver:m15][webdriver:external], [wptsync upstream][webdriver:relnote] )
Attachments
(2 files)
We have to implement the recently added webExtension.uninstall command.
| Reporter | ||
Updated•1 year ago
|
| Reporter | ||
Updated•1 year ago
|
| Reporter | ||
Updated•1 year ago
|
| Reporter | ||
Updated•1 year ago
|
| Reporter | ||
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
Comment 5•1 year ago
|
||
Backed out for causing remote failures @ browser_Addon.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/cd51bfea93269e6d73b76fec3e66b41c5af131af
Failure log -> TEST-UNEXPECTED-FAIL | remote/shared/test/browser/browser_Addon.js
Buffered messages finished
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - TEST-UNEXPECTED-FAIL | remote/shared/test/browser/browser_Addon.js | Uncaught exception in test bound test_installWithBase64_failure - at chrome://remote/content/shared/RemoteError.sys.mjs:8 - InvalidWebExtensionError: Could not install Add-on: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIZipReader.open]
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - Stack trace:
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:199:5
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - InvalidWebExtensionError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:478:5
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - installAddon@chrome://remote/content/shared/Addon.sys.mjs:56:11
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - async*installWithBase64@chrome://remote/content/shared/Addon.sys.mjs:116:21
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - async*test_installWithBase64_failure@chrome://mochitests/content/browser/remote/shared/test/browser/browser_Addon.js:48:16
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - handleTask@chrome://mochikit/content/browser-test.js:1147:26
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - _runTaskBasedTest@chrome://mochikit/content/browser-test.js:1219:18
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - async*Tester_execTest@chrome://mochikit/content/browser-test.js:1360:14
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - nextTest/<@chrome://mochikit/content/browser-test.js:1136:14
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - Leaving test bound test_installWithBase64_failure
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - Entering test bound test_uninstall
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - TEST-PASS | remote/shared/test/browser/browser_Addon.js | undefined assertion name -
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - Leaving test bound test_uninstall
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - Entering test bound test_uninstall_failure
[task 2025-02-13T18:14:00.096Z] 18:14:00 INFO - Not taking screenshot here: see the one that was previously logged
[task 2025-02-13T18:14:00.100Z] 18:14:00 INFO - TEST-UNEXPECTED-FAIL | remote/shared/test/browser/browser_Addon.js | Uncaught exception in test bound test_uninstall_failure - at chrome://remote/content/shared/RemoteError.sys.mjs:8 - NoSuchWebExtensionError: Add-on with ID "test" is not installed.
[task 2025-02-13T18:14:00.100Z] 18:14:00 INFO - Stack trace:
[task 2025-02-13T18:14:00.100Z] 18:14:00 INFO - RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8
[task 2025-02-13T18:14:00.100Z] 18:14:00 INFO - WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:199:5
[task 2025-02-13T18:14:00.100Z] 18:14:00 INFO - NoSuchWebExtensionError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:723:5
[task 2025-02-13T18:14:00.100Z] 18:14:00 INFO - uninstall@chrome://remote/content/shared/Addon.sys.mjs:189:13
[task 2025-02-13T18:14:00.100Z] 18:14:00 INFO - async*test_uninstall_failure@chrome://mochitests/content/browser/remote/shared/test/browser/browser_Addon.js:63:16
[task 2025-02-13T18:14:00.100Z] 18:14:00 INFO - handleTask@chrome://mochikit/content/browser-test.js:1147:26
[task 2025-02-13T18:14:00.100Z] 18:14:00 INFO - _runTaskBasedTest@chrome://mochikit/content/browser-test.js:1219:18
[task 2025-02-13T18:14:00.101Z] 18:14:00 INFO - async*Tester_execTest@chrome://mochikit/content/browser-test.js:1360:14
[task 2025-02-13T18:14:00.101Z] 18:14:00 INFO - nextTest/<@chrome://mochikit/content/browser-test.js:1136:14
[task 2025-02-13T18:14:00.101Z] 18:14:00 INFO - SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13
[task 2025-02-13T18:14:00.101Z] 18:14:00 INFO - Leaving test bound test_uninstall_failure
[task 2025-02-13T18:14:00.102Z] 18:14:00 INFO - GECKO(8603) | MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
| Reporter | ||
Comment 7•1 year ago
|
||
I fixed it and pushed to lando again.
| Reporter | ||
Updated•1 year ago
|
Comment 9•1 year ago
|
||
Backed out for causing WD failures @ webdriver/tests/bidi/web_extension/uninstall/uninstall.py / install/py
Backout link:https://hg.mozilla.org/integration/autoland/rev/6c830e64f486e6b3d1267bbebfb564955bf57f55
tests/web-platform/tests/tools/webdriver/webdriver/bidi/modules/_module.py:76: InvalidWebExtensionException
[task 2025-02-14T03:23:47.771Z] 03:23:47 INFO -
[task 2025-02-14T03:23:47.771Z] 03:23:47 INFO - TEST-FAIL | /webdriver/tests/bidi/web_extension/install/install.py | test_install_from_path - webdriver.bidi.error.InvalidWebExtensionException: invalid web extension (Could not install Add-on: ERROR_CORRUPT_FILE: The file appears to be corrupt.)
[task 2025-02-14T03:23:47.771Z] 03:23:47 INFO - bidi_session = <webdriver.bidi.client.BidiSession object at 0x7ce23e333880>
[task 2025-02-14T03:23:47.771Z] 03:23:47 INFO -
[task 2025-02-14T03:23:47.771Z] 03:23:47 INFO - @pytest.mark.asyncio
[task 2025-02-14T03:23:47.771Z] 03:23:47 INFO - async def test_install_from_path(bidi_session):
[task 2025-02-14T03:23:47.771Z] 03:23:47 INFO - > web_extension = await bidi_session.web_extension.install(
[task 2025-02-14T03:23:47.771Z] 03:23:47 INFO - extensionData={
[task 2025-02-14T03:23:47.771Z] 03:23:47 INFO - "type": "path",
[task 2025-02-14T03:23:47.771Z] 03:23:47 INFO - "path": get_addon_path("unpacked")
[task 2025-02-14T03:23:47.771Z] 03:23:47 INFO - }
[task 2025-02-14T03:23:47.771Z] 03:23:47 INFO - )
[task 2025-02-14T03:23:47.771Z] 03:23:47 INFO -
[task 2025-02-14T03:23:47.771Z] 03:23:47 INFO - bidi_session = <webdriver.bidi.client.BidiSession object at 0x7ce23e333880>
<...>
InvalidWebExtensionError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:478:5
[task 2025-02-14T03:22:37.510Z] 03:22:37 INFO -
[task 2025-02-14T03:22:37.510Z] 03:22:37 INFO - TEST-UNEXPECTED-FAIL | /webdriver/tests/bidi/web_extension/uninstall/uninstall.py | test_uninstall - webdriver.bidi.error.InvalidWebExtensionException: invalid web extension (Could not install Add-on: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsICryptoHash.updateFromStream])
[task 2025-02-14T03:22:37.511Z] 03:22:37 INFO - bidi_session = <webdriver.bidi.client.BidiSession object at 0x7fcc742fe0a0>
[task 2025-02-14T03:22:37.511Z] 03:22:37 INFO -
[task 2025-02-14T03:22:37.511Z] 03:22:37 INFO - @pytest.mark.asyncio
[task 2025-02-14T03:22:37.511Z] 03:22:37 INFO - async def test_uninstall(bidi_session):
[task 2025-02-14T03:22:37.512Z] 03:22:37 INFO - > web_extension = await bidi_session.web_extension.install(
[task 2025-02-14T03:22:37.512Z] 03:22:37 INFO - extensionData={
[task 2025-02-14T03:22:37.513Z] 03:22:37 INFO - "type": "base64",
[task 2025-02-14T03:22:37.513Z] 03:22:37 INFO - "value": get_base64_for_addon_file("webextension-unsigned.xpi")
[task 2025-02-14T03:22:37.513Z] 03:22:37 INFO - }
[task 2025-02-14T03:22:37.513Z] 03:22:37 INFO - )
[task 2025-02-14T03:22:37.513Z] 03:22:37 INFO -
[task 2025-02-14T03:22:37.514Z] 03:22:37 INFO - bidi_session = <webdriver.bidi.client.BidiSession object at 0x7fcc742fe0a0>
| Reporter | ||
Comment 10•1 year ago
|
||
So there are several issues here:
- It's strange that the tests were working before on try because the unsigned XPI is clearly invalid and cannot be unpacked. Maybe something went wrong with the upload to Phabricator? I will re-create the XPI.
- When re-creating the XPI I noticed that the
unpackedfolder still had the Manifest v2 in use. I've updated it to v3. - The signed addon had the Manifest v2 as well, so I went ahead and tried to sign it again via addons.mozilla.org
- I wasn't able to do the signing with the current id because we did it initially with an account we do not have access anymore - so a new id needed to be used for the extension.
- Also Chrome doesn't support the XPI format but wants to have CRX. That means that we should already account for it and use browser specific webextensions. To be close with the names I suggest to use
unpacked/,unsigned.xpi,signed.xpi. - The unsigned XPI we cannot use in a public test because we won't be able to install it - also not via the base64 variant because it would require signature checks to be turned off. We should keep that for our internal tests and we can add tests for it when working on bug 1947678 next.
- We should as well use the new addons for the existing webdriver classic internal tests. I will do it in a separate revision / bug.
| Reporter | ||
Comment 11•1 year ago
•
|
||
I pushed to try to verify that wdspec tests will pass this time:
https://treeherder.mozilla.org/jobs?repo=try&revision=b95fa8f225eb31e26bba0392496bc1f5724ebc5d
Updated•1 year ago
|
Comment 13•1 year ago
|
||
Comment 14•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c8be3f54d352
https://hg.mozilla.org/mozilla-central/rev/1286bc78e41a
Updated•1 year ago
|
Description
•