zentrum-lexikographie / dwds-addon

Browser extension adding shortcuts to DWDS queries
https://www.dwds.de
GNU General Public License v3.0
8 stars 3 forks source link

Issues with publication of Firefox addon #3

Open adbar opened 1 year ago

adbar commented 1 year ago

Error

Your add-on failed validation with 1 error.
    The add-on ID in your manifest.json (browser-addon@dwds.de) does not match the ID of your add-on on AMO ({6cce5e2b-010d-4403-a0de-938d9a0a587f})

→ Since the addon has already been released the package should include the AMO ID (but how?)

Warning

Manifest V3 compatibility warning

Warning: Firefox is adding support for manifest version 3 (MV3) extensions in Firefox 109.0, however, older versions of Firefox are only compatible with manifest version 2 (MV2) extensions. We recommend uploading Manifest V3 extensions as self-hosted for now to not break compatibility for your users.

For more information about the MV3 extension roll-out or self-hosting MV3 extensions, visit https://mzl.la/3hIwQXX

→ It isn't too bad since it only affects older versions of Firefox but it seems to be best to revert to Manifest V2.

@Mastercuber Any ideas?

Mastercuber commented 1 year ago

For the id I see 2 possibilities:

  1. Try to omit the "browser_specific_settings": section completely
  2. Change the id (browser-addon@dwds.de) to match 6cce5e2b-010d-4403-a0de-938d9a0a587f

The second way gives me locally the following:

Extension is invalid

Reading manifest: Error processing browser_specific_settings.gecko.id: Value "6cce5e2b-010d-4403-a0de-938d9a0a587f" must either: match the pattern /^\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}$/i, or match the pattern /^[a-z0-9-._]*@[a-z0-9-._]+$/i

That's unexpected, since the id is taken from the error message and is matching the first regex.. however, after removing the related section, the add-on is working locally.

Decreasing the manifest_version of the firefox manifest to v2 seems to be no problem after local testing. The main reason why the manifest version was increased, is for publishing to the chrome store, since it requires v3.

adbar commented 1 year ago

Thanks, it turns out it's not practical to generate both extensions with the same manifest after all.

Could you draft a PR which generates a Firefox and a Chrome extension using different parameters then?

Mastercuber commented 1 year ago

Thanks, it turns out it's not practical to generate both extensions with the same manifest after all.

That's the reason, why there is a build script using 2 different manifests.

I was wrong with stating: "the regex matches". The Extension ID (see about:debugging#/runtime/this-firefox) needs the curly braces around the ID like in the PR #4.