profile gets into broken state where cfx won't run

RESOLVED WORKSFORME

Status

RESOLVED WORKSFORME
7 years ago
7 years ago

People

(Reporter: dietrich, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
i use a local.json that points to a specific profile. however, sometimes this profile gets into a broken state. for some reason, Cu.import is getting file-no-found when trying to load cuddlefish.js!

here are the errors (note: i added some dump() calls in harness.js to see what was causing the file-not-found error).

(addon-sdk)squirple:scratchpad dietrich$ cfx run
Using binary at '/Applications/Aurora.app/Contents/MacOS/firefox-bin'.
Using profile at '/Users/dietrich/Library/Application\ Support/Firefox/Profiles/dwgkjdlp.jp-commands'.
LOADER: resource://jid0-oqye1hraxbxalhmto3k4gp9jjwa-api-utils-lib/cuddlefish.js
IMPORT FAILED: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: resource:///modules/XPIProvider.jsm -> file:///Users/dietrich/Library/Application%5C%20Support/Firefox/Profiles/dwgkjdlp.jp-commands/extensions/xulapp@toolness.com/bootstrap.js -> file:///Users/dietrich/Library/Application%5C%20Support/Firefox/Profiles/dwgkjdlp.jp-commands/extensions/xulapp@toolness.com/components/harness.js :: buildLoader :: line 185"  data: no]
LOADER: resource://jid0-oqye1hraxbxalhmto3k4gp9jjwa-api-utils-lib/cuddlefish.js
IMPORT FAILED: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: resource:///modules/XPIProvider.jsm -> file:///Users/dietrich/Library/Application%5C%20Support/Firefox/Profiles/dwgkjdlp.jp-commands/extensions/xulapp@toolness.com/bootstrap.js -> file:///Users/dietrich/Library/Application%5C%20Support/Firefox/Profiles/dwgkjdlp.jp-commands/extensions/xulapp@toolness.com/components/harness.js :: buildLoader :: line 185"  data: no]
TypeError: jsm.Loader is not a constructor (resource:///modules/XPIProvider.jsm -> file:///Users/dietrich/Library/Application%5C%20Support/Firefox/Profiles/dwgkjdlp.jp-commands/extensions/xulapp@toolness.com/bootstrap.js -> file:///Users/dietrich/Library/Application%5C%20Support/Firefox/Profiles/dwgkjdlp.jp-commands/extensions/xulapp@toolness.com/components/harness.js:196)
stack:
buildLoader()@resource:///modules/XPIProvider.jsm -> file:///Users/dietrich/Library/Application%5C%20Support/Firefox/Profiles/dwgkjdlp.jp-commands/extensions/xulapp@toolness.com/bootstrap.js -> file:///Users/dietrich/Library/Application%5C%20Support/Firefox/Profiles/dwgkjdlp.jp-commands/extensions/xulapp@toolness.com/components/harness.js:196
()@resource:///modules/XPIProvider.jsm -> file:///Users/dietrich/Library/Application%5C%20Support/Firefox/Profiles/dwgkjdlp.jp-commands/extensions/xulapp@toolness.com/bootstrap.js -> file:///Users/dietrich/Library/Application%5C%20Support/Firefox/Profiles/dwgkjdlp.jp-commands/extensions/xulapp@toolness.com/components/harness.js:283
Harness_load("startup")@resource:///modules/XPIProvider.jsm -> file:///Users/dietrich/Library/Application%5C%20Support/Firefox/Profiles/dwgkjdlp.jp-commands/extensions/xulapp@toolness.com/bootstrap.js -> file:///Users/dietrich/Library/Application%5C%20Support/Firefox/Profiles/dwgkjdlp.jp-commands/extensions/xulapp@toolness.com/components/harness.js:311
Harness_observe(null,"sessionstore-windows-restored","")@resource:///modules/XPIProvider.jsm -> file:///Users/dietrich/Library/Application%5C%20Support/Firefox/Profiles/dwgkjdlp.jp-commands/extensions/xulapp@toolness.com/bootstrap.js -> file:///Users/dietrich/Library/Application%5C%20Support/Firefox/Profiles/dwgkjdlp.jp-commands/extensions/xulapp@toolness.com/components/harness.js:376
@:0

FAIL
Total time: 1.416824 seconds
Program terminated unsuccessfully.
Hrm, troubling.

Dietrich: any chance you can provide Brian and I with the profile in question as well as the addon you're running?
Whiteboard: [triage:followup]
I'd pursue three theories. The first is that Cu.import() is being handed a
bogus URI, however your "LOADER:" message looks ok (assuming your JID
matches).

The second theory is that the URI is correct but the mapping hasn't been set
up correctly: I'd dig into harness-options.json (which, under 'cfx run' is
passed through a file in the python-lib/cuddlefish/app-extension/ dir), which
provides the table that populates "resource:" URI mapping. Look at the
"resources" key, it should map the FOO of resource://FOO/stuff to a filename.
The mapping is set up in
python-lib/cuddlefish/app-extension/components/harness.js in the
buildLoader() function. You might also try some other function
(ios.newChannel/open) to read the file at the loader URI without actually
evaluating it, to prove/disprove that the URI and mapping are ok.

The third theory is that it's actually finding cuddlefish.js just fine, but
some other error is occurring while cuddlefish.js is loading. I've seen
Cu.import report all errors as "file-not-found", even simple things like
syntax errors and runtime exceptions. To test this one, add dump()s to
cuddlefish.js (starting with the very first line) and see how many get hit. I
had to do this a lot while I was doing surgery on securable-module.js,
because any syntax errors there showed up as file-not-found of cuddlefish.js.
(Reporter)

Comment 3

7 years ago
I can no longer reproduce this problem. Argh.
Please reopen if you become able to reproduce again!
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WORKSFORME
Whiteboard: [triage:followup]
You need to log in before you can comment on or make changes to this bug.