question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Puppeteer hangs on content() call when using stealth plugin + socks proxy

See original GitHub issue

Hi,

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:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
juouycommented, Nov 24, 2020

I will add more info when i will be at the machine. Yes, the proxy is relevant.

Works (headless mode):

  • Plugin + no S5 proxy
  • No plugin + S5 proxy

Does not work (headless mode):

  • Plugin + S5 proxy
0reactions
berstendcommented, Nov 28, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found