GUID style id not working in WebExtension

In Porting a legacy Firefox extension, the document says this about the ID:

Copy the value in the “id” field from your package.json file into the id field in the applications section of the WebExtension manifest.json file.

Our legacy extension used a GUID for the “id” field, but using that in the manifest.json file doesn’t seem to work. For example:

"applications": {
    "gecko": {
        "id": "{123e4567-e89b-12d3-a456-426655440000}",
        "strict_min_version": "50.0",
        "update_url": "https://example.com/updates.json"
    }
}

Loading the WebExtension for testing using Load Temporary Add-on produces this error:

There was an error during installation: Add-on {123e4567-e89b-12d3-a456-426655440000} is not compatible with application version.

Using an email style id (e.g., addon@example.com) seems to work just fine – but of course it won’t match the id used for the legacy extension.

Is there any way to get the GUID style id to work with WebExtensions?

A couple of side notes:

  • the quote above mentions a “package.json” file – at least in our case, the legacy file with the id is actually “install.rdf”
  • it’s not clear which id from the install.rdf file should be copied over, the em:id directly under the top level Description or the em:id under targetApplication…
  1. It works for me in Firefox 57 or 55. Please make sure you load the correct manifest.json file with min and max version.
  2. package.json is Add-ons SDK (jpm), install.rdf is XUL-based extension.
  3. Use the “under the top level”, the em:id under targetApplication is id of targetApplication.

Thanks @yfdyh000 – not working for me at all with Firefox 55 – and can remove or change id to “email style” and it works just fine – it’s only the GUID style that doesn’t seem to work.

BTW, looks like strict_max_version is optional (defaults to *).

Can you share both legacy and new extensions so that we can investigate?

Thanks for your help – must have been a glitch – I can no longer reproduce the problem.

1 Like