Porting Addon SDK to WebExtensions getting error due to ID in manifest - "Reading manifest: Error processing applications.gecko.id"

I’ve ported my extension Most Recent Tab from the Addons SDK to the new WebExtensions API. In development, I left applications.gecko.id in the manifest blank. Now that I’m ready to upload to AMO, I’m trying to fill it in with the old ID, as discussed in the Porting section of the documentation:

When you’re really ready to submit the WebExtension version of your extension to AMO, first port your old add-on ID to the new WebExtension manifest.json file. Your extension must have the same ID as previous versions. 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. Then you can submit your extension update to AMO as your normally would.

However, when I do this and try to load the extension in Firefox I get an error:

ERROR Loading extension 'null': Reading manifest: Error processing applications.gecko.id: Value "jid0-LWzdpvwYVlFi9mYfHgWxSB6aFEY" must either: match the pattern /^\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}$/i, or match the pattern /^[a-z0-9-._]*@[a-z0-9-._]+$/i

The ID in my extension was auto-generated by the Addon SDK command line tool years ago, so I’m not sure what to do about it. If I look at addons.json in my Firefox profile, it’s specified as

"id":"jid0-LWzdpvwYVlFi9mYfHgWxSB6aFEY@jetpack"

Should I use that ID instead of the ID in my source package.json?

    "applications": {
      "gecko": {
        "id": "jid0-LWzdpvwYVlFi9mYfHgWxSB6aFEY@jetpack"
      }
    }

loading work fine and no error in Firefox 55 and 57. Maybe your manifest.json is wrong?

My question is if that will satisfy AMO that it’s the same addon. In my SDK addon’s package.json, the id is just:

> "id": "jid0-LWzdpvwYVlFi9mYfHgWxSB6aFEY",

without the @jetpack bit. Did AMO add the @jetpack?

I think the “@jetpack” be added by jpm, and you should add it to manifest.json for WebExtensions.

1 Like

Interesting. I’ll give it a shot, anyway. Thanks :). It seems that the documentation around porting to WebExtensions could be more clear on this.

Success - AMO reported the xxxx-yyy…@jetpack ID as well and updated no problem.