Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version. #77

Open
NabiKAZ opened this issue Apr 24, 2022 · 4 comments
Labels
invalid This doesn't seem right

Comments

@NabiKAZ
Copy link

NabiKAZ commented Apr 24, 2022

I use tor proxy.
I don't have problem with use args: ['--proxy-server=socks5://127.0.0.1:9150',... with either http and https.
I don't have problem with useProxy and http
I just have problem with useProxy and https

Versions:

node v17.2.0
Chromium Version 101.0.4950.0 (Developer Build) (64-bit)
+-- [email protected]
+-- [email protected]

Sample code:

import puppeteer from 'puppeteer';
import useProxy from 'puppeteer-page-proxy';

let options = {
	headless: false,
	devtools: true,
};
const browser = await puppeteer.launch(options);
const page = await browser.newPage();

await useProxy(page, 'socks5://127.0.0.1:9150');
await page.goto('https://api.ipify.org/');
var result = await page.content();
console.log(result);

Errors:

C:\>node test_proxy.mjs
(node:15152) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version.
(Use `node --trace-deprecation ...` to show where the warning was created)
C:\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:156
                    ? new Error(`${response.errorText} at ${url}`)
                      ^

Error: net::ERR_FAILED at https://api.ipify.org/
    at navigate (C:\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:156:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async FrameManager.navigateFrame (C:\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:131:21)
    at async Frame.goto (C:\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:512:16)
    at async Page.goto (C:\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1167:16)
    at async file:///C:/test_proxy.mjs:38:2

Node.js v17.2.0

C:\>node --trace-deprecation test_proxy.mjs
(node:5776) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an IP address is not permitted by RFC 6066. This will be ignored in a future version.
    at Object.connect (node:_tls_wrap:1669:15)
    at SocksProxyAgent.<anonymous> (C:\node_modules\puppeteer-page-proxy\node_modules\socks-proxy-agent\dist\agent.js:162:38)
    at Generator.next (<anonymous>)
    at fulfilled (C:\node_modules\puppeteer-page-proxy\node_modules\socks-proxy-agent\dist\agent.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
C:\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:156
                    ? new Error(`${response.errorText} at ${url}`)
                      ^

Error: net::ERR_FAILED at https://api.ipify.org/
    at navigate (C:\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:156:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async FrameManager.navigateFrame (C:\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:131:21)
    at async Frame.goto (C:\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:512:16)
    at async Page.goto (C:\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1167:16)
    at async file:///C:/test_proxy.mjs:38:2

Node.js v17.2.0
@NabiKAZ
Copy link
Author

NabiKAZ commented Apr 24, 2022

@NabiKAZ
Copy link
Author

NabiKAZ commented Apr 24, 2022

When I used await useProxy(page, 'socks5://localhost:9150'); get another error:

C:\>node test_proxy.mjs
C:\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:156
                    ? new Error(`${response.errorText} at ${url}`)
                      ^

Error: net::ERR_FAILED at https://api.ipify.org/
    at navigate (C:\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:156:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async FrameManager.navigateFrame (C:\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:131:21)
    at async Frame.goto (C:\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:512:16)
    at async Page.goto (C:\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1167:16)
    at async Timeout._onTimeout (file:///C:/test_proxy.mjs:47:3)

Node.js v17.2.0

@artemmolotov
Copy link
Contributor

artemmolotov commented Jul 28, 2022

@artemmolotov
Copy link
Contributor

artemmolotov commented Jul 28, 2022

We can use resolutions or overrides for yarn and npm as a temporary solution.

package.json:

  "overrides": {
    "socks-proxy-agent": "6.0.0"
  },
  "resolutions": {
    "socks-proxy-agent": "6.0.0"
  }

And run yarn install or npm install.

@Cuadrix Cuadrix added the invalid This doesn't seem right label Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants