Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add `web-ext submit` to submit listed add-ons to AMO #804

Open
bfred-it opened this issue Feb 14, 2017 · 39 comments

Comments

Projects
None yet
@bfred-it
Copy link

commented Feb 14, 2017

Is this a bug or feature request?

Feature request

What is the current behavior?

web-ext sign already successfully submits an extension for review, but then it throws an error.

screen shot 2017-02-14 at 12 31 20

What is the expected or desired behavior?

I don't need instant signing, so if the submission has been successful there should be a way to make it exit with 0.

Suggestions:

$ web-ext sign --submit-only
$ web-ext submit

Version information (for bug reports)

OS X 10.11.6

node --version && npm --version && web-ext --version

v7.2.0
3.10.9
1.8.1

Workaround described below ⬇️

@bfred-it bfred-it referenced this issue Feb 14, 2017

Closed

Mozilla Addons #20

@kumar303

This comment has been minimized.

Copy link
Member

commented Feb 14, 2017

The sign command is intended more for people who self-distribute their add-ons. In your case, why not just use the website? https://addons.mozilla.org/en-US/developers/addon/submit/distribution Is it because you need to put new versions in the review queue frequently? Or just because you'd like to automate the submission process?

@bfred-it

This comment has been minimized.

Copy link
Author

commented Feb 14, 2017

Automate all the things! 😉 Here people discussed the Chrome Web Store version, but it also applies to AMO sindresorhus/module-requests#66

@kumar303

This comment has been minimized.

Copy link
Member

commented Feb 14, 2017

Yeah, using web-ext to automatically put a new version in the AMO review queue seems like it could be useful to support automatic deployment (from a git tag or whatever).

I think it would make sense as a new command, such as what you recommended: web-ext submit or web-ext submit-to-amo (to be explicit, maybe).

The good news is that sign-addon already wraps up the signing API pretty well. The bad news is that the API doesn't support submission of listed add-ons in a straightforward way. Using the signing API to submit a listed add-on would be a hack and I'm not sure that it would be so dependable against future API changes. The fact that it works now at all is just by side effect.

We decided to log an informative message about it in web-ext sign but we also let it throw an error to discourage usage. I guess that's a little weird though, heh.

@FranciscoG

This comment has been minimized.

Copy link

commented Mar 9, 2017

100% this!

I just setup some tasks to automate submitting my extension to the Chrome web store and now I'm working on Firefox (first time ever messing with Firefox Add-ons, so happy about WebExtensions). Looking through the Firefox documentation it wasn't clear to me at all that I could automate sending updates to AMO for an existing add-on... not for self-hosting/self-signing. I even just asked a question on stackoverflow about this.

@kumar303

This comment has been minimized.

Copy link
Member

commented Mar 9, 2017

Even if we added a web-ext submit command, it would not be fully possible to automate submission. The addons.mozilla.org site always requires an editor to review the extension code which is different from the Chrome Store (I believe).

@bfred-it

This comment has been minimized.

Copy link
Author

commented Mar 9, 2017

Understood. The current web-ext sign workflow is fine and it's enough for me already. The only issue is the error exit code.

It's still better than packaging it up, opening the browser, visiting AMO, uploading it, etc manually.

@FranciscoG

This comment has been minimized.

Copy link

commented Mar 9, 2017

agreed . I just want Travis to be able to build and send it off my extension to each respective store. I understand that there's a review process.

I guess for now I'll deal with the error.

@bfred-it are you requiring web-ext from a module? is that possible? or you using child process? Any issues installing web-ext a local dev dependency?

@bfred-it

This comment has been minimized.

Copy link
Author

commented Mar 9, 2017

@FranciscoG I'm not, I plan on using it via npm scripts like I'm doing with chrome-webstore-upload-cli on travis

@bfred-it

This comment has been minimized.

Copy link
Author

commented May 19, 2017

Workaround

I published a 11-lines, temporary web-ext wrapper that filters out the error:

npm install --global web-ext-submit
web-ext-submit

Meant to be used on Travis.

https://github.com/bfred-it/web-ext-submit

Alternative

Or use https://github.com/LinusU/wext-shipit

bfred-it added a commit to npmhub/npmhub that referenced this issue May 19, 2017

bfred-it added a commit to npmhub/npmhub that referenced this issue May 19, 2017

@guillaumevincent

This comment has been minimized.

Copy link

commented May 25, 2017

Hello,
automatic deployment is something really important.
Maybe web-ext submit should also allow publishing source code in zip format?

Thank you @bfred-it

@bfred-it

This comment has been minimized.

Copy link
Author

commented May 25, 2017

web-ext submit would submit to amo only. If you want the zip you can already use web-ext build

@guillaumevincent

This comment has been minimized.

Copy link

commented May 25, 2017

@bfred-it you can add sources to your webextension, to help review

@bfred-it

This comment has been minimized.

Copy link
Author

commented May 26, 2017

Ah I see what you mean, you have a gulp build step in place. I left a link to the repo in the notes for the reviewer before to show the source.

@bfred-it

This comment has been minimized.

Copy link
Author

commented Jun 25, 2017

