Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Mozilla サポートの検索

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

詳しく学ぶ

このスレッドはアーカイブに保管されました。 必要であれば新たに質問してください。

[ Error: Invalid XPI ] And No Details?

  • 10 件の返信
  • 1 人がこの問題に困っています
  • 1 回表示
  • 最後の返信者: cor-el

more options

I'm making a Firefox add-on and zipped it to an XPI file. I drag the file to Firefox and I click install. But it didn't work so I open the developer console. It shows an error:

WARN | Invalid XPI File WARN | Failed to download addon file:///Workspaces/-----/addon/quicklinkbar.xpi

Usually it's supposed to say WHY IT WAS INVALID. Is is because it's completely invalid it has no reason to say, or is it just some rare case?

I'm a beginner so maybe it was just a simple mistake.

I'm making a Firefox add-on and zipped it to an XPI file. I drag the file to Firefox and I click install. But it didn't work so I open the developer console. It shows an error: WARN | Invalid XPI File WARN | Failed to download addon file:///Workspaces/-----/addon/quicklinkbar.xpi Usually it's supposed to say WHY IT WAS INVALID. Is is because it's completely invalid it has no reason to say, or is it just some rare case? I'm a beginner so maybe it was just a simple mistake.

この投稿は William Qin により に変更されました

すべての返信 (10)

more options

You might have better luck with this question on an add-on developer-oriented forum. Perhaps one of the following:

more options

Did you check the content of the file to make sure that the folder structure is correct if you compare it with a valid file in case you added the root folder or otherwise something had gone wrong?

You can also check for an unsupported compression algorithm and try a lower on no compression.

more options

Since XPIs are ZIPs you can't do that with no compression. And I used another compression, cgzip and it is still invalid.

I added an image attached. Is that the right folder structure?

more options

I don't think that it is correct.

The install.rdf file and the chrome.manifest file need to be in the root and not in the chrome or defaults directory.

See:

more options

Sorry if I am reading the Mac OSX folder structure incorrectly, but ...

Is the install.rdf file in the /defaults/ folder? Same for the chrome.manifest file in the /chrome/ folder?

この投稿は the-edmeister により に変更されました

more options

Now I did it according to the Mozilla Doc. I put install.rdf and chrome.manifest in the root folder. Still won't work!

more options

Are the install.rdf and chrome.manifest files still visible if you collapse all folders (chrome, defaults, skin)?

We would have to check the file to see what is wrong if you can't find it yourself. You can leave out the quicklinkbar.js file if you like to keep that confident.

more options

Yes, both are visible. However the error says it's coming from the .rdf file on line 3. But line 3 is the doctype/rdf tag!

Attached 2 images.

more options

Since It says the error is line 3 of install.rdf, here it is!

<?xml version="1.0"?>

<RDF xmlns="http://www.w3.org/1999/02/22-RDF-syntax-ns#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#">

	<Description about="urn:mozilla:install-manifest">
		<em:id>quicklinkbar@wqin12.addons.mozilla.org</em:id>
		<em:version>1.0</em:version>
		<em:type>2</em:type>

		<em:targetApplication>
			<Description>
				<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
				<em:minVersion>4.0.*</em:minVersion>
				<em:maxVersion>33.*</em:maxVersion>
			</Description>
		</em:targetApplication>

		<em:name>QuickLink Toolbar</em:name>
    <em:description>
    	Sometimes you want to visit a common website, but you have to get it from bookmarks or type it in the addressbar. With this add-on you have all the popular sites 1 click away!
    </em:description>
    <em:creator>William Qin</em:creator>
    <em:homepageURL>http://narawagames.appspot.com</em:homepageURL>
	</Description>
</RDF>

この投稿は cor-el により に変更されました

more options

選ばれた解決策