Creating/Installing an xpi

General discussion and chat (archived)
thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Creating/Installing an xpi

Unread post by thosrtanner » 2017-04-15, 09:13

I hope this is the right place for posting this, forgive me if it isn't, but it's sort of technical

I'm dragging a firefox extension into palemoon which hasn't been updated since 2012 but I rather like it, and the author is quite happy for me to do this. It works fine with my set up which has the extension set up as a redirection file into my git repo.

Anyway, I generated an xpi file from that using windows powershell to create a zip file and renaming it. However, when I install it in a clean profile, it fails. Switching on extensions debug logging, I get this:

1492246189159 addons.xpi DEBUG Starting install of inforss-reloaded@addons.palemoon.org from file:///C:/Users/Dad/Repositories/github/inforss/inforss.xpi
1492246189193 addons.xpi DEBUG Addon inforss-reloaded@addons.palemoon.org will be installed as an unpacked directory
1492246189209 addons.xpi WARN Failed to install C:\Users\Dad\Repositories\github\inforss\inforss.xpi from file:///C:/Users/Dad/Repositories/github/inforss/inforss.xpi: Win error 3 during operation open on file C:\Users\Dad\AppData\Roaming\Moonchild Productions\Pale Moon\Profiles\nounonhe.inforss-test\extensions\staged\inforss-reloaded@addons.palemoon.org\components\inforssProtocol.js (The system cannot find the path specified.) ((unknown module)) No traceback available
1492246189222 addons.xpi DEBUG removeTemporaryFile: file:///C:/Users/Dad/Repositories/github/inforss/inforss.xpi does not own temp file

It doesn't seem to be a massively long path length and the file is in the xpi file. I also tried manually unpacking into the extensions folder and that worked fine.

Any help gratefully accepted

thosrtanner
Lunatic
Lunatic
Posts: 395
Joined: 2014-05-10, 18:19
Location: UK

Re: Creating/Installing an xpi

Unread post by thosrtanner » 2017-04-15, 21:47

Answering my own question for anyone else who has this problem. It would seem that palemoon (and probably firefox from experiments) can't actually read the zip files produced by powershell. Using 7zip works fine.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35602
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Creating/Installing an xpi

Unread post by Moonchild » 2017-04-16, 11:45

thosrtanner wrote:Answering my own question for anyone else who has this problem. It would seem that palemoon (and probably firefox from experiments) can't actually read the zip files produced by powershell. Using 7zip works fine.
Pale Moon uses a standard zlib module to unpack XPIs. So I'm not sure what powershell creates but it is clearly not according to the normal zip specification.

EDIT: apparently it's a known cmdlet issue:

https://github.com/PowerShell/Microsoft ... /issues/11
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked