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

TypeError: proxy.startsWith is not a function

samiljimari opened this issue · comments

I get this error

C:\snapshot\orion dev\node_modules\puppeteer-page-proxy\src\lib\options.js:27
    if (proxy.startsWith("socks")) {
              ^

TypeError: proxy.startsWith is not a function
    at setAgent (C:\snapshot\orion dev\node_modules\puppeteer-page-proxy\src\lib\options.js:27:15)
    at requestHandler (C:\snapshot\orion dev\node_modules\puppeteer-page-proxy\src\core\proxy.js:19:16)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async $ppp_request_listener (C:\snapshot\orion dev\node_modules\puppeteer-page-proxy\src\core\proxy.js:82:9)

when trying to use a proxy on a chromium browser

@samiljimari Make sure that your line is coming correctly
socks4://111.111.111.111:222
Something like
await useProxy(page, 'socks4://111.111.111.111:222');
I had such a problem 5 minutes ago, instead of a promise line, I came to the function