Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with latest Puppeteer versions #78

Closed
smashah opened this issue Jun 22, 2022 · 10 comments
Closed

Not working with latest Puppeteer versions #78

smashah opened this issue Jun 22, 2022 · 10 comments

Comments

@smashah
Copy link
Contributor

smashah commented Jun 22, 2022

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')

open-wa/wa-automate-nodejs#2755

@smashah
Copy link
Contributor Author

smashah commented Jun 24, 2022

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 added a commit to smashah/puppeteer-page-proxy that referenced this issue Jun 24, 2022
@smashah
Copy link
Contributor Author

smashah commented Jun 24, 2022

I have submitted PR #79

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

Thanks

@xucongyong
Copy link

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
Copy link

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
Copy link

nickmurr commented Jul 16, 2022

Having the same issue. Any way to fix it?

{
   "puppeteer": "^15.4.0",
   "puppeteer-page-proxy": "^1.2.8"
}

@MoKhajavi75
Copy link

Any updates?
cc @Cuadrix

@Himly1
Copy link

Himly1 commented Sep 3, 2022

Same issue here any updates ?

"dependencies": {
    "puppeteer": "^16.1.0",
    "puppeteer-page-proxy": "^1.2.8",
  }

@smashah
Copy link
Contributor Author

smashah commented Sep 3, 2022

@Himly1
#79 (comment)

@Himly1
Copy link

Himly1 commented Sep 4, 2022

@smashah
Thanks!

Cuadrix added a commit that referenced this issue Oct 8, 2022
Update cookies.js for use in latest versions of pptr #78
@jan
Copy link

jan commented Oct 9, 2022

Current master works for me with latest merge.

@Cuadrix Cuadrix closed this as completed Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants