Can't download sidned extension via API

(Oleksiy Bondar) #1

Hi everyone,

I have a simple add-on which I use alongside with automated tests to add some functionality I need, I’m able to sign my addon via Web intrface and I’m able to sign it via API however I can’t download it through API, its avalable only via Web interface

when I sign an addon I’m getting following response


so the problem is that addon is inactive and files list is empty

to sign addon I’m using following endpoint POST /api/v4/addons/

please suggest me what I’m doing wrong

going a little bit forward I’ll explain what I’m trying to achieve

So I have an WebExtension addon which perfectly works under chrome and I’ve modified it to work alongside with a Firefox, now I need a possibility automatically sign addon through API and downloadd it immediatelly after signing also via API call, I cannot manualy sign the addon and put is somwere because I have dynamically generated code of addon. So each time I sign it it has some code differences. As I said earlier it’s used in automated tests and generated part is addon options, hense I could add an options page for this purposes but that will require UI automation on this page, other way I could put options into profile options, but thats impossible for chrome so that would require 2 different approaches for FF and Chrome

other alternative coauld be usage FF for developers which allows to install unsigned addons, but this option is not acceptable due to testing policy, browser should have only official builds, nightly and developers editions are out of the scope

thanx in advance


(Martin Giger) #2

I don’t really know the API, but there’s as a wrapper for it, which is used in the web-ext CLI tool, which would do all of this for you.


(Oleksiy Bondar) #3

I thought about it but its bad Idea since each runtime environment will have to have the lib, and that’s practically imposible

so I’m trying to solve that by using vanilla code, without any extras


(Oleksiy Bondar) #4

Found a solution while looking into sign-addon source code

the downloadable files list is being generated asynchronous, so in original response files attr is empty and all I needed to do is perform status check API call with a delays untill file will be ready for download