Every .xpi file I try to install is "not compatible."

General discussion, compatibility and contributed extensions.

Moderators: Lootyhoof, FranklinDM

Locked
Jenna_R

Every .xpi file I try to install is "not compatible."

Post by Jenna_R » 2015-04-12, 07:36

Hi there, I'm a developer of a Firefox addon that I'm trying to get to work with Pale Moon.

I downloaded the SDK, read up on the development differences and modules, and have been trying to get some .xpi files to install. All of them give me the same "could not be installed because it is not compatible with Pale Moon 25.3.1" message.

This happens even when I try it with a blank or very simple example add-on from the docs. Cfx xpi seems to export it just fine, and I don't think there is anything wrong with the .xpi file itself.

I'm rather used to developing for FF instead, so perhaps I'm completely missing something simple that Pale Moon needs to work. Any ideas would be welcome.

Thanks.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 29251
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Every .xpi file I try to install is "not compatible."

Post by Moonchild » 2015-04-12, 08:20

What does your install.rdf look like?
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

Jenna_R

Re: Every .xpi file I try to install is "not compatible."

Post by Jenna_R » 2015-04-12, 15:41

Moonchild wrote:What does your install.rdf look like?
I'm not seeing an install.rdf file. I'm trying to "install add-on from file" and then pick an .xpi file since I'm still just testing.

Do I need to make it into an install file before I can test it? I'm sorry if that's a dumb question, but I must be missing something dumb if I can't get anything to work.

Thanks the reply, I appreciate any help.

Jenna_R

Re: Every .xpi file I try to install is "not compatible."

Post by Jenna_R » 2015-04-12, 22:50

Alright, I figured out that the install.rdf file is inside the xpi file. I knew I must have been missing something simple there...

So I got that opened up, edited it for the new Pale Moon GUID, and now it installs okay with no compatibility error.

But... that's where a new fun problem starts. I still can't get even a simple example add-on working, not properly anyway.

Taken from the docs there is this simple tutorial that has a clickable widget that opens up a tab:

Code: Select all

var widgets = require("sdk/widget");
var tabs = require("sdk/tabs");
 
var widget = widgets.Widget({
  id: "mozilla-link",
  label: "Mozilla website",
  contentURL: "http://www.mozilla.org/favicon.ico",
  onClick: function() {
    tabs.open("http://www.mozilla.org/");
  }
});
For some reason this fails. It won't show the icon in the widget toolbar nor can you click on it of course.

Next I simplified the add-on even further to only show an icon, not have any click method.

Code: Select all

var widgets = require("sdk/widget");
 
var widget = widgets.Widget({
  id: "mozilla-link",
  label: "Mozilla website",
  contentURL: "http://www.mozilla.org/favicon.ico"
});
This does work, with the icon showing up correctly.

After more trial and error it seems that the problem is caused by trying to load more than one API. I can have one line like:

Code: Select all

var widgets = require("sdk/widget");
But as soon as I add a second require line:

Code: Select all

var widgets = require("sdk/widget");
var tabs = require("sdk/tabs");
It breaks. I'm not finding any reason for this in the docs either. Does there have to be an order for loading APIs? Do multiple ones cause lag or other issues? I must be missing something again... any clue?

Thanks.

Locked