Този сайт ще има ограничена функционалност, докато се извършва тече неговата поддръжка. Ако дадена статия не може реши проблема ви и искате да зададете въпрос, нашата общност е готова да ви помогне на @firefox в Twitter и /r/firefox в Reddit.

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

[ 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

Избрано решение