puppeteer-sharp icon indicating copy to clipboard operation
puppeteer-sharp copied to clipboard

Redirection from Cloudflare Waiting Room is blocked

Open starkdm opened this issue 1 year ago • 2 comments

The site I'm trying to explore with Puppeteer is protected by a Cloudflare page that analyzes the browser. It appears that there is some problem when using GoToAsync - the Cloudflare waiting room is endlessly updating, but does not block access. As soon as I close the application (= close the CDP session), the redirection is immediately completed successfully. If I open the tab manually and type in the URL, the check is also successful. Either Cloudflare somehow understands that the browser is automated, or there is a problem in Puppeteer. How can we understand this?

In addition, if you create a new tab and load the page, then continue execution from the line IPage page = await PuppeteerHeadful.NewPageAsync();, the check will be successful.

await new BrowserFetcher().DownloadAsync();
PuppeteerHeadful = await Puppeteer.LaunchAsync(new LaunchOptions {
    Headless = false,
    Devtools = false,
    Browser = SupportedBrowser.Chrome,
    DefaultViewport = null,
    Args = new[] {
        "--disable-blink-features=AutomationControlled"
    }
});

IPage page = await PuppeteerHeadful.NewPageAsync();
await page.GoToAsync(url);

URL for example: https://www.vindecoderz.com/EN/check-lookup/WVWMP7AN2BE710202 .NET version: 6.0 PuppeteerSharp version: 14.0.0

starkdm avatar Feb 04 '24 20:02 starkdm

There are some conversations upstream about that.

kblok avatar Feb 05 '24 13:02 kblok

@kblok Found this discussion earlier. I think I have a different problem because I don't see any warnings from Cloudflare.

starkdm avatar Feb 05 '24 14:02 starkdm