Cuadrix / puppeteer-page-proxy

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

TypeError: Cannot read property 'get' of undefined #34

Closed namename-123 closed 4 years ago

namename-123 commented 4 years ago

Hello, I'm trying to run this very basic piece of code but I'm always getting the error above TypeError: Cannot read property 'get' of undefined, at the useProxy line. What's the problem here??? (async () => { const browser = await puppeteer.launch({headless: false}); var page = await browser.newPage(); const proxy = 'http://user:pass@host:port' await useProxy(page, proxy) await page.goto('http://api.myip.com'); await browser.close(); })();

Cuadrix commented 4 years ago

This package used a method that was removed in v4.0.0 Update Puppeteer to the latest version.

smashah commented 4 years ago

@Cuadrix how would updating to the latest version of puppeteer fix this issue if the functionality was removed in v4.0.0?

Cuadrix commented 4 years ago

@smashah Because now the package uses a different method which is not available in pre v4.0.0's exposed methods.