Lazy Diary @ Hatena Blog

PowerShell / Java / miscellaneous things about software development, Tips & Gochas. CC BY-SA 4.0/Apache License 2.0

Greasemonkey で User Script のインストール時にエラー

User Script をインストールしようとしたら、次のようなエラーが出る場合。

Error installing user script.

[Exception... "Component returned failure code: 0x80520012
(NS_ERROR_FILE_NOT_FOUND) [nslChannel.open]" nsresult: 0x80520012
(NS_ERROR_FILE_NOT_FOUND)" location "JS frame ::
chrome://greasemonkey/content/utils.js :: getContents :: line 167" data: no]

この場合、 [プロファイルディレクトリ]/gm_scripts/config.xml というファイルを一旦空にするといいみたい。 gm_scripts ディレクトリがなければ作る。

UNIX の場合
プロファイルディレクトリは ~/.mozilla/firefox/xxxxxxxx.default/ とする。 [プロファイルディレクトリ]/gm_scripts の内容をバックアップして、
$ cd ~/.mozilla/firefox/xxxxxxxx.username/gm_scripts
$ rm config.xml
$ touch config.xml
Windows の場合
プロファイルディレクトリは C:\Documents and Settings\username\Application Data\Mozilla\Firefox\Profiles\xxxxxxxx.default\ とする。 [プロファイルディレクトリ]/gm_scripts の内容をバックアップして、
    • C:\Documents and Settings\username\Application Data\Mozilla\Firefox\Profiles\xxxxxxxx.default\gm_scripts\ に移動
    • config.xml を削除
    • コンテキストメニューから [新規作成(W)]-[テキスト ドキュメント] で空のファイルを作成
    • 名前を config.xml にする

元ネタ: 質問回答が載ってるページ