Version
1.57.0
Steps to reproduce
- clone repository https://github.com/44xtc44/BUG-Playwright-fail-WebWorker-Extension
- sudo su # remember your current user_name
npm install -g n # to be able to downgrade the node version
n 20 # to install the current max node.js version for playwright
su user_name # back to last user env
node -v # check version
- npm install # see at least no warnings for playwright
- Load the extension into Chromium to see it running properly. WebWorker sends a message.
- Extension App, what we do:
Have a web application extension/add-on with a few web workers that performs any actions.
Configure "postMessage", "onmessage", "onerror".
The WebWorker instance don't receive a message, only an empty error object.
- Extension manifest.json Version 3
Since Browser brands use different manifest syntax, copy from /tests/manifest/.
Play around with the config. Perhaps this helps.
- Test only one Browser brand with an extension!!! Needs the correct manifest.json file.
import { chromium } from "playwright"; or import { chromium } from "playwright/test";
or also tested:
import { firefox } from "playwright"; or import { firefox } from "playwright/test";
- run the function from test file in terminial /tests/end2end/
npx run-func chromium.js homePageOpen -y
- Please test the worker also with an imported module! If you got it working.
Expected behavior
I would expect to see a web worker message.
Actual behavior
I can not see a web worker message. Only an empty error object.
Additional context
Playwright FireFox (Nightly) test run shows the same error as Chromium.
To exclude the started Browser instance from failure start
firefox module via test module and keep the browser instance open.
Use the manifest from /tests/manifest/firefox.
"about:debugging" add temporary Add-on, locate -> bug report repo root folder manifest.json. Fire.
Browser instance works fine, WebWorker instance responds accordingly.
Environment
Playwright Version: 1.57.0
Operating System: Linux Mint 22.1, Cinnamon 64-bit
Node version: v20.19.6; only ES modules used
Browser: Chromium, FireFox
manifest.json Version: 3
System:
Linux: 6.8.0-58-generic
Memory: 32.00 GB
Version
1.57.0
Steps to reproduce
npm install -g n # to be able to downgrade the node version
n 20 # to install the current max node.js version for playwright
su user_name # back to last user env
node -v # check version
Have a web application extension/add-on with a few web workers that performs any actions.
Configure "postMessage", "onmessage", "onerror".
The WebWorker instance don't receive a message, only an empty error object.
Since Browser brands use different manifest syntax, copy from /tests/manifest/.
Play around with the config. Perhaps this helps.
import { chromium } from "playwright"; or import { chromium } from "playwright/test";
or also tested:
import { firefox } from "playwright"; or import { firefox } from "playwright/test";
Expected behavior
I would expect to see a web worker message.
Actual behavior
I can not see a web worker message. Only an empty error object.
Additional context
Playwright FireFox (Nightly) test run shows the same error as Chromium.
To exclude the started Browser instance from failure start
firefox module via test module and keep the browser instance open.
Use the manifest from /tests/manifest/firefox.
"about:debugging" add temporary Add-on, locate -> bug report repo root folder manifest.json. Fire.
Browser instance works fine, WebWorker instance responds accordingly.
Environment
Playwright Version: 1.57.0 Operating System: Linux Mint 22.1, Cinnamon 64-bit Node version: v20.19.6; only ES modules used Browser: Chromium, FireFox manifest.json Version: 3 System: Linux: 6.8.0-58-generic Memory: 32.00 GB