Cuadrix / puppeteer-page-proxy

Additional module to use with 'puppeteer' for setting proxies per page basis.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot read property 'get' of undefined

radonirinamaminiaina opened this issue · comments

Hello,

When I use this library, it generate the following error:

TypeError: Cannot read property 'get' of undefined
    at removeRequestListener (D:\wamp\www\project\scrapper\node_modules\puppeteer-page-proxy\src\core\proxy.js:48:38)
    at proxyPerPage (D:\wamp\www\project\scrapper\node_modules\puppeteer-page-proxy\src\core\proxy.js:80:5)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async useProxy (D:\wamp\www\project\scrapper\node_modules\puppeteer-page-proxy\src\core\proxy.js:94:9)
    at async navigateTo (file:///D:/wamp/www/project/scrapper/lib/smartScrapping/smartScrappingNavigateTo/smartScrappingNavigateTo.mjs:55:11)

I want to use it per page:

const page = await browser.newPage()
await useProxy(page, proxyServer)

I check the core and I see page.eventsMap returns undefined

Node Version: 14.x
OS: windows 10

Note that I'm using puppeteer-extra

Facing the same issue, did you find any solution/alternative?

I have same problem with useProxy(page, proxy).
Note : I am using puppetter-core
Node v12.16.2
OS : MacOs

commented

Try to update your puppeteer version. I had the same issue, after updating to 5.2.1 it works fine for me.

puppeteer 5.2.1 has some bug, it does not work well in aws

puppeteer 5.2.1 has some bug, it does not work well in aws

Thanks ! it's solved my problem this.