Cannot update UnListed WebExtension

I have coded an unlisted WebExtension but I cannot make it update!

installed extension version 1.0.5.1:
manifest.json contains:

"applications": {
     "gecko": {
      "id": "icapkiservice@ica.cz",
      "strict_min_version": "50.0",
      "update_url": "https://s.ica.cz/ica_pkiservice/firefox_extension/ICAPKIServiceExtension_ICA_Firefox_update_manifest.json"
    }
  },

update manifest:

{
  "addons": {
    "icapkiservice@ica.cz": {
      "updates": [
        { "version": "1.0.5.1",
          "update_link": "https://s.ica.cz/ica_pkiservice/firefox_extension/ICAPKIServiceExtension_ICA_1_0_5_1_Firefox.xpi" 
        },
        { "version": "1.0.5.2",
          "update_link": "https://s.ica.cz/ica_pkiservice/firefox_extension/ICAPKIServiceExtension_ICA_1_0_5_2_Firefox.xpi" 
        }
      ]
    }
  }
}

Both xpi signed on AMO. The version 1.0.5.2 is same as the previous except the manifest version key:
version": "1.0.5.2",

SSL cert installed and you can download it from here.

No updates found on Check for Updates.
Does anyone know what would be wrong please?

1 Like

This is an interesting question. I would expect this to work. I have no idea about the internals.

Searching bugzilla for the word update doesn’t bring up any results:

Search term: “ALL Component:WebExtensions #update

https://bugzilla.mozilla.org/buglist.cgi?quicksearch=Component%3AWebExtensions+%23update

Might need to ask this on IRC or dev-addons@mozilla.org mailing list.

I suggest you turn on the extensions.logging.enabled preference on about:config and try running the update again. That should show you more details in the Browser Console, and possibly some errors.

1 Like

Thanks for your answer.
The log in the extension Browser Console is empty.
You can see correct download of the manifest (first line) in the Network tab, but nothing more :confused:

I’m having the same problem. I would much appreciate whomever could take a quick look at the following steps which I performed:

  • Develop versions 22 and 32 of, respectively, my new BookMacster Button and BookMacster Sync WebExtensions.

  • Package each as .crx.

  • Submit them to AMO for codesigning.

  • Download the two .xpi files.

  • Rename downloaded files to simply BookMacsterButton.xpi and BookMacsterSync.xpi.

  • For each of the two, doubleclicked, which caused Firefox 52 to activate, and prompt me to approve installing them into Firefox, which I did.

  • Quit Firefox 52.

  • Relaunch Firefox 52 and verify that my two extensions, versions 22 and 32, are loaded and working.

  • In my extensions project directory, in manifests, change version numbers from 22 to 23 and 32 to 33.

  • As before: Package, submit, codesign, download, rename.

  • For each file, compute SHA256 digest by running, for example, this command in Terminal.app on my Mac:
    shasum -b -a 256 /Users/jk/Downloads/BookMacsterButton.xpi

  • Compose an update manifest Updates.json file, including the new version numbers and SHA256 digests.

  • On my server, into this directory:
    https://sheepsystems.com/bookmacster/extensions/
    upload the two new extension versions BookMacsterButton.xpi, BookMacsterSync.xpi, and the update manifest Updates.json.

  • Verify that all three URLs are accessible by browsing to their URLs in Firefox. For the two .xpi files, Firefox displayed a popover indicating that software installation was prevented. I presume that is expected. Safari simply downloaded them.

  • In Firefox about:config, verify that extensions.logging,enabled is true.

  • Quit Firefox.

  • Launch Firefox.

EXPECTED RESULT: Firefox should silently find and install my updated extensions.
ACTUAL RESULT: Add-Ons Manager still shows the old versions (22, 32).

I tried to quit and launch Firefox a second time, but still same result.

I see no mention of any updating activity in Firefox’ Tools > Web Developer > Browser Console.

Thank you for reading – I hope you see the problem!

Jerry Krinock

Here is the contents of my update manifest, Updates.json file:

{
  "addons": {
    "{5be4a1a1-c477-423d-a946-13c1d880306f}": {
      "updates": [
        { "version": "33",
          "update_link": "https://sheepsystems.com/bookmacster/extensions/BookMacsterSync.xpi",
          "update_hash": "sha256:4140c13f260163dffdefa9a3e7a914baf4d0e2a2613b5e20bee258163f2500d4" }
      ]
    }
    "{ffcd605e-1e3e-460b-be92-80366b730886}": {
      "updates": [
        { "version": "23",
          "update_link": "https://sheepsystems.com/bookmacster/extensions/BookMacsterButton.xpi",
          "update_hash": "sha256:fc790f879ecf63a20f96809fdea9cbab2d5d195a97ad1bdbdfed62b67f5547b7" }
      ]
    }
  }
}

Here are the contents of the two manifest files in the later versions (23, 33) of my extensions. In the earlier versions (22, 32), the manifest files are exactly the same except for the version numbers.

{
	"manifest_version": 2,
	"name" : "BookMacster Button",
	"version" : "23",
	"description" : "Provides a button which you click to land the current page into Sheep Systems' BookMacster or Markster directly.",
	"homepage_url" : "http:\/\/sheepsystems.com\/bookmacster\/HelpBook\/browserExtensions",
	"permissions" : ["tabs", "nativeMessaging"],
	"background": {"page": "background.html"},
	"icons": { "128": "BookMacsterButton-128.png"},
	"browser_action": {
		"default_icon": "images/3Bkmx19.png",
		"default_title": "Land the current page into BookMacster or Markster.\n\nYour 'option' key controls whether or not Inspector is shown, so you can move or edit your new bookmark.  See Preferences > Adding in BookMacster/Markster."
	},
	"applications": {
		"gecko": {
			"id": "{ffcd605e-1e3e-460b-be92-80366b730886}",
			"update_url": "https://sheepsystems.com/bookmacster/extensions/Updates.json"
		}
	}
}

{
	"manifest_version": 2,
	"name" : "BookMacster Sync",
	"version" : "33",
	"description" : "Empowers BookMacster, Markster, Synkmark to sync bookmarks with this browser while it is running, notifies same of bookmarks changes",
	"homepage_url" : "http:\/\/sheepsystems.com\/bookmacster\/HelpBook\/browserExtensions",
	"permissions" : [ "bookmarks", "nativeMessaging" ],
	"background": { "page": "background.html"},
	"icons": { "128": "BookMacsterSync-128.png"},
	"applications": {
		"gecko": {
			"id": "{5be4a1a1-c477-423d-a946-13c1d880306f}",
            "update_url": "https://sheepsystems.com/bookmacster/extensions/Updates.json"
		}
	}
}

Whoops, my Updates.json was missing a comma between the two addon objects. However, after adding the comma, it still doesn’t work.

Also, upon reading the documentation more carefully I noticed that the update_hash property is optional if your server is secured with SSL as mine is. So I temporarily deleted those properties and relaunched Firefox. But still no updates occurred, and still no clues in the Browser Console.

Am I correct in expecting extension updates to occur whenever Firefox launches?

Problem solved.

I just discovered about:config > extensions.update.interval. It was set to 86400, which is 24 hours, probably the default value. I changed it to 60 (seconds), relaunched Firefox and a few minutes later both of my extensions had updated.

I just added a Testing section to the documentation, explaining this for the next dummy.

2 Likes