-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Chromium - Stuck Execution on context.waitForEvent('serviceworker') with extension testing #33682
Comments
@darshandp007 Could you please share a minimal reproducible that includes a sample extension and your test code? That would help to get this issue resolved. Without a repro, it's much less likely we'll be able to figure out the problem. |
@dgozman - This bug affects me as well. Here's a minimal reproduction, see testing instructions in readme: https://github.com/mdmower/pw-sw-wait . The issue started with v1.49.0. It is not a problem in v1.48.2. |
Follow-up: It looks like this issue is resolved by opting into the new headless. Is this the same as the old When I make the following updates to sample repo https://github.com/mdmower/pw-sw-wait (and my own personal projects), the test suite works again: diff --git a/playwright.config.js b/playwright.config.js
index ee32b05..1a23506 100644
--- a/playwright.config.js
+++ b/playwright.config.js
@@ -10,7 +10,7 @@ export default defineConfig({
projects: [
{
name: "chromium",
- use: { ...devices["Desktop Chrome"] },
+ use: { ...devices["Desktop Chrome"], channel: "chromium" },
},
],
});
diff --git a/pw-fixtures.js b/pw-fixtures.js
index b685ad7..7fd6c25 100644
--- a/pw-fixtures.js
+++ b/pw-fixtures.js
@@ -6,7 +6,6 @@ export const test = base.extend({
const pathToExtension = fileURLToPath(import.meta.resolve("."));
const context = await chromium.launchPersistentContext("", {
args: [
- "--headless=new",
`--disable-extensions-except=${pathToExtension}`,
`--load-extension=${pathToExtension}`,
],
|
@mdmower Yes, you are right, the new |
Version
1.49.0
Description
I encountered an issue while testing a Manifest v3 extension using Playwright. The execution gets stuck at the following line and does not proceed:
await context.waitForEvent('serviceworker');
Steps to reproduce:
Observations:
Expected behavior
The code should wait for the
serviceworker
event and proceed as expected.Actual behavior
Execution is stuck indefinitely, and the
serviceworker
event is not detected.Additional context
Environment
The text was updated successfully, but these errors were encountered: