NS_ERROR_FILE_NOT_FOUND trying to run extension with cfx

154 views
Skip to first unread message

Anirudh B

unread,
Dec 22, 2014, 11:11:31 AM12/22/14
to mozilla-la...@googlegroups.com
I seem to be having a problem using cfx. I recently installed the add-on sdk, version 1.17. Running with Firefox 34.0.5 on Linux.

When executing 'cfx run', it finds /usr/bin/firefox and uses that, but fails to run the extension. It seems to be installed, according to the addons page, but the icon does not appear in the toolbar (I am trying the example in the tutorial at https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Getting_started). In the terminal, I see this:

Using binary at '/usr/bin/firefox'.

(process:18412): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
Using profile at '/tmp/tmpHFkV72.mozrunner'.

(process:18422): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
System JS : ERROR resource://app/components/nsBrowserGlue.js:1529 - NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIPrefBranch.getComplexValue]

I see this in the browser console:

mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create Preferences.jsm:378
Could not read chrome manifest 'file:///usr/lib64/firefox/browser/extensions/%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D/chrome.manifest'.
No chrome package registered for chrome://susefox/content/susefox.properties

NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIPrefBranch.getComplexValue] nsBrowserGlue.js:1529

syntax error list.txt:1
Key event not available on some keyboard layouts: key="c" modifiers="accel,alt" browser.xul
A promise chain failed to handle a rejection. Did you forget to '.catch', or did you forget to 'return'?
See https://developer.mozilla.org/Mozilla/JavaScript_code_modules/Promise.jsm/Promise
Date: Mon Dec 22 2014 21:33:48 GMT+0530 (IST)
Full Message: loop is not enabled


When I create a new firefox profile using the profile manager and tell cfx to use that profile, everything works fine. I do not see the 'file not found' error, and the icon shows up in the toolbar as the tutorial says it should.

Furthermore, when running 'cfx testall' I get this output in the terminal:

Testing cfx...
.................................Warning: missing module: sdk/panel
Warning: missing module: sdk/tabs.js
Warning: missing module: sdk/panel
Warning: missing module: sdk/tabs.js
...........................

After that, the browser opens with a new profile, and I don't see any additional output from the test. The test doesn't appear to ever finish without ctrl+c.

What could be causing this problem, and what can I do to fix it? I can run cfx with an existing profile every time, but that's inconvenient and I'd like for this work without having to do that.

Erik Vold

unread,
Dec 22, 2014, 4:28:45 PM12/22/14
to mozilla-la...@googlegroups.com

--

Hey Anirudh,

This is hard to debug without seeing your add-on's source code.  Using this example on Fx34 for osx seems to work for me.

I don't recommend using cfx on an existing profile of any importance, because it could damage the profile.

Erik





Anirudh B

unread,
Dec 23, 2014, 12:24:12 AM12/23/14
to mozilla-la...@googlegroups.com
Hi,

Thanks for the response. This is my first time developing an extension for firefox, so I started with the example tutorial I mentioned. I copied the code provided in the tutorial and pasted it into lib/main.js, and downloaded the three icons to data/. It worked perfectly on an existing firefox profile I had, but not with the temporary profile created by cfx (which I believe is created by mozrunner?). There's no worry of damaging the profile, I created a new profile just for testing the extension. I assume there must be something wrong with my setup, but I'm not sure where to start with figuring that out.

Thanks,
Anirudh
Reply all
Reply to author
Forward
0 new messages