Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Why does google_social.js not work when I set it headless to false? #36

Open
Pager07 opened this issue Jan 9, 2020 · 4 comments
Open

Comments

@Pager07
Copy link

Pager07 commented Jan 9, 2020

Time exceed out in while waiting for the password :
await page.waitForSelector('input[type="password"]', { visible: true })
And thus it returns me
(node:9950) UnhandledPromiseRejectionWarning: Error: waiting failed: timeout 30000ms exceeded

Any idea how to fix this?

@Pager07
Copy link
Author

Pager07 commented Jan 9, 2020

I found the solution. Adding

await page.setExtraHTTPHeaders({ 'Accept-Language': 'en-GB,en-US;q=0.9,en;q=0.8' });
await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36')
and setting headless to true works

@tnolet
Copy link
Member

tnolet commented Jan 9, 2020

@Pager07 would be awesome if you could create a PR for this.

@lirantal
Copy link

lirantal commented Jan 9, 2020

Is this possibly related? it fixed something for us with cypress-social-logins related to the mobile/desktop versions of a Google login page: https://github.com/lirantal/cypress-social-logins/pull/16/files

@tnolet
Copy link
Member

tnolet commented Feb 5, 2020

@Pager07 can we expect a PR for this?

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

No branches or pull requests

3 participants