MozillaZine

extension wont install

Talk about add-ons and extension development.
skolar
 
Posts: 23
Joined: November 18th, 2005, 12:52 pm

Post Posted February 13th, 2006, 1:28 pm

I know a lot of people have run into this problem before but i've searched everywhere and i cant seem to find an answer. I wrote an extension and i tried to package it up into a xpi and install it. However, i get this error "install script not found". How do i debug this?

Here is my install.rdf file:

<?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:name>RH_Lookup</em:name>
<em:id>{1c1bc1d0-930d-11da-a72b-0800200c9a66}</em:id>
<em:version>0.5</em:version>
<em:description>Tool for looking up information on RH.com</em:description>
<em:creator>Manish S</em:creator>
<em:homepageURL>http://www.rh.com/</em:homepageURL>

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

</Description>
</RDF>

Here is my directory structure:

RH
/chrome.manifest
/install.rdf
/chrome -->chromeFiles -->content: rh.js, overlay.xul, rh.css

I did not jar the chromeFiles directory. I was testing this locally, by just adding a file with the path to the extension in the extensions directory for firefox and it worked fine. But with the xpi, it says "install script not found".

I would greatly appreciate any help.

Thanks in advance.

dickvl

User avatar
 
Posts: 52519
Joined: July 18th, 2005, 3:25 am

Post Posted February 13th, 2006, 3:40 pm

Is the xpi a valid zip file? (begins with PK)

skolar
 
Posts: 23
Joined: November 18th, 2005, 12:52 pm

Post Posted February 13th, 2006, 3:43 pm

i'm using a mac and so i used the dropzip application to create a zip file. I then renamed the zip to a .xpi file (from the terminal i used 'mv').

How can i check if its a valid xpi? When i try to open the file with ff, it brings up the extension installer window. it seems to be working, then at the end it shows a popup saying it could not install because: install script not found.

Thanks.

dickvl

User avatar
 
Posts: 52519
Joined: July 18th, 2005, 3:25 am

Post Posted February 13th, 2006, 4:05 pm

Do you have a content/contents.rdf file (not in your list)?
See this: http://www.mozilla.org/build/jar-packaging.html

skolar
 
Posts: 23
Joined: November 18th, 2005, 12:52 pm

Post Posted February 13th, 2006, 4:46 pm

I created the contents.rdf file below and zipped it up. Same result: install script not found.

Do i need to create a jar file? If so, which directory do i jar up? Is there something special i need to use to create the jar (like ant).

What's really bothering me is that the extension works fine when i create a file (with the same name as the em:id in install.rdf) and just put a path to the extension root directory in it (/path/to/extension/). Then i just toss that file into firefox extensions folder and it works!


<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">

<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:rh"/>
</RDF:Seq>

<RDF:Description about="urn:mozilla:package:rh"
chrome:displayName="RH"
chrome:author="Manish S"
chrome:authorURL="http://www.rh.com"
chrome:name="rh"
chrome:extension="true"
chrome:description="An extension to lookup information on Rh">
</RDF:Description>

<RDF:Seq about="urn:mozilla:overlays">
<RDF:li resource="chrome://browser/content/browser.xul"/>
</RDF:Seq>

<RDF:Seq about="chrome://browser/content/browser.xul">
<RDF:li>chrome://rh/content/overlay.xul</RDF:li>
</RDF:Seq>

</RDF:RDF>

dickvl

User avatar
 
Posts: 52519
Joined: July 18th, 2005, 3:25 am

Post Posted February 13th, 2006, 6:29 pm

Sorry to confuse you, but I don't know to much about creating xpi files, so I did some (re)reading.
You were correct: you use a chrome.manifest file in the root so you don't need the contents.rdf
http://developer.mozilla.org/en/docs/Ch ... gistration

Could you provide the content of your chrome.manifest
Something like:
overlay chrome://browser/content/browser.xul chrome://rh/content/overlay.xul
content rh chrome/content/
Last edited by dickvl on February 13th, 2006, 6:47 pm, edited 1 time in total.

skolar
 
Posts: 23
Joined: November 18th, 2005, 12:52 pm

Post Posted February 13th, 2006, 6:37 pm

First,

Thanks for your all you help.

Here is the contents of my chrome.manifest

content rh chrome/chromeFiles/content/
overlay chrome://browser/content/browser.xul chrome://rh/content/overlay.xul

I also renamed my directory to all lowercase, no dice.

Thanks again.

dickvl

User avatar
 
Posts: 52519
Joined: July 18th, 2005, 3:25 am

Post Posted February 13th, 2006, 6:53 pm

I see something: you don't need the folder chromeFiles
(overlay -> /rh/chromeFiles/content/overlay.xul)

