Skip to content

44xtc44/BUG-Playwright-fail-WebWorker-Extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Playwright fails to run a WebWorker in a Chromium/FireFox "extension".

default_icon

Issue microsoft/playwright#38638

Context:

I can not test my project with Playwright. This guy is not finishing loading at all.

My current Browser extension/add-on "pre_worker_central_msg_log" branch of

Browser stuck on loading indexedDB via WebWorker to free the main thread for animations.
Animation is also not shown by the way. Seem the failure blocks all long running former executions.
An empty error object is shown in Dev Tools console.

Hint: Fixed issue WebWorker non-extensions microsoft/playwright#4487

Playwright Version: 1.57.0
Operating System: Linux
Node.js version: 24.12.0; ES modules used
Browser: Chromium
manifest.json Version: 3
System:
Linux: 6.8.0-58-generic
Memory: 32.00 GB

I have created a minimal example to reproduce the issue. You can find it here:

Steps to reproduce

(A) Extension App.

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.

"npm install" in the package root folder then.

(B) Extension manifest.json Version 3

Since Browser brands use different manifest syntax, copy from /tests/manifest/<brand>.

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.
"about:debugging" add temporary Add-on, locate -> bug report repo root folder manifest.json. Fire.
Browser instance works fine, WebWorker instance responds accordingly.

(C) Test "single" browser extension. manifest.json must be adapted. See (C)

import { chromium } from "playwright"; or import { chromium } from "playwright/test";
or also tested:
import { firefox } from "playwright"; or import { firefox } from "playwright/test";

run in terminial /tests/end2end/
> npx run-func chromium.js homePageOpen -y
Expected behavior
I would expect to see a web worker message.

Actual behavior
I can not see web worker message. Only an empty error object.

Additional context
none

Environment
Linux, Browser Tests

About

Bug report: Playwright fails to run a WebWorker in a Chromium/FireFox "extension".

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors