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

[Bug] stealth Plugin detected on Google Login page #588

Open
rustynail1984 opened this issue Nov 6, 2021 · 21 comments
Open

[Bug] stealth Plugin detected on Google Login page #588

rustynail1984 opened this issue Nov 6, 2021 · 21 comments
Labels
issue: bug report A bug has been reported needs triage

Comments

@rustynail1984
Copy link

Versions
"puppeteer": "^10.4.0",
"puppeteer-extra": "^3.2.3",
"puppeteer-extra-plugin-stealth": "^2.9.0"

Hello noticed today that automatic login in Google does not work anymore if puppeteer is operated in "headless": true.
in "headless": false it still works. But this is not an option for me on a Linux server without a GPU.
When the point comes with entering the password, I see this.

image

So i guess Google has detected the Headless Chrome browser and the Stealth plugin no longer works.

@rustynail1984 rustynail1984 added issue: bug report A bug has been reported needs triage labels Nov 6, 2021
@gianmd
Copy link

gianmd commented Nov 9, 2021

Having same problem, any solution?

@Chari69
Copy link

Chari69 commented Nov 10, 2021

Same here

@teewoeijer
Copy link

try add await this.page.setBypassCSP(true)

@rustynail1984
Copy link
Author

try add await this.page.setBypassCSP(true)

Thats working. Thanks :)

@kurohoan
Copy link

kurohoan commented Dec 2, 2021

It was very helpful.

@dima11221122
Copy link

It doesn't work anymore (

@yeucodonvn
Copy link

It doesn't work anymore (

yes.It doesn't work

@rustynail1984
Copy link
Author

It doesn't work anymore (

yes.It doesn't work

still works for me

@dima11221122
Copy link

What are the versions of puppeteer and stealth plugin do you use?

@rustynail1984
Copy link
Author

What are the versions of puppeteer and stealth plugin do you use?

see above

@AnjaneyuluBatta505
Copy link

It's still working. I used the below versions.

puppeteer-core@10.4.0
puppeteer-extra-plugin-stealth@2.10.1
puppeteer-extra@3.3.0
puppeteer@10.4.0

sample code

const puppeteer = require('puppeteer-extra');
// const chromium = require('@sparticuz/chrome-aws-lambda');
const chromium = require('chrome-aws-lambda');
const pluginStealth = require('puppeteer-extra-plugin-stealth')();
console.log(pluginStealth.availableEvasions); // => Set { 'user-agent', 'console.debug' }
puppeteer.use(pluginStealth);
pluginStealth.setMaxListeners = () => {};

const browser = await puppeteer.launch({
    args: chromium.args,
    defaultViewport: chromium.defaultViewport,
    dumpio: process.env.STAGE === 'dev',
    executablePath: await chromium.executablePath,
    headless: chromium.headless,
    ignoreHTTPSErrors: true,
});

const page = await browser.newPage();
await page.setBypassCSP(true)  

@signaldev1
Copy link

try add await this.page.setBypassCSP(true)

unfortunately today i get this error after a year !!

@tab1293
Copy link

tab1293 commented Jun 30, 2022

I also today have just started running in to "The browser or app may not be secure" error from Google when trying to log in to Google accounts via puppeteer.

@AnjaneyuluBatta505 are you still not running in to this error as of today?

@mdsr
Copy link

mdsr commented Jul 6, 2022

We started getting this issue from last weekend but it is worth noting that the block is specific to a few handful of Google accounts. Most of the logins go through as usual.

@LinkTree3
Copy link

I also started getting this today(could be earlier I haven't checked in a few weeks) on some accounts.

Is there any solution for this?
I need to manage a few google accounts and the puppeteer tools I wrote to handle this have been very helpful to me for the past few months.

Maybe I should use something else to not get detected by google and still be able to manage my accounts?

@berstend
Copy link
Owner

@LinkTree3 did you try this workaround? #668 (comment)

@LinkTree3
Copy link

LinkTree3 commented Jul 17, 2022

@LinkTree3 did you try this workaround? #668 (comment)

Unfortunately this solution did not work for me :(

I added this

const stealthPlugin = StealthPlugin();
stealthPlugin.enabledEvasions.delete('iframe.contentWindow');
stealthPlugin.enabledEvasions.delete('navigator.plugins');
puppeteer.use(StealthPlugin())

And I tried it both with await page.setBypassCSP(true) and without

Still with the same Gmail error

@thomask
Copy link

thomask commented Nov 9, 2022

For anyone landing here, please see: #668 (comment)

@signaldev1
Copy link

Once again, the issue/problem has emerged today !
Are there any suggestions or solutions from anyone regarding this problem?

@tab1293
Copy link

tab1293 commented Jul 24, 2023

I am running in to this again as well. @signaldev1 any luck uncovering a work around?

@signaldev1
Copy link

hey @tab1293 No, I'm still searching for a solution as well.

If anyone has any updates or workarounds, please share. Let's collaborate to find a resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug report A bug has been reported needs triage
Projects
None yet
Development

No branches or pull requests