License: This field, or custom_license, is required for listed versions

I am trying to submit builds of my addon via the API with the Github action wdzeng/firefox-addon@v1

And it was working fine, but now I am getting the error:
Firefox API server responses with error code: 400

{“license”:[“This field, or custom_license, is required for listed versions.”]}

But I have "license": "MPL-2.0", in my manifest.json and package.json and I have a LICENSE file.

The xpi I download from my pipeline and upload to the site directly works though

I am not sure what is going on, any help?

Edit:
about:debugging doesn’t like it:
Reading manifest: Warning processing license: An unexpected property was found in the WebExtension manifest.

hah

Hey @marcus1060!

I’m not familiar with the GitHub Action you mentioned, but a license field is required by the version create and version edit endpoints exposed by the AMO API. I took a closer look at the Action’s README and noticed that it seems to be saying that you need to set the license in the GitHub action’s workflow file.

Firefox itself shouldn’t error if you load an extension with a license key in your manifest. My best guess is that AMO is rejecting your submission because addons-linter, which is automatically run against each submission, generates an error for this key.

1 Like

Yup that’s it!

I suppose the reason I never saw this with my other addon is that one I submitted first through the portal and I set these fields manually?

There seems to be an issue with the action using addon-guid instead of addon-id, I’ll send them a PR.

Yeah, that would make sense. Since this field must be set when creating a new add-on, Developer Hub won’t let you submit the new add-on form without selecting a license.