Skip to content

feat: Add warning for missing Firefox extension ID in manifest#2293

Open
Sbrjt wants to merge 4 commits intowxt-dev:mainfrom
Sbrjt:main
Open

feat: Add warning for missing Firefox extension ID in manifest#2293
Sbrjt wants to merge 4 commits intowxt-dev:mainfrom
Sbrjt:main

Conversation

@Sbrjt
Copy link
Copy Markdown

@Sbrjt Sbrjt commented Apr 23, 2026

Overview

This PR adds a warning when the Firefox extension ID is missing from the manifest to help prevent invalid builds.

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_specific_settings#description

Manual Testing

Not sure

Related Issue

None

@Sbrjt Sbrjt requested a review from aklinker1 as a code owner April 23, 2026 19:05
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 23, 2026

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit fcdf819
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/69f0d62baad95f0008e49bcd
😎 Deploy Preview https://deploy-preview-2293--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the pkg/wxt Includes changes to the `packages/wxt` directory label Apr 23, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 24, 2026

Open in StackBlitz

@wxt-dev/analytics

npm i https://pkg.pr.new/@wxt-dev/analytics@2293

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@2293

@wxt-dev/browser

npm i https://pkg.pr.new/@wxt-dev/browser@2293

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@2293

@wxt-dev/is-background

npm i https://pkg.pr.new/@wxt-dev/is-background@2293

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@2293

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@2293

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@2293

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@2293

@wxt-dev/runner

npm i https://pkg.pr.new/@wxt-dev/runner@2293

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@2293

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@2293

@wxt-dev/webextension-polyfill

npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@2293

wxt

npm i https://pkg.pr.new/wxt@2293

commit: 1fddf85

Comment thread packages/wxt/src/core/utils/manifest.ts Outdated
@PatrykKuniczak PatrykKuniczak changed the title Add warning for missing Firefox extension ID in manifest feat: Add warning for missing Firefox extension ID in manifest Apr 24, 2026
@Sbrjt
Copy link
Copy Markdown
Author

Sbrjt commented Apr 25, 2026

Do you think we can add some default like pkg.author.email or ${pkg.name}@${pkg.author.name}?

@smashedr
Copy link
Copy Markdown
Contributor

Do you think we can add some default like pkg.author.email or ${pkg.name}@${pkg.author.name}?

This would be terrible, as it would clobber extension settings without the user knowing it.
This is how firefox determines what to link internal data to like the storage area.

Additionally, this field is not required for development, only for installing/signing/publishing.

It is also publicity visible and permanent once published. It can never be changed without deleting the extension and publishing an new one.

I would prefer publishing to fail if I have not set my permanent, public, extension ID yet, so that I can set a proper ID; vs having a random one published.

You can easily define browser specific settings in the config

...(isFirefox
  ? {
      browser_specific_settings: {
        gecko: {
          id: 'auto-auth@cssnr.com',
          strict_min_version: '128.0', // webRequest.onAuthRequired asyncBlocking
          data_collection_permissions: { required: ['none'] },
        },
        gecko_android: { strict_min_version: '128.0' }, // webRequest.onAuthRequired asyncBlocking
      },
    }
  : { minimum_chrome_version: '127' }), // chrome.action.openPopup

But I support a warning.

@PatrykKuniczak
Copy link
Copy Markdown
Collaborator

@smashedr Good catch, in that case we shouldn't add any default data.

Let's leave only warn

Copy link
Copy Markdown
Member

@aklinker1 aklinker1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but can we add a option to suppress this warning? For any MV2 extensions that don't care about it.

Similar to this PR: #1976

Comment thread packages/wxt/src/core/utils/manifest.ts Outdated
Copy link
Copy Markdown
Collaborator

@PatrykKuniczak PatrykKuniczak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Labels

pkg/wxt Includes changes to the `packages/wxt` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants