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] "This browser or app may not be secure" appears again when trying to login to google #822

Open
git37 opened this issue Jul 17, 2023 · 27 comments
Labels
issue: bug report A bug has been reported needs triage

Comments

@git37
Copy link

git37 commented Jul 17, 2023

[Bug] "This browser or app may not be secure" appears again when trying to login to google

@git37 git37 added issue: bug report A bug has been reported needs triage labels Jul 17, 2023
@nm-free
Copy link

nm-free commented Jul 18, 2023

Same happens to me too.

@signaldev1
Copy link

signaldev1 commented Jul 18, 2023

+1 Once again, the issue has emerged today !

@haupt-pascal
Copy link

+1

@MichaelRobsonSliide
Copy link

I've just started using this and I get the same, I've noticed if I set headless: false it works but when I run in headless I get the "browser or app may not be secure" message

@git37
Copy link
Author

git37 commented Jul 31, 2023

I've just started using this and I get the same, I've noticed if I set headless: false it works but when I run in headless I get the "browser or app may not be secure" message

for me it is also with headless=false, but it seems like this repo isn't maintained anymore...

@signaldev1
Copy link

No solution found yet :/ . Still working on it. Any suggestions welcome.

@vilkhovskiy
Copy link

Does anyone have any updates?

@peacemaker123456
Copy link

peacemaker123456 commented Aug 22, 2023

The issues is caused by the stealth plugin.

I narrowed it down and you need to delete those 2 evasions:

const stealthPlugin = stealth()
stealthPlugin.enabledEvasions.delete('iframe.contentWindow');
stealthPlugin.enabledEvasions.delete('media.codecs')

Also using: args: ['--disable-blink-features=AutomationControlled']

@haupt-pascal
Copy link

This does not work for me - do you have any idea?

import puppeteer from 'puppeteer-extra' import { PuppeteerNodeLaunchOptions, Browser, Page, ElementHandle } from 'puppeteer' import fs from 'fs-extra' import path from 'path' const StealthPlugin = require('puppeteer-extra-plugin-stealth')() StealthPlugin.enabledEvasions.delete('iframe.contentWindow') StealthPlugin.enabledEvasions.delete('navigator.plugins') StealthPlugin.enabledEvasions.delete('media.codecs') puppeteer.use(StealthPlugin)

image

@nm-free
Copy link

nm-free commented Aug 23, 2023

This does not work for me - do you have any idea?

import puppeteer from 'puppeteer-extra' import { PuppeteerNodeLaunchOptions, Browser, Page, ElementHandle } from 'puppeteer' import fs from 'fs-extra' import path from 'path' const StealthPlugin = require('puppeteer-extra-plugin-stealth')() StealthPlugin.enabledEvasions.delete('iframe.contentWindow') StealthPlugin.enabledEvasions.delete('navigator.plugins') StealthPlugin.enabledEvasions.delete('media.codecs') puppeteer.use(StealthPlugin)

image

I same issue.

@peacemaker123456
Copy link

This does not work for me - do you have any idea?

`import puppeteer from 'puppeteer-extra'

import { PuppeteerNodeLaunchOptions, Browser, Page, ElementHandle } from 'puppeteer'

import fs from 'fs-extra'

import path from 'path'

const StealthPlugin = require('puppeteer-extra-plugin-stealth')()

StealthPlugin.enabledEvasions.delete('iframe.contentWindow')

StealthPlugin.enabledEvasions.delete('navigator.plugins')

StealthPlugin.enabledEvasions.delete('media.codecs')

puppeteer.use(StealthPlugin)

`

image

try also args: ['--disable-blink-features=AutomationControlled']

@haupt-pascal
Copy link

Doesn't work as well...

@krieg0102
Copy link

same issue. +1

@OmerGit2000
Copy link

+1

1 similar comment
@N0itx
Copy link

N0itx commented Sep 4, 2023

+1

@lindo8818
Copy link

Well guys, without testing it, i have an idea. Log which userAgent you are using. This err looks to me like a outdated Useragent...

@wlc108
Copy link

wlc108 commented Sep 16, 2023

