You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[rebrowser-playwright] Use directly rebrowser-playwright-core #74
In my project, I have playwright and rebrowser-playwright as dependencies. I have both dependencies, because I use one or the other as needed. But when both have the same version number: rebrowser-playwright doesn't work.
rebrowser-playwright has playwright-core dependency which is replaced by npm:rebrowser-playwright-core@~1.49.1. Due to a bug in npm, the playwright-core dependency overrides rebrowser-playwright-core.
{type: 'mainWorldExecution',rating: 1,note: `You've called <code>document.getElementsByClassName()</code> in the main world. Use <a href="https://github.com/rebrowser/rebrowser-patches" target="_blank">rebrowser-patches</a> to run your scripts in an isolated world.`,debug: {args: ['div']},msSinceLoad: 29.3}
To get around this bug, rebrowser-playwright would have to use rebrowser-playwright-core directly as a dependency (and change the imports).
Confirmed, and it was a silent failure. With playwright and rebrowser-playwright at the same version, npm gives the drop-in the unpatched playwright-core without any error, and the same happens with puppeteer + rebrowser-puppeteer. #132 makes the drop-ins depend on rebrowser-playwright-core / rebrowser-puppeteer-core under their real names. CI now installs each drop-in next to its upstream package and checks that it loads the patched code. Ships in the next release.
Released in v1.1.1: rebrowser-puppeteer-core / rebrowser-puppeteer25.14.100, rebrowser-playwright-core / rebrowser-playwright1.64.100, and rebrowser-playwright1.64.100 on PyPI. (npm doesn't allow re-publishing 25.14.0 / 1.64.1, so this fix release uses .100.) rebrowser-puppeteer and rebrowser-playwright now depend on rebrowser-*-core under their real names, so they stay patched next to puppeteer / playwright. Closing.
Activity
nwebson commentedon Dec 23, 2024
Very nice catch, thanks for reporting this.
rebrowsernet commentedon Oct 18, 2026
Confirmed, and it was a silent failure. With
playwrightandrebrowser-playwrightat the same version, npm gives the drop-in the unpatchedplaywright-corewithout any error, and the same happens withpuppeteer+rebrowser-puppeteer. #132 makes the drop-ins depend onrebrowser-playwright-core/rebrowser-puppeteer-coreunder their real names. CI now installs each drop-in next to its upstream package and checks that it loads the patched code. Ships in the next release.rebrowsernet commentedon Oct 18, 2026
Released in v1.1.1:
rebrowser-puppeteer-core/rebrowser-puppeteer25.14.100,rebrowser-playwright-core/rebrowser-playwright1.64.100, andrebrowser-playwright1.64.100 on PyPI. (npm doesn't allow re-publishing 25.14.0 / 1.64.1, so this fix release uses.100.)rebrowser-puppeteerandrebrowser-playwrightnow depend onrebrowser-*-coreunder their real names, so they stay patched next topuppeteer/playwright. Closing.