Closed
Bug 1087044
Opened 11 years ago
Closed 11 years ago
Error: Creating URI from string failed when trying to use require("sdk/self").data.url() as contentScriptFile
Categories
(Add-on SDK Graveyard :: General, defect)
Add-on SDK Graveyard
General
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: ntim, Unassigned, Mentored)
Details
(Whiteboard: [good first bug])
Attachments
(2 obsolete files)
Error: Creating URI from string failed
Stack trace:
sandbox@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/loader/sandbox.js:32:17
WorkerSandbox@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/content/sandbox.js:131:19
constructor@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/core/heritage.js:145:23
@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/content/worker.js:142:25
dispatch@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/method/core.js:119:12
method/method/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/lang/functional/core.js:26:42
method@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/lang/functional/core.js:26:1
@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/panel.js:311:3
emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:96:9
receive@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/utils.js:115:5
transform/next@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/utils.js:36:24
filter/<@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/utils.js:53:7
transform/<@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/utils.js:43:29
emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:96:9
receive@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/utils.js:115:5
transform/next@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/utils.js:36:24
filter/<@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/utils.js:53:7
transform/<@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/utils.js:43:29
emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:96:9
forward@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/panel/events.js:20:3
Observer<.observe@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/system/events.js:72:7
emit@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/system/events.js:51:3
onContentLoad@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///C:/Users/Tim/AppData/Local/Temp/3c940cf3-73c7-443f-aac3-0b97e15a05aa/extensions/black-menu-for-google@carlosjeurissen.com.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/panel/utils.js:286:7
| Reporter | ||
Updated•11 years ago
|
OS: Windows NT → All
Hardware: x86_64 → All
| Reporter | ||
Comment 1•11 years ago
|
||
This is the most reduced testcase I have. I'll post a more reduced one if I can get one.
You can compile either using cfx or jpm.
| Reporter | ||
Comment 2•11 years ago
|
||
I'm using Nightly 36.0a1. I'm using jpm to compile (but the error happens as well when compiled with cfx)
| Reporter | ||
Comment 3•11 years ago
|
||
xpi which is just a compiled version of the zip using jpm
| Reporter | ||
Comment 4•11 years ago
|
||
Seems like an issue on our side. Sorry :/
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
| Reporter | ||
Updated•11 years ago
|
Attachment #8509113 -
Attachment is obsolete: true
| Reporter | ||
Updated•11 years ago
|
Attachment #8509116 -
Attachment is obsolete: true
Comment 5•11 years ago
|
||
I experienced this error occurs when `cross-domain-content` permission is set to `["*"]`.
| Reporter | ||
Comment 6•11 years ago
|
||
(In reply to Kyle Welsby from comment #5)
> I experienced this error occurs when `cross-domain-content` permission is
> set to `["*"]`.
That was also my issue.
Jeff, I think we can show a more obvious error here. Something like : "Do not set cross-domain-content permission to [*]". What do you think ?
Flags: needinfo?(jgriffiths)
Comment 7•11 years ago
|
||
(In reply to Tim Nguyen [:ntim] from comment #6)
> (In reply to Kyle Welsby from comment #5)
> > I experienced this error occurs when `cross-domain-content` permission is
> > set to `["*"]`.
>
> That was also my issue.
> Jeff, I think we can show a more obvious error here. Something like : "Do
> not set cross-domain-content permission to [*]". What do you think ?
You're right, although the docs do *explicitly* say that wildcards are not allowed:
https://developer.mozilla.org/en-US/Add-ons/SDK/Guides/Content_Scripts/Cross_Domain_Content_Scripts
Flags: needinfo?(jgriffiths)
Comment 8•11 years ago
|
||
(In reply to Tim Nguyen [:ntim] from comment #3)
> Created attachment 8509116 [details]
> testcase.xpi
>
> xpi which is just a compiled version of the zip using jpm
could you post the source someplace please?
Flags: needinfo?(ntim007)
| Reporter | ||
Comment 9•11 years ago
|
||
(In reply to Erik Vold [:erikvold] (please needinfo? me) from comment #8)
> (In reply to Tim Nguyen [:ntim] from comment #3)
> > Created attachment 8509116 [details]
> > testcase.xpi
> >
> > xpi which is just a compiled version of the zip using jpm
>
> could you post the source someplace please?
This is a quite big testcase, one smaller testcase would just be setting cross-domain-content: ["*"] in the permissions.
(In reply to Jeff Griffiths (:canuckistani) from comment #7)
> (In reply to Tim Nguyen [:ntim] from comment #6)
> > (In reply to Kyle Welsby from comment #5)
> > > I experienced this error occurs when `cross-domain-content` permission is
> > > set to `["*"]`.
> >
> > That was also my issue.
> > Jeff, I think we can show a more obvious error here. Something like : "Do
> > not set cross-domain-content permission to [*]". What do you think ?
>
> You're right, although the docs do *explicitly* say that wildcards are not
> allowed:
>
> https://developer.mozilla.org/en-US/Add-ons/SDK/Guides/Content_Scripts/
> Cross_Domain_Content_Script
Yes, but that's also one of the first things the developer will try, especially if he's porting his addon from chrome.
Flags: needinfo?(ntim007)
Comment 10•11 years ago
|
||
(In reply to Tim Nguyen [:ntim] from comment #9)
> (In reply to Erik Vold [:erikvold] (please needinfo? me) from comment #8)
> > (In reply to Tim Nguyen [:ntim] from comment #3)
> > > Created attachment 8509116 [details]
> > > testcase.xpi
> > >
> > > xpi which is just a compiled version of the zip using jpm
> >
> > could you post the source someplace please?
>
> This is a quite big testcase, one smaller testcase would just be setting
> cross-domain-content: ["*"] in the permissions.
I see, this looks like a good first bug to me then
https://github.com/mozilla/addon-sdk/search?utf8=%E2%9C%93&q=cross-domain-content
I see two files which use the cross-domain-content, I think a runtime check would be best, this way the patch will work for add-ons made with cfx and jpm. I think it would be ok to ignore a "*" string and log a warning about it at runtime, I'm ni'ing the module owner for his ok for the api change.
Mentor: evold
Flags: needinfo?(rFobic)
Whiteboard: [good first bug]
Comment 11•11 years ago
|
||
I'm sorry I'm not sure I understand what is proposed API change here. Are we talking about weather it's ok to throw if `cross-domain-content` is set to `*`. If so I don't think it's an API change it's just matter of making errors more obvious.
If there was some other change proposed, then I'm not sure what the change is, could someone please explain what the proposed change is in that case.
Flags: needinfo?(rFobic)
You need to log in
before you can comment on or make changes to this bug.
Description
•