@guillaumevincent this command uses the Signing API, which only allows the upload of the extension itself. I don't see web-ext allowing the upload of the sources unless there's an API for that. Your best bet would be to include a link to your repo in the zip itself.

@kumar303 kumar303 changed the title Feature: Add `web-ext submit` to only submit for review Add `web-ext submit` to submit listed add-ons to AMO Oct 5, 2017

@kumar303

This comment has been minimized.

Copy link
Member

commented Oct 5, 2017

I removed the "submit for review" part of this issue title because post-review has landed! In other words, listed add-ons are now published ASAP without needing to pass human review.

This makes something like a web-ext submit feature way more useful but I'll be honest in that we are not able to dedicate any Mozilla resources to adding this feature (as far as I know).

@FranciscoG

This comment has been minimized.

Copy link

commented Mar 23, 2018

@hiikezoe

That seems exactly it to me.

@felixfbecker

This comment has been minimized.

Copy link

commented Aug 4, 2018

So am I understanding correctly that automatic releases of new versions (in any way) is blocked by the API not supporting uploading source code? And the API is not open source? I am completely okay with writing my own script that talks to the API (and contributing it to the community), but it seems like there is no way currently - as I read the Add-on policies, if the Add-on contains bundled, minified or otherwise machine-generated code, the source code must be uploaded. What extension is not bundled/minified/machine-generated nowadays?

but I'll be honest in that we are not able to dedicate any Mozilla resources to adding this feature (as far as I know).

@kumar303 would it be possible to at least get some Mozilla resources to extend the API for uploading sources?

Are there other workarounds? I would be fine with making the source public, but I wouldn't know how to link to it when using the signing API. Is it possible? Can we omit source submission if the extension is open source?
What about release notes, is it possible to submit those through the API?

@felixfbecker

This comment has been minimized.

Copy link

commented Aug 12, 2018

Since the above workaround does not seem to support uploading sources and adding release notes, I wrote a semantic-release plugin semantic-release-firefox (it could run without semantic-release though, happy to refactor if there is interest). It uses Puppeteer to upload the XPI and sources through the AMO website in a headless Chrome. We use it to automatically release sourcegraph/browser-extensions

@guillaumevincent

This comment has been minimized.

Copy link

commented Aug 13, 2018

So am I understanding correctly that automatic releases of new versions (in any way) is blocked by the API not supporting uploading source code? And the API is not open source?

This is crazy, every time I need to upload manually my source code to AMO web site. Mozilla just add a URL field and allow automatic publication. We are in 2018, nobody wants to do manually publication.

Do you need some help somewhere? It should not be so complicated

@tumpio

This comment has been minimized.

Copy link

commented Sep 6, 2018

Yet another tool for this task;
https://www.npmjs.com/package/firefox-extension-deploy

I found it simplest to set up.

@felixfbecker

This comment has been minimized.

Copy link

commented Sep 6, 2018

@tumpio it doesn't seem to allow uploading the source code - in that case it can't be used for any extension that has bundled code

@Croydon

This comment has been minimized.

Copy link

commented Sep 7, 2018

You don't need an external tool for this. web-ext sign is already submitting the add-on

https://github.com/Croydon/vertical-tabs-reloaded/blob/48f2ff869fa57cdf851b1fc33e17efb4cdab89fc/.travis.yml#L46

@bfred-it

This comment has been minimized.

Copy link
Author

commented Sep 7, 2018

Croydon that’s gonna miss any errors during deployment. That’s the point of this issue

@Croydon

This comment has been minimized.

Copy link

commented Sep 7, 2018

Yes, but this might be still better for now as using third-party tools?

@kumar303

This comment has been minimized.

Copy link
Member

commented Sep 7, 2018

Since my comment is a bit buried now, this issue is blocked by these two other issues mentioned here: #804 (comment)

The API issue is a hard one to fix due to the legacy of old code. I know that's not a good reason, it's just how it is.

@kumar303

This comment has been minimized.

Copy link
Member

commented Oct 3, 2018

In today's public planning meeting, supporting add-on submission entirely through the API (which web-ext needs) will be planned for Q1 2019. This blocking API issue will likely get implemented then: mozilla/addons-server#7811

@antibot4navalny

This comment has been minimized.

Copy link

commented Nov 9, 2018

I published a temporary+unofficial wrapper that filters out the error:

@bfred-it I'm consistently getting this message: "The WebExtension could not be signed"

However, the new version is successfully submitted for review.
Am I missing something in how your workaround is supposed to be used?

@antibot4navalny

This comment has been minimized.

Copy link

commented Nov 9, 2018

@hiikezoe:

We can submit new versions of pre-existing addons on AMO using
the current upload endpoing even now

I wonder how this endpoint is supposed to work for programmatically submitting a new version of existing listed addon to AMO. Here is what's unclear for me:

  1. The endpoint requires having a signed(?) XPI
  2. The proper way to sign an XPI is(?): web-ext sign
  3. When I invoke web-ext sign, not only it creates a signed XPI, but also submits a version for review (with a side-effect error message @bfred-it suggests to stop showing)

