addons-server: .tgz file is accepted on Upload but causes silent error in Describe step

Describe the problem and steps to reproduce it:

Creating this issue after a brief discussion on discourse.mozilla.org

I’m trying to submit an addon. I follow the steps from extensionworkshop.com, and all goes well, no errors when uploading anything. On the “Describe Add-on” web page, when I fill all the required fields and press submit, I’m directed to the same page with no changes. The exact page url is https://addons.mozilla.org/en-US/developers/addon/pure-image-redirecter/submit/details

What happened?

Nothing happens when I press the “Submit” button

What did you expect to happen?

I expected my addon to be submitted

Anything else we should know?

The discussion happened here: discourse In that discussion you can find a full screenshot of the submit page with all the fields filled out.

The addon name is “pure-image-redirecter”, and the source code is here

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (10 by maintainers)

Most upvoted comments

I’ve finished investigating. The TL;DR version is that yes, changing VALID_SOURCE_EXTENSIONS to include .tgz would fix the bug. Below are more details:

I think QA and I never noticed it before because this bug only manifests in this form at initial submission time: When providing sources for a version, we still get the bug causing the source to be considered a .tar.bz2, but everything still works - the source file just get saved with the wrong extension.

At submission time however, in the details step, we accidentally recheck that the source is correct because we re-use the full form for the approval notes + the Version instance we already have, which has the source set already. So we try to read the source again, but since the extension is incorrect we throw an error, making the form invalid, but never show it to the user. Since the form is invalid so we keep showing the details step.

I’ll fix it myself now that I’ve gone full Sherlock Holmes on this.

As far as I can tell, this issue is caused by the .tgz archive type uploaded as source file. If I’m uploading the extension mentioned above without source files or with a different archive type as source files (i.e .zip, .tar.gz) , the issue will not reproduce. I’ve also tried with a different add-on and .tgz source file and I was able to reproduce the issue.