You can use this folder structure (I think):
/ (chrome.manifest,install.rdf )
/chrome/content (rh.js, overlay.xul, rh.css)

chrome.manifest:
overlay chrome://browser/content/browser.xul chrome://rh/content/overlay.xul
content rh chrome/content/

skolar
 
Posts: 23
Joined: November 18th, 2005, 12:52 pm

Post Posted February 13th, 2006, 7:04 pm

new chrome.manifest

content rh chrome/content/
overlay chrome://browser/content/browser.xul chrome://rh/content/overlay.xul

changed directory structure to remove chromeFiles directory.

did not change install.rdf

It still says install script not found. Do i need an install.js file? The docs says its not required for firefox 0.9+ (im using ff 1.5 on my mac. I tried on my windows machine, ff 1.0, and it gives the same error). Is my install.rdf malformed? I wish there was more explanation of the error.

What do you use to create an xpi file? Maybe my app is garbling it or something?

dickvl

User avatar
 
Posts: 52519
Joined: July 18th, 2005, 3:25 am

Post Posted February 13th, 2006, 7:51 pm

Install.js and contents.rdf are replaced by the combination install.rdf and chrome.manifest
http://developer.mozilla.org/en/docs/Install_Manifests

I use Total Commander on Win XP, so that is not much use for you.
But I guess that there are filemanagers on a mac that support zip files and they should open them and show the content (if necessary rename to zip). I can't see any errors, but you can try to create the zip without compression: just stre the file. Most zip utilities have an option to do so.
I'm afraid I don't know what's going wrong.
Maybe you can place the rh.xpi somewhere for download then I could check the file.

jamieguy
 
Posts: 7
Joined: April 14th, 2006, 7:50 pm

Post Posted April 14th, 2006, 8:25 pm

I found this thread while having a similar problem. The good news is, I've found a solution! As I too am using a Mac, hopefully my problem was the same as yours.</p>

It turns out in my case that the zip archive was being created incorrectly. If you use the Mac's "Create archive" command found in the contextual (right-click or control-click) menu of the <i>folder</i> containing your extension, it will place a superfluous folder <i>inside the archive</i>. The result looks like this:

myextension.xpi:
  • myextension/
    • chrome.manifest
    • install.rdf
    • ...etc...
Firefox seems to only look in the top level of the archive. Since this level only contains one item, a folder, it declares that it can't find the install script.

The solution is to select <b>the items inside the extension folder</b>, not the folder itself, and make an archive of that. You will then get a file that looks like this:

myextension.xpi:
  • chrome.manifest
  • install.rdf
  • ...etc...

Firefox looks in the archive, sees the files it's looking for in the top level, and all is well!

This problem was further masked by the fact that if you extract a zip file which does <i>not</i> contain a parent folder, the Mac will helpfully create one for you, so you can't tell if anything's wrong with your extension by unzipping it.

This one drove me nuts before I figured it out, so I hope it helps you out.

max1million
 
Posts: 2810
Joined: November 15th, 2004, 5:03 am

Post Posted April 15th, 2006, 2:08 am

"install script not found" generally means it (install.js, install.rdf, or chrome.manifest) is not in the root of the xpi. You probably zipped (full path) the folder you were working in instead of just the files and folders that were in it.

parasane
 
Posts: 1
Joined: May 22nd, 2007, 12:38 pm
Location: Olyphant, Pa (USA - Outside of Scranton, Pa)

Post Posted May 22nd, 2007, 12:41 pm

I know it's a really old thread, but I just wanted to pop in with my two cents and say that I was so used to archiving a whole directory that I habitually (read: ignorantly) archived my project directory, which contained the other files.

project/
chrome/
install.js
install.rdf

As soon as I read the next-to-last post, I realized my error, and it worked right off the bat.
^--- I wrote that.

BuddhaBandit
 
Posts: 1
Joined: August 24th, 2010, 2:17 pm

Post Posted August 24th, 2010, 2:19 pm

The mistake I made was that my zip (xpi) file contained one directory too high. In other words, it should not contain httpfox (the parent directory) in the paths of the includes files. So you need to add the files from the level underneath the wrapper directory so that directories like "chrome" are at the top level of the zip (xpi) file.

LoudNoise
New Member

User avatar
 
Posts: 40048
Joined: October 18th, 2007, 1:45 pm
Location: Next door to the west

Post Posted August 24th, 2010, 3:44 pm

You are replying to an elderly thread (2006). Locking. Please start a new thread fully describing the problem.
Post wrangler
"Choose between the Food Select Feature or other Functions. If no food or function is chosen, Toast is the default."

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 2 guests