Unzipping and zipping a working .xpi makes it stop working - firefox

I downloaded the basic Hello World xpi from Mozilla, and it installed in my Firefox without any problems. Then I unistalled the addon, unzipped the xpi, then, without changing anything inside it, zipped it again using 7zip. I tried to install it, and Firefox gave me a "This addon could not be installed because it appears to be corrupt" error.

Unzipping the .xpi produces a folder with the same name as the .xpi, with its contents. To create a working .xpi, zip the contents of that folder, not the folder itself.
Credit goes to nmaier.

Related

public folder on redmine doesn't recognize binary files

I have put a binary file (.apk) on redmine/public folder but when I try to download that file I only get the text version of that file as text.
How to change that behavior to direct download?
You need to navigate to the httputils.rb file (it's wherever webrick is installed) and add this line to the list of MIME types:
application/vnd.android.package-archive apk
If that seems like a lot of trouble and you're not trying to do anything fancy with this download (e.g. download it directly from an android phone and install it), you can always wrap it in a .zip and call it a day. Zip files will download automatically.

Firefox Extensions and XPI installer not working

Hello Im attempting to build a Firefox extension but have run into an issue creating the XPI file,
This tutorial says that the XPI is simply a zip folder renamed, Ive taken a previously installed extension (pinterest) renamed to .zip and it will extract - I can see the plugin files no problem.
If I try and zip then rename my extension to .xpi the plugin will not install - Ive tested this with the pinterest plugin mentioned above and if I rename to zip, extract then rezip and rename back to zpi - the same code will not install. I think there is an issue with the zipping method im using (Windows 7 > Sendto > Compressed .zip)
Just to be clear - I'm not sure my plugin works properly yet, still getting a grip on the files required and naming conventions - however a working package will not work with the same zip process.
Can anyone help with this?
Was zipping from the parent location /folder/contents
Instead of from the contents location
Wokring now.

Install Firebug Extension Manually

I want to install Firebug manually and update configuration settings on my own. I followed below steps:
Downloaded firebug-2.0b1.xpi file (3 MB)
Extracted the content by using winRAR.
put this extracted folder "firebug-2.0b1" inside "C:\Program Files\Mozilla Firefox\extensions"
Now, I run Firefox, but It seems firebug is not installed. This doens't work because some configurations are not done or Profile is not updated. I could like to know if any changes I need to do in folder.
I am doing this because, I couldn't install by drag & drop .xpi file on firefox or install through browser itself.
To install Firebug manually you have to do it differently. There are two ways to run extensions manually:
1. Extract the XPI
Download the XPI file that contains the extension
Locate the 'extensions' folder within your profile (e.g. via Firefox menu > Help > Troubleshooting Information > Show Folder)
Create a new folder within the 'extensions' folder and call it like the add-on's id (for Firebug this is firebug#software.joehewitt.com)
Extract the XPI into that folder
2. Get the sources from the git repository
A detailed description for how to do that can be found on the development setup description on the Firebug wiki. It's similar to the description above with the addition that you'll be able to always get the latest sources.
Two notes:
The folder name must be the same as the addon's ID (look in install.rdf of the addon) In your case it's not firebug-2.0b1 , but firebug#software.joehewitt.com
The directory where the addon should be placed is not where the
Firefox itself is installed, but into your Firefox's profile. By default it's in %APPDATA%\Mozilla\Firefox\Profiles\XXXXX\extensions\ (where XXXXX is name of your profile folder. More info about profiles you can find here)

Create installable Firefox XPI for bootstrapped extension

I downloaded from addons repository a Firefox extension (url shortener), unzipped it and reworked a little bit to use another shortener service - i changed already only a url of shortening service and some names in meta - nothing of vital importance. If i try just to zip all directories and files as they are and try to install - installation fails with an alert
"This addon can't be installed - it could be corrupted"
I guess there are any troubles with zipping of it. I'm even sure, that there is a zipping problem, cause i tried to unzip the original extension, than to zip it without code changes and to install - same error alert.
Also the question is, how to create an installable XPI for the bootstrapped extension (it is:
without .jar-file,
with another directory structure,
installation
withour restart).
The structure of bootstrapped extension (which i have here) is:
/defaults
/locale
/resources
harness-options.json
locales.json
bootstrap.js
install.rdf
options.xul
I use 7-zip, but it is no problem to use any another archiving software.
Thank you for any advice!
Evgeniy
Got it done! Like it describes this answer https://stackoverflow.com/a/18992738/1992004 i zipped a whole folder, what led in error cause of a folder creation inside of archive. After i zipped only included subfolders, i got an installable xpi.

Upgrade to Mozilla Firefox 20 and Selenium IDE 2.0.0 - path for user-extensions.js has changed?

I recently upgraded to firefox 20, and upgraded selenium IDE to 2.0.0
I have a custom "user-extensions.js" file that I usually put here:
C:\Users\skyn\AppData\Roaming\Mozilla\Firefox\Profiles\1dj9c5sr.default\extensions{a6fd85ed-e919-4a43-a5af-8da18bda539f}\chrome\content\selenium-core\scripts
Only now, with Firefox 20, the directory structures have changed apparently.
Here is the path that exists:
C:\Users\skyn\AppData\Roaming\Mozilla\Firefox\Profiles\ug1917fp.default\extensions
and then instead of the next directory in the path, there is an xpi file (with same name):
{a6fd85ed-e919-4a43-a5af-8da18bda539f}.xpi
What happened to the directory and everything in it?
I can't say I understand the way Mozilla organizes its data. Did it install correctly?
This is a issue with the new firefox. It doesn't expand .XPI files automatically.
Take a look at https://developer.mozilla.org/en-US/docs/Extension_Packaging
Starting in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1),
XPI files are no longer unpacked when extensions are installed.
Instead, the XPI itself is placed in the extensions directory, and
files are loaded directly out of the package.
Farther down it says:
A customized application can include add-ons (including extensions and
themes) by placing the unpacked (that is, not the XPI files, but the
packages' contents) in the <appdir>/distribution/bundles directory.
The directory containing the add-on must be named the same as the ID
of the add-on or theme. Add-ons packaged in this way will not be
visible to the user.

Resources