It's definitely not the Useragent for most people -- quickest thing I ruled out on my end for most sites. Multiple other bot-detection sites started detecting Puppeteer-extra-stealth too. I strongly feel it's somehow detecting it via javascript

@sawaYch
Copy link

sawaYch commented Sep 23, 2023

any update for this issue? I am facing same issue for headless mode while headful mode works well with stealth plugin.

@onepunch-tk
Copy link

onepunch-tk commented Oct 28, 2023

If there is a "--disable-notifications" option in args
Try removing it.
By removing this option, it worked.

code:
`const puppeteer = require("puppeteer-extra");
const StealthPlugin = require("puppeteer-extra-plugin-stealth");
const AnonymizeUAPlugin = require("puppeteer-extra-plugin-anonymize-ua");
const AdblockerPlugin = require("puppeteer-extra-plugin-adblocker");
const path = require("path");

puppeteer.use(StealthPlugin());
puppeteer.use(AnonymizeUAPlugin());
puppeteer.use(
AdblockerPlugin({
blockTrackers: true,
})
);
const crawler = async () => {
const browser = await puppeteer.launch({
headless: false,
defaultViewport: null,
ignoreDefaultArgs: ["--disable-extensions"],
args: [
"--start-maximized",
"--no-sandbox",
"--disable-setuid-sandbox",
"--user-data-dir=${path.join(__dirname, "dev-user-data")}",
],
});
const page = await browser.newPage();
let login_link = "https://google.com/";
await page.goto(login_link);
};`

@marcio199226
Copy link

@onepunch-tk it's really works!

@nowaysgit
Copy link

+1

@triplesixman
Copy link

+1

Has worked for over a year without any problems.

No problems if I connect from a browser.

@luizgununes
Copy link

Unfortunately, not working here. Does someone still has this issue?

@vladtreny
Copy link

vladtreny commented Mar 27, 2024

send full code to reproduce

better compile everything in one file

@luizgununes
Copy link

Ignore the OpenAI part, it works fine. The problem is after the email input.

const puppeteer = require("puppeteer-extra");
const StealthPlugin = require("puppeteer-extra-plugin-stealth");
const AnonymizeUAPlugin = require("puppeteer-extra-plugin-anonymize-ua");
const AdblockerPlugin = require("puppeteer-extra-plugin-adblocker");

puppeteer.use(StealthPlugin());
puppeteer.use(AnonymizeUAPlugin());
puppeteer.use(
  AdblockerPlugin({
    blockTrackers: true,
  })
);

const browser = await puppeteer.launch({
  headless: true,
  defaultViewport: null,
  ignoreDefaultArgs: ["--disable-extensions"],
  dumpio: true,
  args: ["--start-maximized", "--no-sandbox", "--disable-setuid-sandbox"],
  executablePath: "/Applications/Chromium.app/Contents/MacOS/Chromium",
});

const page = await browser.newPage();

// OpenAI Stuff

await page.goto("https://platform.openai.com/usage", {
  waitUntil: "networkidle2",
});

await page.waitForSelector("button");
await page.click("button")[0];
await page.waitForSelector(".social-btn");

try {
  await page.evaluate(() => {
    const elements = document.querySelectorAll(".social-btn");
    elements.forEach((element) => {
      if (element.innerHTML.includes("Google")) {
        element.click();
      }
    });
  });
} catch (error) {
  await page.click("form[data-provider] button")[1];
}

// Google Stuff

await page.waitForNavigation();

await page.waitForSelector('input[type="email"]');

await page.type('input[type="email"]', "test@test.com", { delay: 30 });

await page.keyboard.press("Enter");

page
  .waitForSelector('input[type="password"]', { visible: true })
  .then(async () => {
    await page.type('input[type="password"]', "test");
    await page.keyboard.press("Enter");
  });

@vladtreny
Copy link

vladtreny commented Mar 27, 2024

Remove this
puppeteer.use(StealthPlugin());

And add this

const stealth = StealthPlugin()
stealth.enabledEvasions.delete('iframe.contentWindow')
stealth.enabledEvasions.delete('media.codecs')
puppeteer.use(stealth)

@luizgununes
Copy link

Nice! It worked. But seems like I have to figure out how to bypass the captcha...

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