Cuadrix / puppeteer-page-proxy

Additional module to use with 'puppeteer' for setting proxies per page basis.
423 stars 99 forks source link

Not working with latest Puppeteer versions #78

Closed smashah closed 1 year ago

smashah commented 2 years ago

The request._client property is now private resulting in the following error:

return (await client.send("Network.getCookies", urls)).cookies;
TypeError: Cannot read properties of undefined (reading 'send')

https://github.com/open-wa/wa-automate-nodejs/issues/2755

smashah commented 2 years ago

Latest versions expose the private client via a method:

https://github.com/puppeteer/puppeteer/pull/8556/files

This should work for backwards compatibility:

return (await (typeof client === "function" ? client() : client).send("Network.getCookies", urls)).cookies;
smashah commented 2 years ago

I have submitted PR #79

Please review and release a new version as a lot of people are relying on this library.

Thanks

xucongyong commented 2 years ago

Latest versions expose the private client via a method:

https://github.com/puppeteer/puppeteer/pull/8556/files

This should work for backwards compatibility:

return (await (typeof client === "function" ? client() : client).send("Network.getCookies", urls)).cookies;

not working

xucongyong commented 2 years ago

I have submitted PR #79

Please review and release a new version as a lot of people are relying on this library.

Thanks

can run?

nickmurr commented 2 years ago

Having the same issue. Any way to fix it?

{
   "puppeteer": "^15.4.0",
   "puppeteer-page-proxy": "^1.2.8"
}
MoKhajavi75 commented 2 years ago

Any updates? cc @Cuadrix

Himly1 commented 2 years ago

Same issue here any updates ?

"dependencies": {
    "puppeteer": "^16.1.0",
    "puppeteer-page-proxy": "^1.2.8",
  }
smashah commented 2 years ago

@Himly1 https://github.com/Cuadrix/puppeteer-page-proxy/pull/79#issuecomment-1233477307

Himly1 commented 2 years ago

@smashah Thanks!

jan commented 1 year ago

Current master works for me with latest merge.