Skip to content

injectScript never resolves in MV2 #2183

@nines75

Description

@nines75

Describe the bug

I used injectScript according to the documentation below. While it resolves correctly in MV3, it never resolves in MV2.

https://wxt.dev/guide/essentials/content-scripts.html#isolated-world-vs-main-world

Reproduction

reproduction.zip

Steps to reproduce

  1. Run pnpm install
  2. Run pnpm dev:firefox
  3. Load the extension into Firefox.
  4. Navigate to https://www.google.com/.
  5. Open the developer tools console and verify that Done! is not logged.

System Info

System:
    OS: Linux 6.6 Ubuntu 24.04.4 LTS 24.04.4 LTS (Noble Numbat)
    CPU: (24) x64 13th Gen Intel(R) Core(TM) i7-13700F
    Memory: 20.96 GB / 23.38 GB
    Container: Yes
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 24.14.0 - /home/nines/.volta/tools/image/node/24.14.0/bin/node
    npm: 11.11.0 - /home/nines/.volta/tools/image/npm/11.11.0/bin/npm
    pnpm: 10.30.3 - /home/nines/.volta/tools/image/pnpm/10.30.3/bin/pnpm
  npmPackages:
    wxt: ^0.20.18 => 0.20.18

Used Package Manager

pnpm

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending-triageSomeone (usually a maintainer) needs to look into this to see if it's a bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions