Skip to content

Commit

Permalink
v1.0.17 release: pptr and pw bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nwebson committed Dec 10, 2024
1 parent 88e5618 commit f3123e2
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 690 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Important: `page.pause()` method doesn't work with the enabled fix, it needs mor

These patches work only for Chrome for now. If you really want to use it with WebKit or Firefox, please open a new issue.

✅ Latest fully tested version: 1.49.0 (released 2024-11-18)
✅ Latest fully tested version: 1.49.1 (released 2024-12-10)

## How to use `rebrowser-puppeteer` with `puppeteer-extra`?
Use `addExtra` method, here is the example:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rebrowser-patches",
"version": "1.0.16",
"version": "1.0.17",
"description": "Collection of patches for puppeteer and playwright to avoid automation detection and leaks. Helps to avoid Cloudflare and DataDome CAPTCHA pages. Easy to patch/unpatch, can be enabled/disabled on demand.",
"keywords": [
"automation",
Expand Down
11 changes: 11 additions & 0 deletions patches/playwright-core/lib.patch
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,14 @@
returnByValue: false,
isFunction
}, arg);
@@ -677,6 +690,10 @@
this.internal = name.startsWith('__pw');
}
static async dispatch(page, payload, context) {
+ if (process.env['REBROWSER_PATCHES_RUNTIME_FIX_MODE'] !== '0' && !payload.includes('{')) {
+ // ignore as it's not a JSON but a string from addBinding method
+ return;
+ }
const {
name,
seq,
11 changes: 11 additions & 0 deletions patches/playwright-core/src.patch
Original file line number Diff line number Diff line change
Expand Up @@ -321,3 +321,14 @@
}
}

@@ -872,6 +887,10 @@
}

static async dispatch(page: Page, payload: string, context: dom.FrameExecutionContext) {
+ if (process.env['REBROWSER_PATCHES_RUNTIME_FIX_MODE'] !== '0' && !payload.includes('{')) {
+ // ignore as it's not a JSON but a string from addBinding method
+ return
+ }
const { name, seq, serializedArgs } = JSON.parse(payload) as BindingPayload;
try {
assert(context.world);
Loading

0 comments on commit f3123e2

Please sign in to comment.