leonardodino / playwright-extension-bug

reproduction for web extension issue in playwright non-persistent mode

Home Page:https://github.com/microsoft/playwright/issues/4441

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

playwright repro for #4441

this repo contains a simple test extension in /extension.

the extension displays a clock on top of webpages. it passes messages to and from the background page in order to trigger the issue.

The issue happens when the background page tries to communicate back with the open tab:

chrome.tabs.sendMessage(tabId, message, { frameId })

results in:

- "Could not establish connection. Receiving end does not exist."

The issue only affects chromium.launch, and not chromium.launchPersistentContext.

The issue is not present in a Chromium on Inconito, nor in a Google Chrome browser.

test

I added a minimal test, on test.js.

index.js will check the output of test.js against known values. running it will yield:

==== persistent ====
DOM insertion: true
clock updated: true
==== inconigto ====
DOM insertion: true
clock updated: false

=> 🐛 reproduced

exit codes

0 => reproduced
2 => fixed
1 => unknown (probably more bugs than before).

branches

there are 2 branches:

outside of this diff, the rest is equal. both of them reproduce the error equally.

I suppose they share the same implementation down the line. 🧐

license

MIT

About

reproduction for web extension issue in playwright non-persistent mode

https://github.com/microsoft/playwright/issues/4441

License:MIT License


Languages

Language:JavaScript 100.0%