Add-on Updates


(Andres Davila) #1

Guys,

I updated my add-on to be compatible with FF +57, now I’m trying to test how to update it and it is winning the battle. I always sign my add-ons on AMO to be able to distribute by my own. The process is simple, when I install my application it copies my xpi file to the right directory (…Extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}) and that’s it, the user only has to accept the new installation. Now when I try to do the same I mean substitute the xpi file for a new one, Firefox never takes my change and keeps the old version.

The manifest has this section:

“applications”: {
“gecko”: {
“id”: "id@some.net",
“strict_min_version”: “43.0a1”,
“update_url”: “https://domain.net/firefox/extensions/updates.json
}
}

The update.json has:

{
“addons”: {
"id@some.net": {
“updates”: [
{
“version”: “2.0.1”,
“update_link”: “https://domain.net/firefox/extensions/myextension-2.0.1.xpi
}
]
}
}
}

Any clue why I’m not receiving any update?


(Emmanuel Sellier) #2

Hello,

Did you check :

1/ HTTP logs : both json and xpi can be reached?

2/ do you expect an auto-update or did you try to manually check for updates?

3/ have you tried to add update_url_info and applications in the updates.json such as:

{

“version”: “2.2.7”,

“update_link”: “https://myhost.com/extension/dist/quantum/extension-2.2.7.xpi”,

“update_info_url”: “https://myhost.com/extension/dist/quantum/extension-updates-2.2.7.xhtml”,

“applications”: {

“gecko”:{

“strict_min_version”:“57.0”,

“strict_max_version”:“59.0a1”

}

}

}

I guess the object applications is missing in your updates.json.

Emmanuel


(Andres Davila) #3

Hi Emmanuel,

Thanks for your answer…

Yes, initially no requests arrived from the extension. After I put the “application - gecko” section in the updates.json I started to get requests from it (good one, one step beyond).

[01/Dec/2017:16:04:17 +0000] “GET /firefox/extensions/updates.json HTTP/1.1” 200 1148 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:57.0) Gecko/20100101 Firefox/57.0”

I tried both but none of them worked as I expected.

No, I hadn’t try. Now I am using something like:

{
      "version": "2.0.1",
      "update_link": "https://domain.net/firefox/extensions/2.0.1/id@some.net.xpi",
      "update_info_url": "https://domain.net/firefox/extensions/2.0.1/update-info.xhtml",
      "applications": {
        "gecko": { "strict_min_version": "56.0.1" }
      }
    }

I still have none updates…

I would appreciate any extra help!

Best.
Andres


(Emmanuel Sellier) #4

Your web certificate has a valid/signed certificate ? Not self-signed ?

It should be ok then.

Your current version is 2.0.0 ? (Obviously)

Else try to launch FF from command line with debug/verbose and check what it says… (I guess there could be some info).

Emmanuel

fernan256 Andres Davila
December 1
Hi Emmanuel,

Thanks for your answer…

emmanuel_sellier:
HTTP logs : both json and xpi can be reached

Yes, initially no requests arrived from the extension. After I put the “application - gecko” section in the updates.json I started to get requests from it (good one, one step beyond).

[01/Dec/2017:16:04:17 +0000] “GET /firefox/extensions/updates.json HTTP/1.1” 200 1148 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:57.0) Gecko/20100101 Firefox/57.0”

emmanuel_sellier:
do you expect an auto-update or did you try to manually check for updates

I tried both but none of them worked as I expected.

emmanuel_sellier:
have you tried to add update_url_info and applications in the updates.json

No, I hadn’t try. Now I am using something like:

> { "version": "2.0.1", "update_link": "[https://domain.net/firefox/extensions/2.0.1/id@some.net.xpi](https://domain.net/firefox/extensions/2.0.1/id@some.net.xpi)", "update_info_url": "[https://domain.net/firefox/extensions/2.0.1/update-info.xhtml](https://domain.net/firefox/extensions/2.0.1/update-info.xhtml)", "applications": { "gecko": { "strict_min_version": "56.0.1" } } }