"Cannot send function call result" when using "origin" in "permissions.request"
Categories
(WebExtensions :: Request Handling, defect, P3)
Tracking
(Not tracked)
People
(Reporter: Manuel.Spam, Unassigned)
Details
Attachments
(1 file)
|
14.46 KB,
application/x-xpinstall
|
Details |
If I try to use "origin" in "permissions.request", then I get the following on Browser Console:
Cannot send function call result: other side closed connection (call data: ({path:"permissions.request", args:[{origins:["https://aaaaaa/"], permissions:["webRequest"]}]}))
I'll attach a start of an Addon I wanted to create as a test case. It is still very basic anyway.
Install it. Open Addon settings. Enter an URL (with http...) in the text box, click "Add".
If adding the permission succeeds, the idea was to add the result to the list below the input box. This doesn't happen as the exception about "not being able to send result" prevents any further code execution.
Updated•6 years ago
|
Comment 1•6 years ago
|
||
The priority flag is not set for this bug.
:jimm, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•6 years ago
|
Comment 2•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 3•5 years ago
|
||
This is a bug in your extension. Upon clicking the button, the form is submitted, which causes the options page to unload. The original script won't be running any more, hence the "other side closed connection" error.
It could have been nice to remove the prompt upon close, but that's not what this bug is about.
To fix your add-on, call event.preventDefault(); from the click handler.
Description
•