web-ext icon indicating copy to clipboard operation
web-ext copied to clipboard

Source Code Upload Not Working

Open ElioDiNino opened this issue 5 months ago • 6 comments

The web-ext sign command with environment variable WEB_EXT_API_UPLOAD_SOURCE_CODE = ... for uploading source code does not seem to be working. There are no errors or warnings and we can see the new extension version added in the add-on dashboard but it doesn't show any source code upload alongside it. This requires manual work to then upload the source code archive into the dashboard for Mozilla's approval.

Here is an example GitHub Actions run (see the "Publish to Firefox" step): https://github.com/codecov/codecov-browser-extension/actions/runs/15763012330/job/44433754768

ElioDiNino avatar Jun 19 '25 17:06 ElioDiNino

@eviljeff has anything changed in the API by chance?

willdurand avatar Jun 20 '25 08:06 willdurand

@eviljeff has anything changed in the API by chance?

Not that I'm aware of, but I've not worked on any changes to the API in quite a while.

eviljeff avatar Jun 20 '25 09:06 eviljeff

According to the changelog there hasn't been a change this year - (there's an upcoming change that will land on prod next week). I can't state for certain the changelog is complete though.

eviljeff avatar Jun 20 '25 09:06 eviljeff

I think this may be another case of the docs stating the wrong environment variable. According to the source the arg is upload-source-code, so the environment variable would be WEB_EXT_UPLOAD_SOURCE_CODE (no API).

@ElioDiNino can you try with that env var?

eviljeff avatar Jun 20 '25 15:06 eviljeff

I think this may be another case of the docs stating the wrong environment variable. According to the source the arg is upload-source-code, so the environment variable would be WEB_EXT_UPLOAD_SOURCE_CODE (no API).

@ElioDiNino can you try with that env var?

Sweet, thank you for investigating that! We will try it out in the coming days and report back :)

ElioDiNino avatar Jun 20 '25 19:06 ElioDiNino

@eviljeff what's the best way of checking the documentation doesn't have any more of these incorrectly stated environment variables?

rebloor avatar Jun 23 '25 02:06 rebloor

@eviljeff what's the best way of checking the documentation doesn't have any more of these incorrectly stated environment variables?

The only way I can think of - and it's quite a manual way - is to compare to the object properties in program.js

e.g. the environment variable for the upload-source-code property in the options has to be WEB_EXT_UPLOAD_SOURCE_CODE.

eviljeff avatar Jun 24 '25 13:06 eviljeff

To provide an update on my end, as seen with the linked pull request from last week, I made a change with the fix but we are waiting for our current extension version (0.6.0) to be approved by Mozilla before we submit a new version to test the source code uploading. As far as I can tell there's no way to draft a release or do a dry-run via web-ext, but please correct me if I am wrong.

ElioDiNino avatar Jul 02 '25 12:07 ElioDiNino

To provide an update on my end, as seen with the linked pull request from last week, I made a change with the fix but we are waiting for our current extension version (0.6.0) to be approved by Mozilla before we submit a new version to test the source code uploading. As far as I can tell there's no way to draft a release or do a dry-run via web-ext, but please correct me if I am wrong.

For a test you could submit a version in the unlisted channel - it won't affect the approval of anything in the listed channel. (Be aware version numbers have to be unique across both channels though)

eviljeff avatar Jul 02 '25 12:07 eviljeff

I have now confirmed that the environment variable change was the needed fix! Thanks everyone for the help :)

ElioDiNino avatar Jul 03 '25 17:07 ElioDiNino