The "data_collection_permissions" property is reserved

I submit the addon with using this new consent screen feature, then throw me an error

The “data_collection_permissions” property is reserved.

Error: The “data_collection_permissions” property is reserved for future usage and cannot be used in an extension at the moment.

Originally I thought this is the feature of Firefox Nightly, but then I saw the blog that has the banner showing Firefox built-in consent for data collection and transmission is supported in Firefox for desktop 140 and later, and Firefox for Android 142 and above.

So I decided to use this new feature with my current version (141.0.3) and got the error

Blog’s link: https://extensionworkshop.com/documentation/develop/firefox-builtin-data-consent/

And I found a issue when grant the user permission, I have a permission technicalAndInteraction in optional array and I make the granting process in popup page, when user clicks the grant button, the permission prompt show behind the popup, If user close the popup and grant or deny the permission, the popup can’t receive the event because the script is stop executing due to close of the popup thus I can’t save the user preference into the localStorage, no idea is this a unwanted behavior or not

Now I can’t submit the addon to review, please help

Regarding the issue with requesting permissions from the popup window, sadly that’s a known bug:

The workaround I use is to automatically close the popup when the permissions request is made and then react to browser.permissions.onAdded / browser.permissions.onRemoved in the background script.

Thanks, this is a good way to solve this. unbelievably this issue has lasted for 3 years.

You should now be able to upload extensions that use Firefox’s built in data collection support.

Which version of the Firefox? I still get the error, I am using 141.0.3

Ahh shoot, I should have manually double-checked before I posted that. You are correct, uploading extensions that contain data_collection_permissions declarations in the manifest has been enabled on AMO yet.

Once it is, you should be able to submit add-ons that use the built-in data collection consent experience from any browser, using the web-ext CLI client, or directly via AMO’s web APIs. This feature will require Firefox 140+, so you may also want to set strict_min_version to 140.0.

It still saying the property is reserved, I’ve set the strict_min_version to “140.0“

{

  "manifest_version": 3,

  "name": "__MSG_extensionName__",

  "version": "1.0.70",

  "description": "__MSG_extensionDescription__",

  "default_locale": "en",

  "permissions": [

    "cookies",

    "activeTab",

    "storage",

    "webRequest",

    "declarativeNetRequest",

    "tabs",

    "notifications"

  ],

  "host_permissions": [

    "https://*/*",

    "http://*/*"

  ],

  "options_ui": {

    "page": "html/options/index.html",

    "open_in_tab": true

  },

  "background": {

    "page": "html/background.html"

  },

  "content_scripts": [

    {

      "js": [

        "js/content/content-bundle.js"

      ],

      "matches": [

        "<all_urls>"

      ],

      "run_at": "document_start",

      "all_frames": false

    },

    {

      "js": [

        "lib/dom-inspector.js"

      ],

      "run_at": "document_end",

      "matches": [

        "<all_urls>"

      ],

      "all_frames": false

    },

    {

      "js": [

        "lib/lottie-web.js"

      ],

      "run_at": "document_start",

      "matches": [

        "<all_urls>"

      ],

      "all_frames": false

    }

  ],

  "web_accessible_resources": [

    {

      "resources": [

        "js/contentInjection/*",

        "lib/*",

        "html/*",

        "css/*",

        "svg/*",

        "animations/*",

        "supported-language.json",

        "_locales/*",

        "icons/*",

        "dev_files/*",

        "local_asset/*"

      ],

      "matches": [

        "<all_urls>"

      ]

    },

    {

      "resources": [

        "message_tunnel/tunnel.html",

        "message_tunnel/tunnel.js"

      ],

      "matches": [

        "<all_urls>"

      ]

    }

  ],

  "action": {

    "default_title": "__MSG_extensionName__",

    "default_popup": "html/popup/popup.html",

    "default_icon": {

      "16": "icons/icon-16.png",

      "32": "icons/icon-32.png",

      "192": "icons/icon-192.png"

    }

  },

  "icons": {

    "16": "icons/icon-16.png",

    "32": "icons/icon-32.png",

    "192": "icons/icon-192.png"

  },

  "content_security_policy": {

    "extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self';"

  },

  "browser_specific_settings": {

    "gecko": {

      "id": "extension@getvid.site",

      "strict_min_version": "140.0",

      "data_collection_permissions": {

        "required": [

          "authenticationInfo",

          "browsingActivity"

        ],

        "optional": [

          "technicalAndInteraction"

        ]

      }

    }

  }

}