Validation of native messaging path should be in NativeManifests.sys.mjs, not in NativeMessaging.sys.mjs
Categories
(WebExtensions :: General, task)
Tracking
(firefox130 fixed)
| Tracking | Status | |
|---|---|---|
| firefox130 | --- | fixed |
People
(Reporter: robwu, Assigned: robwu)
References
Details
(Whiteboard: [addons-jira])
Attachments
(1 file)
Bug 1772932 introduced a check and throws an explicit error when a path is not absolute.
The error is NativeApp requires absolute path to command on this platform (source), and because the implementation throws an Error instead of ExtensionError, the message is redacted and the extension receives "An unexpected error occurred".
Before the change, the same redacted error would have been observed, with the logged error being "File at path [path] does not exist, or is not executable" (source in Subprocess module).
All of this is somewhat late - if the path is not absolute, it is an issue with the native manifest, and validation should therefore happen before earlier, in NativeManifests.sys.mjs. Doing so would also enable the implementation to fall back to the generic No such native application [native messaging id] error.
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
Comment 3•1 year ago
|
||
Backed out for causing xpcshell failures on test_ext_native_messaging.js
[task 2024-07-16T23:51:24.534Z] 23:51:24 INFO - TEST-START | toolkit/components/extensions/test/xpcshell/test_ext_native_messaging.js
[task 2024-07-16T23:56:24.537Z] 23:56:24 WARNING - TEST-UNEXPECTED-TIMEOUT | toolkit/components/extensions/test/xpcshell/test_ext_native_messaging.js | Test timed out
[task 2024-07-16T23:56:24.537Z] 23:56:24 INFO - TEST-INFO took 300004ms
[task 2024-07-16T23:56:24.538Z] 23:56:24 INFO - >>>>>>>
[task 2024-07-16T23:56:24.538Z] 23:56:24 INFO - (xpcshell/head.js) | test MAIN run_test pending (1)
[task 2024-07-16T23:56:24.539Z] 23:56:24 INFO - (xpcshell/head.js) | test run_next_test 0 pending (2)
[task 2024-07-16T23:56:24.539Z] 23:56:24 INFO - (xpcshell/head.js) | test MAIN run_test finished (2)
[task 2024-07-16T23:56:24.539Z] 23:56:24 INFO - running event loop
[task 2024-07-16T23:56:24.539Z] 23:56:24 INFO - toolkit/components/extensions/test/xpcshell/test_ext_native_messaging.js | Starting setup check_remote
[task 2024-07-16T23:56:24.540Z] 23:56:24 INFO - (xpcshell/head.js) | test check_remote pending (2)
[task 2024-07-16T23:56:24.540Z] 23:56:24 INFO - TEST-PASS | toolkit/components/extensions/test/xpcshell/test_ext_native_messaging.js | check_remote - [check_remote : 1] useRemoteWebExtensions matches - false == false
| Assignee | ||
Updated•1 year ago
|
Comment 5•1 year ago
|
||
| bugherder | ||
Description
•