Skip to content

Default Firefox to MV3 #230

Closed as not planned
Closed as not planned

Description

@aklinker1

Feature Request

Before this can happen, the following changes are required:

Is your feature request related to a bug?

#226

Activity

  1. aklinker1 commented on Nov 11, 2023

    @aklinker1
    MemberAuthor

    Firefox MV3 dev mode (wxt -b firefox --mv3) does not work, see https://bugzilla.mozilla.org/show_bug.cgi?id=1864284 for more details. You have a two options:

    1. Use --mv2, the default, instead when developing against firefox wxt -b firefox --mv2
    2. Build for production, wxt build -b firefox --mv3, and load the extension manually into Firefox to test it
  2. changed the title [-]Update default manifest version for Firefox to 3[/-] [+]Update default manifest version for Firefox to v3[/+] on Nov 11, 2023
  3. changed the title [-]Update default manifest version for Firefox to v3[/-] [+]Default Firefox to MV3[/+] on Dec 14, 2023
  4. nnx0r commented on Jan 18, 2024

    @nnx0r
    Contributor

    I have released my extension on Firefox add-ons for Desktop and Android as MV3.
    Instantly regretted it.

    • Requires users to give extension access to all websites. It's not automatically allowed as in MV2.
    • Firefox Android really lacks MV3 compatibility
    Screenshot 2024-01-19 at 00 01 16

    Releasing soon MV2 for Firefox instead as it resolves both of the issues from above.

    Leaving this as a note. Firefox is not ready, maybe in a few years.

  5. aklinker1 commented on Jan 19, 2024

    @aklinker1
    MemberAuthor

    Yeah, I just released my rewrite as MV3 extension and the permissions are weird... Probably more secure, but less user friendly, for sure. I'm not supporting Android, so that's not a problem for me.

    I'm gonna close this issue for now so I don't have to keep looking at it.

  6. yunsii commented on Feb 20, 2024

    @yunsii
    Contributor

    But https://wxt.dev/guide/multiple-browsers.html and development console have no information about this 😂 I spend so many time to debug why firefox add-on with mv3 not work...

  7. aklinker1 commented on Feb 20, 2024

    @aklinker1
    MemberAuthor

    WXT should exit with an error message when you try and run wxt -b firefox --mv3

    Screenshot 2024-02-20 at 8 27 37 AM
  8. yunsii commented on Feb 21, 2024

    @yunsii
    Contributor

    WXT should exit with an error message when you try and run wxt -b firefox --mv3

    Screenshot 2024-02-20 at 8 27 37 AM

    Really? Why I do not encounter any error message?
    image

  9. aklinker1 commented on Feb 21, 2024

    @aklinker1
    MemberAuthor

    Huh 😖

  10. aklinker1 commented on Feb 21, 2024

    @aklinker1
    MemberAuthor

    @yunsii Can you add this log to your project? Inside node_modules/wxt/dist/cli.js, do a ctrl+F for "Dev mode does not support Firefox MV3" and add this log before the if statement:

    Screenshot 2024-02-21 at 7 10 00 AM
    console.log(wxt.config.browser, wxt.config.manifestVersion)

    Then re-run the command that's failing and let me know what is logged?

  11. yunsii commented on Feb 22, 2024

    @yunsii
    Contributor

    @aklinker1 It seems a bug with WSL?
    image

    export function createWslRunner(): ExtensionRunner {
    return {
    async openBrowser() {
    wxt.logger.warn(
    `Cannot open browser when using WSL. Load "${relative(
    process.cwd(),
    wxt.config.outDir,
    )}" as an unpacked extension manually`,
    );
    },
    async closeBrowser() {
    // noop
    },
    };
    }

    And why exit with an error message at beginning of dev command?

  12. aklinker1 commented on Feb 22, 2024

    @aklinker1
    MemberAuthor

    It seems a bug with WSL?

    @yunsii This is intentional. web-ext doesn't work well in WSL: mozilla/web-ext#2108 (comment)

  13. yunsii commented on Feb 22, 2024

    @yunsii
    Contributor

    @aklinker1 So how about exit with an error message at start of dev command?

  14. 12 remaining items

  15. aklinker1 commented on Feb 11, 2026

    @aklinker1
    MemberAuthor

    Nice, glad to hear! If someone wants to queue up a PR for this change (removing the if statement below), we can merge it once the fix is released to normal firefox.

    if (
    wxt.config.browser === 'firefox' &&
    wxt.config.manifestVersion === 3
    ) {
    throw Error(
    'Dev mode does not support Firefox MV3. For alternatives, see https://github.com/wxt-dev/wxt/issues/230#issuecomment-1806881653',
    );
    }

    edit: sorry, I think I'm still gonna mark this issue as not-planned, even though all the requirements to technically do this, Firefox MV3 is a bad UX for extension users. I'd like to keep WXT on MV2 for now. We can track adding MV3 dev mode support in #1626

  16. added
    good first issue
    and removed
    good first issue
    on Feb 11, 2026
  17. aciccarello commented on Feb 12, 2026

    @aciccarello
    Contributor

    @aklinker1 Could you clarify/point to what you mean by Firefox mv3 is bad UX? What should developers be looking out for?

  18. aklinker1 commented on Feb 12, 2026

    @aklinker1
    MemberAuthor

    Granting permissions on install. Specifically, granting content scripts access to the web page.

    Sometimes Firefox just forgets to ask whether or not it can load a content script on a page and you have to go to the extension settings to manually enable it for all host permissions.

    Normal users find that very unintuitive.

    This differs from manifest V2, because it asks for all permissions on install, including host permissions for content scripts to run.

  19. aciccarello commented on Feb 12, 2026

    @aciccarello
    Contributor

    Ah, I did have someone run into that problem recently. I didn't realize that was firefox issue that it didn't ask. I was going to look into explicitly checking permissions in the extension. Thanks for explaining.

  20. mengxi-ream commented on Feb 24, 2026

    @mengxi-ream
    Contributor

    seems firefox support allowing connecting to local dev servers. Will we gonna have better experience? https://bugzilla.mozilla.org/show_bug.cgi?id=1864284

  21. aklinker1 commented on Jul 26, 2026

    @aklinker1
    MemberAuthor

    I'm gonna close this, I don't think we'll switch the default in the foreseeable future. We can reopen if something changes in the future.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions