Skip to content

strict_min_version #109

Closed
Closed

Description

@khlr

AMO complains when I try to upload the 1.9.3 release:

Your add-on failed validation with 1 error.
Unknown "strict_min_version" 140.11.0 for Firefox

Why did you raise the bar, @tvdijen ? 318321e

Activity

  1. tvdijen commented on May 31, 2026

    @tvdijen
    Member

    No specific reason, just thinking a year-old version of Firefox would be a reasonable minimum..
    Feel free to put it back to where it was

  2. tvdijen commented on May 31, 2026

    @tvdijen
    Member

    Apparently it's only accepting majors or wildcards.. 140.0 is a reasonable minimum according to Grok.
    I hope it is accepted now; I just changed it

    For reference; these are accepted values: https://addons.mozilla.org/api/v5/applications/firefox/
    Sorry I got in your way

  3. tvdijen commented on Jun 30, 2026

    @tvdijen
    Member

    @khlr were you able to try again?

  4. khlr commented on Jul 4, 2026

    @khlr
    ContributorAuthor

    By the way, version 1.9.3 has been available in the Chrome Web Store for quite some time now:
    https://chromewebstore.google.com/detail/saml-tracer/mpdajninpobndbfcldcmbpnnbhibjmch

    From Mozilla I got this reply:

    Your Extension SAML-tracer was manually reviewed by the Mozilla Add-ons team in an assessment performed on our own initiative of content that was submitted to Mozilla Add-ons.

    Our review found that your content violates the following Mozilla policy or policies:

    • Sources, specifically Third party library information missing: Your add-on includes a third-party library. Please provide the origin of the exact library version you were using and make sure you are using an exact copy of the original maintainer's release version. Established libraries must be included from their official source, in their original format without any modification (changing the file name does not matter). Please note that only stable releases are acceptable (not beta, pre, RC, dev etc) and that third party CDNs are not considered official sources. For more information, refer to https://extensionworkshop.com/documentation/publish/third-party-library-usage/

    • Sources, specifically Third party library not matching original: Third-party libraries or frameworks must be included from their official sources, in their original format without any modifications (other than changing the file name, if desired). Only release versions may be used and third party CDNs are not considered official sources. For more information, please refer to our third-party library guidelines https://extensionworkshop.com/documentation/publish/third-party-library-usage/ .

    -> lib\pako_inflate.min.js
    -> lib\highlight.min.js.

    When I uploaded the release to AMO I noticed that our lib-folder was empty.
    Shouldn't our build release workflow clone the both dependency and include the results? Seems not to happen.

    I downloaded the min-js-files from the both repos and included them by hand in the zip-file to be uploaded to AMO.
    The problem now is that, to be honest, I don't know how to cite the sources in a way that AMO would accept: https://extensionworkshop.com/documentation/publish/third-party-library-usage/

  5. tvdijen commented on Jul 4, 2026

    @tvdijen
    Member

    When I uploaded the release to AMO I noticed that our lib-folder was empty.

    That's strange, because the build-logs clearly mention the files being added to the archive.
    https://github.com/simplesamlphp/SAML-tracer/actions/runs/26720953604/job/78747797608#step:5:251

    Let's keep an eye on this for the next release.

    The problem now is that, to be honest, I don't know how to cite the sources in a way that AMO would accept

    I would write that the sources and version numbers are cited in bin/script.sh.. Both dependencies do not publish their .min.js files anywhere, so we cannot reference them.

    If they still don't accept it, we could try again to collect them as NPM Packages, but I remember we couldn't get that working last time I tried. Perhaps leave your email address so they can tell us what an acceptable solution would be for them?

  6. khlr commented on Jul 4, 2026

    @khlr
    ContributorAuthor

    Oh man... When I finished our version 1.9.3, there hadn’t been any new releases for either of those dependencies for ages. Guess what’s happened in the last few weeks... Both hljs and pako have had new (major) releases.

    Both dependencies do not publish their .min.js files anywhere, so we cannot reference them.

    I’ve just noticed that hljs has its own cdn-release repository, which hosts minified versions: https://github.com/highlightjs/cdn-release/tree/11.11.1/build
    So we could take highlight.min.js, xml.min.js, properties.min.js and http.min.js from there instead of building it ourselves with node.js.
    But guess what? While hljs 11.11.2 has been released two weeks ago there's no 11.11.2 cdn-build yet. Maybe they'll post a related release there in the next few days...

    While creating our release I checked that pako's latest release was still 2.1.0 from 2022. In the meantime they released a version 2.2.0 (two weeks ago) and even a new major version: 3.0.0.
    pako's documentation is rather sparse... I have no idea what has changed from 2.1.0 to 2.2.0 or 3.0.0.
    But I noticed that there's a dist-folder in version 2.2.0 which unfortunately has vanished in version 3.0.0.
    So again we could take a pre-built minified file from there as well (at least for version 2.2.0). I think this would be totally fine, if we found out that there's no actual need for using version 3.0.0.

    Even though this topic is a bit annoying right now, it could be a nice opportunity for us to dramatically simplify our build.sh. So, what do you think about completely removing the cloning and building of the two projects, @tvdijen?

  7. tvdijen commented on Jul 4, 2026

    @tvdijen
    Member

    Yeah, I noticed the new releases too!
    I was trying to remember why we do what we do, and I think it's mostly pako that has a lot more js-files than just the one file we use.

    I'm totally fine with simplifying! We could drop the build.sh script and download the files from the build-release-action
    All I can tell is that the removal of pako's dist-directory was a deliberate change that was mentioned in the changelog

  8. tvdijen commented on Jul 4, 2026

    @tvdijen
    Member

    I'm not sure what the best strategy is here.. It might be a dual strategy:

    • highlight.js we can install using composer to fetch the .min.js file and they would probably accept that at AMO because the source is clear from the composer.json. It is also available through npm, but then there is no .min.js and I'm not sure how we would load it then.
    • Pako cannot be installed this way, but it can be installed using npm to get the .min.js file. AMO can check the package.json file, so I believe they should accept that.

    You have a better idea?

  9. khlr commented on Jul 4, 2026

    @khlr
    ContributorAuthor

    What about just something like this?

    - name: Download pako
      run: |
        mkdir -p lib
        curl -L \
          https://raw.githubusercontent.com/nodeca/pako/refs/tags/2.2.0/dist/pako_inflate.min.js \
          -o lib/pako.min.js
  10. tvdijen commented on Jul 4, 2026

    @tvdijen
    Member

    That's short-term, because as you have already noticed there is no dist-directory in 3.0.0 anymore.
    I also believe that AMO wants clear dependencies from a package-tool, not some reference in a script or a workflow..

  11. kellenmurphy commented on Jul 4, 2026

    @kellenmurphy
    Contributor

    Couple of thoughts here...

    1. hljs publishes its cdn-release builds to npm as @highlightjs/cdn-assets, minified files included. We can pin it in package.json and copy the files verbatim. I think that'll help resolve AMO's requirement for an unmodified official artifact with clear provenance...

    2. Also I'm wondering if pako can go away entirely. Native DecompressionStream('deflate-raw') can probably handle HTTP-Redirect binding's raw DEFLATE inflation... that's all it's used for, right?

    I'm on holiday at the moment but happy to look deeper at either of these...

  12. tvdijen commented on Jul 4, 2026

    @tvdijen
    Member
    1. hljs publishes its cdn-release builds to npm as @highlightjs/cdn-assets, minified files included. We can pin it in package.json and copy the files verbatim. I think that'll help resolve AMO's requirement for an unmodified official artifact with clear provenance...

    Yeah, no.. AMO says:

    "You should download third-party libraries from their official site, not from a CDN or other location." as per the link @khlr provided earlier today.

    Also I'm wondering if pako can go away entirely. Native DecompressionStream('deflate-raw') can probably handle HTTP-Redirect binding's raw DEFLATE inflation... that's all it's used for, right?

    That would be a very nice simplification of this library!

    Meanwhile I've created a PR (#110) that should make AMO a little bit more happy. I suggest @khlr tries to release v1.9.4 with this and we can further improve later.

  13. khlr commented on Jul 6, 2026

    @khlr
    ContributorAuthor

    I also believe that AMO wants clear dependencies from a package-tool, not some reference in a script or a workflow..

    I think at the end of the day there's a manual reviewer who just compares file checksums.

    While not to be confused with a CDN @highlightjs/cdn-assets is the official distribution for CDNs. Totally compliant to what AMO wants, I think:

    You should download third-party libraries from their official site, not from a CDN or other location.

    [...]

    Communicating third-party library links to the reviewer:

    You can add the links to the “Notes for Reviewers” section of your extension’s details on AMO.

    And I'd really like to pick up Kellen's suggestion to drop pako in favor of DecompressionStream!

    Meanwhile I've created a PR (#110) that should make AMO a little bit more happy.

    I think that's a good intermediate step. I'll take a closer look at it right away.

    --

    I think that with the points mentioned above, we could achieve the following:

    • Replace pako with DecompressionStream ➡️ external dependency removed
    • Get hljs via @highlightjs/cdn-assets ➡️ Probably totally fine for AMO

    This would also allow us to get rid of Composer right away after the intermediate step. In my opinion, Composer is a really heavy dev dependency that we (then) don’t actually need. What do you think?

  14. kellenmurphy commented on Jul 15, 2026

    @kellenmurphy
    Contributor

    @khlr did they reject 1.9.4? I still see 1.9.2 on the store...

  15. tvdijen commented on Jul 15, 2026

    @tvdijen
    Member

    I almost forgot about this, but I'm also curious :D

  16. khlr commented on Jul 15, 2026

    @khlr
    ContributorAuthor

    Just as of today they posted a follow-up question:

    Please provide us with clear instructions on how to reproduce the minification of ib/highlight.min.js

    I don't have my AMO creds at hand right now. Will respond tomorrow.

  17. tvdijen commented on Jul 15, 2026

    @tvdijen
    Member

    Oh come on! They don't read anything, do they?
    https://github.com/simplesamlphp/SAML-tracer/blob/main/.github/workflows/build-release.yml#L45

    This is getting ridiculous

  18. khlr commented on Jul 21, 2026

    @khlr
    ContributorAuthor

    Here we go again...

    What I responded last week:

    We create a custom build using node like described in the official docs:
    https://highlightjs.readthedocs.io/en/latest/building-testing.html#building

    node tools/build.js xml properties http

    https://github.com/simplesamlphp/SAML-tracer/blob/samltracer-1.9.4/.github/workflows/build-release.yml#L45

    Their response today:

    We've tried to follow the instructions and generate the custom build for highlight.js, but it failed with errors. Please refer to the attached information for details, which include the terminal output of the build process.

    mozilla@Mozillas-MacBook-Pro highlight.js-main % npm install
    npm warn deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
    npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
    npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
    npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
    npm warn deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
    
    added 420 packages, and audited 421 packages in 2s
    
    136 packages are looking for funding
      run `npm fund` for details
    
    17 vulnerabilities (1 low, 4 moderate, 10 high, 2 critical)
    
    To address issues that do not require attention, run:
      npm audit fix
    
    To address all issues (including breaking changes), run:
      npm audit fix --force
    
    Run `npm audit` for details.
    npm warn allow-scripts 1 package has install scripts not yet covered by allowScripts:
    npm warn allow-scripts   fsevents@2.3.2 (install: (install scripts present))
    npm warn allow-scripts
    npm warn allow-scripts Run `npm approve-scripts --allow-scripts-pending` to review, or `npm approve-scripts <pkg>` to allow.
    mozilla@Mozillas-MacBook-Pro highlight.js-main % node tools/build.js xml properties http
    Starting build.
    Finished build.
    Writing docs files.
    Writing demo files.
    Writing style files.
    Preparing languages.
    ...
    ┌────────────┬──────────�
    │ lang       │ minified │
    │ xml        │ 6990     │
    │ http       │ 2068     │
    │ properties │ 1590     │
    └────────────┴──────────┘
    fatal: not a git repository (or any of the parent directories): .git
    node:internal/errors:985
      const err = new Error(message);
                  ^
    
    Error: Command failed: git rev-parse --short=10 HEAD
    fatal: not a git repository (or any of the parent directories): .git
    
        at genericNodeError (node:internal/errors:985:15)
        at wrappedFn (node:internal/errors:539:14)
        at checkExecSyncError (node:child_process:925:11)
        at Object.execSync (node:child_process:997:15)
        at getDefaultHeader (/Users/mozilla/Documents/work/highlight.js-main/tools/build_browser.js:21:6)
        at buildHeader (/Users/mozilla/Documents/work/highlight.js-main/tools/build_browser.js:24:29)
        at buildCore (/Users/mozilla/Documents/work/highlight.js-main/tools/build_browser.js:203:18)
        at Object.buildBrowser [as build] (/Users/mozilla/Documents/work/highlight.js-main/tools/build_browser.js:76:22)
        at async doTarget (/Users/mozilla/Documents/work/highlight.js-main/tools/build.js:90:3) {
      status: 128,
      signal: null,
      output: [
        null,
        Buffer(0) [Uint8Array] [],
        Buffer(69) [Uint8Array] [
          102,  97, 116,  97, 108,  58,  32, 110, 111, 116,  32,
           97,  32, 103, 105, 116,  32, 114, 101, 112, 111, 115,
          105, 116, 111, 114, 121,  32,  40, 111, 114,  32,  97,
          110, 121,  32, 111, 102,  32, 116, 104, 101,  32, 112,
           97, 114, 101, 110, 116,  32, 100, 105, 114, 101,  99,
          116, 111, 114, 105, 101, 115,  41,  58,  32,  46, 103,
          105, 116,  10
        ]
      ],
      pid: 11098,
      stdout: Buffer(0) [Uint8Array] [],
      stderr: Buffer(69) [Uint8Array] [
        102,  97, 116,  97, 108,  58,  32, 110, 111, 116,  32,
         97,  32, 103, 105, 116,  32, 114, 101, 112, 111, 115,
        105, 116, 111, 114, 121,  32,  40, 111, 114,  32,  97,
        110, 121,  32, 111, 102,  32, 116, 104, 101,  32, 112,
         97, 114, 101, 110, 116,  32, 100, 105, 114, 101,  99,
        116, 111, 114, 105, 101, 115,  41,  58,  32,  46, 103,
        105, 116,  10
      ]
    }
    
    Node.js v24.18.0
    
  19. kellenmurphy commented on Jul 21, 2026

    @kellenmurphy
    Contributor

    Their build died at git rev-parse --short=10 HEAD, and the prompt says highlight.js-main — they grabbed the main-branch source zip instead of cloning a tag, and hljs embeds the commit hash in the banner, so that can never work. But corrected instructions won't help either: package.json pins "highlight.js": "github:highlightjs/highlight.js" with no ref, build-release.yml re-resolves it with npm install --package-lock-only, npm audit fix runs right before the build, and package-lock.json is export-ignored out of the zip. There's no fixed version anywhere for them to check against, which is exactly the finding they opened with.

    So I'd drop the custom build — there's no official artifact to checksum, so they're forced to reproduce a build, and that's where this keeps failing. @khlr is right about @highlightjs/cdn-assets, and it isn't a CDN rehost, it's the maintainers' own npm package with a registry integrity hash. I pulled the tarball: es/core.min.js plus xml, http and properties is ~24 KB, near identical to our custom build, but banner-stamped v11.11.1 (git: 08cb242e7d) so they can diff it instead of building it. Only wrinkle is cdn-assets is still at 11.11.1, one patch behind us. I should be able to get the pako PR up later this week, and can open a separate one for the hljs and workflow changes if you agree on the cdn-assets reading.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions