Skip to content

Commit f3123e2

Browse files
committed
v1.0.17 release: pptr and pw bugfixes
1 parent 88e5618 commit f3123e2

File tree

6 files changed

+46
-690
lines changed

6 files changed

+46
-690
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Important: `page.pause()` method doesn't work with the enabled fix, it needs mor
160160

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

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

165165
## How to use `rebrowser-puppeteer` with `puppeteer-extra`?
166166
Use `addExtra` method, here is the example:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rebrowser-patches",
3-
"version": "1.0.16",
3+
"version": "1.0.17",
44
"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.",
55
"keywords": [
66
"automation",

patches/playwright-core/lib.patch

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,3 +324,14 @@
324324
returnByValue: false,
325325
isFunction
326326
}, arg);
327+
@@ -677,6 +690,10 @@
328+
this.internal = name.startsWith('__pw');
329+
}
330+
static async dispatch(page, payload, context) {
331+
+ if (process.env['REBROWSER_PATCHES_RUNTIME_FIX_MODE'] !== '0' && !payload.includes('{')) {
332+
+ // ignore as it's not a JSON but a string from addBinding method
333+
+ return;
334+
+ }
335+
const {
336+
name,
337+
seq,

patches/playwright-core/src.patch

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,3 +321,14 @@
321321
}
322322
}
323323

324+
@@ -872,6 +887,10 @@
325+
}
326+
327+
static async dispatch(page: Page, payload: string, context: dom.FrameExecutionContext) {
328+
+ if (process.env['REBROWSER_PATCHES_RUNTIME_FIX_MODE'] !== '0' && !payload.includes('{')) {
329+
+ // ignore as it's not a JSON but a string from addBinding method
330+
+ return
331+
+ }
332+
const { name, seq, serializedArgs } = JSON.parse(payload) as BindingPayload;
333+
try {
334+
assert(context.world);

0 commit comments

Comments
 (0)