If I undestood everything correctly, in order to submit a version for review with the endpoint, I need to sign it with web-ext which itself submits that version for review.

So the bottom line is: how can I properly use the endpoint itself without submitting it with web-ext as a previous step?

@Harvzor

This comment has been minimized.

Copy link

commented Jan 9, 2019

@antibot4navalny I'm a little bit confused about your question but I'll try and provide some information.

web-ext sign builds the extension, signs it and submits it to AMO but it will not be listed on AMO. Currently this is more intended for self distribution. They're working on changing this.

What I recommend using is web-ext build, then manually submitting the extension to AMO where you can explicitly say if you want it to be publicly released.


I hope this information is useful to you and not something you already know!

taehwanno added a commit to taehwanno/instagram-shortcut-extension that referenced this issue Feb 26, 2019

Add packaging, release script and steps in CircleCI
About Firefox, automation of whole entire process is not possible. So, I
just add related features.

See: mozilla/web-ext#804

taehwanno added a commit to taehwanno/instagram-shortcut-extension that referenced this issue Feb 26, 2019

Add packaging, release script and steps in CircleCI
About Firefox, automation of whole entire process is not possible. So, I
just add related features.

See: mozilla/web-ext#804

taehwanno added a commit to taehwanno/instagram-shortcut-extension that referenced this issue Feb 26, 2019

Add packaging, release script and steps in CircleCI
About Firefox, automation of whole entire process is not possible. So, I
just add related features.

See: mozilla/web-ext#804

taehwanno added a commit to taehwanno/instagram-shortcut-extension that referenced this issue Feb 26, 2019

Add packaging, release script and steps in CircleCI
About Firefox, automation of whole entire process is not possible. So, I
just add related features.

See: mozilla/web-ext#804

molant added a commit to molant/hint that referenced this issue May 24, 2019

Chore: Util to bump package and manifest version on release
Publishing from the CLI is not an easy task and has some limitations:

* Chrome: Need to create an OAuth app and then token expires after 40'.
  There are some packages that facilitate this but several environment
  variables will have to be set in the user's machine.
* Firefox: `web-ext` does not report the right status when updating a
  published extension.

After discussion the agreement was to open a browser with the Chrome and
Firefox store opened to manually upload the bundle file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix webhintio#2497
Ref: mozilla/web-ext#804 (comment)

molant added a commit to molant/hint that referenced this issue May 24, 2019

Chore: Util to bump package and manifest version on release
Publishing from the CLI is not an easy task and has some limitations:

* Chrome: Need to create an OAuth app and then token expires after 40'.
  There are some packages that facilitate this but several environment
  variables will have to be set in the user's machine.
* Firefox: `web-ext` does not report the right status when updating a
  published extension.

After discussion the agreement was to open a browser with the Chrome and
Firefox store opened to manually upload the bundle file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix webhintio#2497
Ref: mozilla/web-ext#804 (comment)

molant added a commit to molant/hint that referenced this issue May 24, 2019

Chore: Util to bump package and manifest version on release
Publishing from the CLI is not an easy task and has some limitations:

* Chrome: Need to create an OAuth app and then token expires after 40'.
  There are some packages that facilitate this but several environment
  variables will have to be set in the user's machine.
* Firefox: `web-ext` does not report the right status when updating a
  published extension.

After discussion the agreement was to open a browser with the Chrome and
Firefox store opened to manually upload the bundle file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix webhintio#2497
Ref: mozilla/web-ext#804 (comment)

molant added a commit to molant/hint that referenced this issue May 24, 2019

Chore: Util to bump package and manifest version on release
Publishing from the CLI is not an easy task and has some limitations:

* Chrome: Need to create an OAuth app and then token expires after 40'.
  There are some packages that facilitate this but several environment
  variables will have to be set in the user's machine.
* Firefox: `web-ext` does not report the right status when updating a
  published extension.

After discussion the agreement was to open a browser with the Chrome and
Firefox store opened to manually upload the bundle file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix webhintio#2497
Ref: mozilla/web-ext#804 (comment)

molant added a commit to molant/hint that referenced this issue May 30, 2019

Chore: Util to bump package and manifest version on release
Publishing from the CLI is not an easy task and has some limitations:

* Chrome: Need to create an OAuth app and then token expires after 40'.
  There are some packages that facilitate this but several environment
  variables will have to be set in the user's machine.
* Firefox: `web-ext` does not report the right status when updating a
  published extension.

After discussion the agreement was to open a browser with the Chrome and
Firefox store opened to manually upload the bundle file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix webhintio#2497
Ref: mozilla/web-ext#804 (comment)

molant added a commit to webhintio/hint that referenced this issue May 30, 2019

Chore: Util to bump package and manifest version on release
Publishing from the CLI is not an easy task and has some limitations:

* Chrome: Need to create an OAuth app and then token expires after 40'.
  There are some packages that facilitate this but several environment
  variables will have to be set in the user's machine.
* Firefox: `web-ext` does not report the right status when updating a
  published extension.

After discussion the agreement was to open a browser with the Chrome and
Firefox store opened to manually upload the bundle file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix #2497
Close #2508
Ref: mozilla/web-ext#804 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.