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

Unexpected KEY_FIREFOX_ANDROID_UNSUPPORTED_BY_MIN_VERSION warning for features from version range [69, 78] #5093

Closed
Rob--W opened this issue Nov 7, 2023 · 1 comment · Fixed by #5094

Comments

@Rob--W
Copy link
Member

Rob--W commented Nov 7, 2023

Describe the problem and steps to reproduce it:

See #5090 (comment) and in particular #5090 (comment) for context. In short, there has not been any Firefox for Android release after version 68, until version 79. The BCD accounts for this by converting "firefox_android": "mirror" entries to 79 for features where firefox.version_added is between 68 and 79.

Up until recently, there were no new manifest features in this version range. Compatibility information for content_security_policy was fixed in mdn/browser-compat-data#21079 by declaring the content_security_policy object syntax as supported in 72+. For the reason above, this translates to support in Firefox for Android 79+.

Strictly speaking, a manifest that uses the content_security_policy object notation with gecko.strict_min_version 72 should pass validation. However, because the BCD translates the support version to 79, a warning is emitted.

To reproduce, we're going to replace node_modules/@mdn/browser-compat-data/data.json with https://github.com/mdn/browser-compat-data/releases/download/v5.3.28/data.json (this simulates merging #5090) and then run the linter on the test case.

  1. Create a directory testcase/ with testcase/manifest.json containing
{
  "name": "test ext",
  "manifest_version": 3,
  "version": "1",
  "browser_specific_settings": {
    "gecko": {
      "id": "test@ext",
      "strict_min_version": "72.0"
    }
  },
  "content_security_policy": {
    "extension_pages": "script-src 'self'"
  }
}
  1. Install addons-linter in the current directory and patch the @mdn/browser-compat-data dependency (to simulate merging chore(deps): bump @mdn/browser-compat-data from 5.3.24 to 5.3.28 #5090):
npm install addons-linter
( cd node_modules/addons-linter/ && npm install @mdn/browser-compat-data@v5.3.28 )
  1. Run the linter on the test case:
./node_modules/.bin/addons-linter testcase/

What happened?

Output has a KEY_FIREFOX_ANDROID_UNSUPPORTED_BY_MIN_VERSION warning:

Validation Summary:

errors          0
notices         0
warnings        1

WARNINGS:

Code                              Message                                       Description                                                                                  File            Line   Column
KEY_FIREFOX_ANDROID_UNSUPPORTE…   Manifest key not supported by the specified   "strict_min_version" requires Firefox for Android 72, which was released before version 79   manifest.json
D_BY_MIN_VERSION                  minimum Firefox for Android version           introduced support for "content_security_policy.extension_pages".

What did you expect to happen?

Output should not have any warnings:

Validation Summary:

errors          0
notices         0
warnings        0

Anything else we should know?

As of now, content_security_policy is the only manifest key that suffers from this issue.

┆Issue is synchronized with this Jira Task

@ioanarusiczki
Copy link

@Rob--W

I uploaded on AMO stage which supports linter 6.17.0 the manifest.json specified above

{ "name": "test ext", "manifest_version": 3, "version": "1", "browser_specific_settings": { "gecko": { "id": "test@ext", "strict_min_version": "72.0" } }, "content_security_policy": { "extension_pages": "script-src 'self'" } }

I did not see the KEY_FIREFOX_ANDROID_UNSUPPORTED_BY_MIN_VERSION warning displayed.

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

Successfully merging a pull request may close this issue.

3 participants