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
- Run
pnpm install
- Run
pnpm dev:firefox
- Load the extension into Firefox.
- Navigate to
https://www.google.com/.
- 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
Describe the bug
I used
injectScriptaccording 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
pnpm installpnpm dev:firefoxhttps://www.google.com/.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.18Used Package Manager
pnpm
Validations