-
Couldn't load subscription status.
- Fork 59
Description
If you install non-LIVE version of an extension, every time you trigger its filter hook role, you will receive the following error:
Error: Process returned non-zero exit status 1
Output:
/var/home/jl/src/critic/src/library/js/v8/critic.js:272: Uncaught IOError: chdir() failed: No such file or directory (<snapshot of commit 7cd60ece>)
Stacktrace:
setup() at /var/home/jl/src/critic/src/library/js/v8/critic.js:272
-- critic
This happens, because this role accesses the manifest at several different places, and instead of reading it every time with Manifest.load and installed path like other roles, it uses extension.getManifest() providing sha1 (rather than version ID, for example).
However, extension.getManifest() synthesises an invalid path whenever reading the manifest for the first time using sha1, like the one in the message above: "snapshot of commit 7cd60ece." It uses that path to set the corresponding field of the manifest object, which the extension runner will then use to move into the directory, presumably to make any resource references work well.
It's unclear why do this like this. The manifest has just been read from an actual real file existing in the directory tree. An installed_path. Arguably, it is that path that should be associated with the extension's manifest. (It indeed fixes the filterhook problem.)