Cuadrix / puppeteer-page-proxy

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

TypeError: proxy.startsWith is not a function #65

Closed samiljimari closed 1 year ago

samiljimari commented 3 years ago

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

StasToken commented 2 years ago

@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