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

Headless mode not working #39

Open
simoconfa opened this issue Aug 30, 2020 · 2 comments
Open

Headless mode not working #39

simoconfa opened this issue Aug 30, 2020 · 2 comments

Comments

@simoconfa
Copy link

simoconfa commented Aug 30, 2020

As title said, the script does not work on Windows when headless: true
Switching it to: headless: false makes it work.

In particular the script stuck at networkidle2:
await page.goto('https://web.microsoftstream.com/', { waitUntil: 'networkidle2' });
After 30s I got timeout exception.
I tried changing it into:
await page.goto('https://web.microsoftstream.com/', { waitUntil: 'domcontentloaded' });
but the script goes on a bit and then it stuck after on this line:
await page.waitForSelector('input[id="login"]'
with another timeout exception.

It seems that the browser have a different behavior when is in headless mode:
puppeteer/puppeteer#665 (comment)
The comment above suggest to change user agent when you are in headless mode.
Maybe an additional window appears, or Polimi prevents bots from login (???)

@alessionossa
Copy link

I'm experiencing the same issue with a script that worked well for months. I think it’s caused by some changes in Chromium

@kuro7766
Copy link

same problem with chromium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants