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

web-ext sign without deploying #2669

Closed
avi12 opened this issue Mar 13, 2023 · 10 comments
Closed

web-ext sign without deploying #2669

avi12 opened this issue Mar 13, 2023 · 10 comments

Comments

@avi12
Copy link

avi12 commented Mar 13, 2023

Is this a feature request or a bug?

Feature request

What is the current behavior?

Running web-ext sign signs the extension and deploys it to the AMO

What is the expected or desired behavior?

Allow signing without deployment

Recently I upgraded my extension to Manifest V3 to make it future-proof, but then I discovered that some users were affected by it as they cannot upgrade their Firefox to 109+
If sign could support signing without deployment, it'd be cool

P.S. I am aware of the self-publishing ability, but I don't really want to mess with hosting

Version information (for bug reports)

  • Your OS and version: Win10 22H2
  • Paste the output of these commands:
node --version && npm --version && web-ext --version
v19.7.0
9.5.0
7.5.0
@laedit
Copy link

laedit commented Mar 18, 2023

I think you can use the --channel unlisted parameter to not make it available publicly.

@avi12
Copy link
Author

avi12 commented Mar 18, 2023

@laedit The issue is that I wish to have two releases with the same version number, one which is a deployed MV3 and the other is MV2 that isn't deployed but I only have as a signed ZIP
Currently, if I run:

webExt.cmd.sign({
  apiKey: process.env.JWT_ISSUER,
  apiSecret: process.env.JWT_SECRET,
  sourceDir: "build/firefox-mv2-prod",
  artifactsDir: "dist-pack",
  channel: "unlisted"
});

I get:

PS C:\repositories\extensions\youtube-auto-hd> ts-node-esm .\firefox-mv2-build.ts
Building web extension from build/firefox-mv2-prod
Server response: Version 1.7.1 already exists. (status: 409)
FAIL
WebExtError: The extension could not be signed

@laedit
Copy link

laedit commented Mar 19, 2023

That is not possible, if I understand the documentation to distribute manifest v2 and v3 extensions you must have different version numbers and use one as a beta version.

@avi12
Copy link
Author

avi12 commented Mar 19, 2023

Suppose I have version 1.7.1 in production for MV3, if I suddenly deploy 1.7.1b as MV2 unlisted, what will happen?
Will the extension suddenly become unlisted while being MV2, or would 1.7.1 be public while I could still provide a download for the unlisted 1.7.1b?

@laedit
Copy link

laedit commented Mar 19, 2023

I haven't played with the unlisted value but I think the channel parameter only applies on the version being created/uploaded, so the 1.7.1 will stay listed and you could provide a download for the 1.7.1b.

@willdurand
Copy link
Member

I am not entirely sure what this issue is about but the link shared by @laedit above is a good starting point. Quoted from this page:

It is not possible to create a version of an extension that is MV2- and MV3-compatible.

Therefore, you must make a choice between having a MV3 extension OR keeping your user base, which might not be using only Firefox versions compatible with MV3 (i.e. FF 109 and above). The "listed" channel is what gets published to AMO, and the "unlisted" channel is for self-distribution. In both cases, the add-on is signed by AMO.

Listed versions are published on AMO and can be installed from AMO as well as automatically updated (via AMO) in Firefox.

Unlisted versions are not published on AMO. You can decide to distribute the signed XPI on a different website. When installed, this version will not be updated automatically via AMO. You need to specify an update_url in the manifest. This is documented here: https://extensionworkshop.com/documentation/publish/self-distribuation/

I think you should continue to publish the MV2 version of your add-on as a public/listed add-on on AMO until your users all use FF 109+. For the MV3 version of the add-on, you could use the unlisted channel to give that version to some "beta" users but you don't have to. It's perfectly fine to wait a bit longer until you can fully migrate your add-on to MV3.

@avi12
Copy link
Author

avi12 commented Mar 20, 2023

@willdurand In the specific case of my extension, it essentially works the same for both MV2 and MV3
I considered migrating to MV3 to make it future-proof and not worry about when Mozilla finally stops supporting MV2

@willdurand
Copy link
Member

I considered migrating to MV3 to make it future-proof and not worry about when Mozilla finally stops supporting MV2

That is fair, though we don't have plans to stop supporting MV2 at the moment. If you want to keep your current user base, it's fine to wait a bit more before migrating to MV3.

@Rob--W
Copy link
Member

Rob--W commented Mar 30, 2023

Besides the answers above, there is also the option of uploading a MV2 version followed by a MV3 version that has strict_min_version set.

That option was mentioned https://extensionworkshop.com/documentation/publish/distribute-manifest-versions/

As usual, if your extension depends on features only available to recent Firefox versions, specify the compatible Firefox version in the strict_min_version field in manifest.json. Then, older Firefox extensions are not updated. A new user on an old Firefox version can install an older version of the extension using the “See all versions” link at the extension listing on AMO.

@Rob--W Rob--W closed this as completed Mar 30, 2023
@avi12
Copy link
Author

avi12 commented Mar 30, 2023

A new user on an old Firefox version can install an older version of the extension using the “See all versions” link at the extension listing on AMO.

Funny that it mentions it, as the user claimed that the extension wasn't listed after pushing to MV3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants