TypeError: Cannot read property 'get' of undefined
Hodor228 opened this issue · comments
(node:2804) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'get' of undefined
Why i get this error? This is your example and it not work
const puppeteer = require('puppeteer');
const useProxy = require('puppeteer-page-proxy');
(async () => {
const site = 'https://2ip.com';
const proxy = 'socks5://hidden:hidden@hidden:8000';
//const proxy2 = 'https://host:port';
const browser = await puppeteer.launch({headless: false});
const page = await browser.newPage();
await useProxy(page, proxy);
await page.goto(site);
})();
upgrade puppeteer to the latest version
@Hodor228 I got the same bug.
├─┬ @types/puppeteer@2.1.5
├─┬ puppeteer@2.1.1
├─┬ puppeteer-extra@3.1.15
│ ├── @types/puppeteer@2.1.5 deduped
├─┬ puppeteer-extra-plugin-stealth@2.6.2
│ └─┬ puppeteer-extra-plugin@3.1.7
├─┬ puppeteer-page-proxy@1.2.8
same error here with both mac and PC.
@mrWiga
This solved problem for me:
npm uninstall puppeteer-core
npm uninstall puppeteer-extra
npm uninstall puppeteer
npm uninstall puppeteer-page-proxy
npm install puppeteer
npm install puppeteer-page-proxy