Puppeteer hangs on content() call when using stealth plugin + socks proxy
See original GitHub issueHi,
I’m using puppeteer stealth plugin.
puppeteer.use(require('puppeteer-extra-plugin-stealth')());
My pupeeter calls are using socks proxy while starting chrome browser using following argument.
--proxy-server=socks5://IP:PORT
After doing visit to cloudflare protected page the script using stealth plugin is hanging on page.content() call:
let response = await page.goto(this.task.url, {waitUntil: 'domcontentloaded', timeout: 45000});
this.logger.info("VISIT 2");
let content = await page.content(); //HANGS HERE. When disabling stealth plugin, it works just fine.
this.logger.info("VISIT 3"); //will not be printed
Whenever i disable stealth-plugin, everything is working just fine and no longer hangs on content() call.
If i start the script with visible chrome window, everything is working fine too.
Problem is when we’re using headless mode, visiting cloudflare protected website (not sure if important) and using a proxy. Disabling stealth plugin resolves all issue or disabling proxy.
What might be the cause?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to catch a tab drop in puppeteer-extra and refresh the ...
I have a small application on puppeteer-extra, it works through a proxy server, sometimes the proxy server crashes and I get this error...
Read more >Release Notes - Multilogin
What's new in 5.17.3 Unity Stable · Check proxy and edit browser profile from the sidebar without leaving the profile list view ·...
Read more >Puppeteer-extra NPM - npm.io
A light-weight wrapper around puppeteer and friends to enable cool plugins through a clean interface. Installation. yarn add puppeteer puppeteer-extra # - or...
Read more >proxy server free download - SourceForge
View, compare, and download proxy server at SourceForge. ... When some request arrives, it uses puppeteer with the stealth plugin to create a...
Read more >The Tidelift catalog of open source packages
ECMAScript 5 compatibility shims for legacy JavaScript engines ... Keep same and cross domain iFrames sized to their content with support for window/content...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I will add more info when i will be at the machine. Yes, the proxy is relevant.
Works (headless mode):
Does not work (headless mode):
Unfortunately the debug output doesn’t mention anything interesting 😕
Without the full code incl. socks proxy I won’t be able to help here. If you’re able to make a small self-containted script showing the issue and provide socks proxy credentials as well you can send me those in a PM in our chat.