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

Supporting Google Meet #334

Closed
mp3michael opened this issue Sep 21, 2020 · 25 comments
Closed

Supporting Google Meet #334

mp3michael opened this issue Sep 21, 2020 · 25 comments

Comments

@mp3michael
Copy link

Am building a robot to login and record video meetings and puppeteer-extra is proving quite valuable!

Unfortunately Google Meet isn't fooled. Any connection using Google Meet is identified as a bot and blocked.

Anyone have experience with this or have a workaround?

@evading-bot-detection
Copy link

this is interesting. Are you logging into a Google account beforehand?

@mp3michael
Copy link
Author

No we're not. We building a service for the public and so we are using an unauthenticated web interface to connect to the meeting, record it and then send the user a video.

We're wanting to launch with Zoom, Meet and Teams but it seems Meet is very wise to Puppeteer. Even with your plugin it detects Puppeteer.

@mp3michael
Copy link
Author

I'll get this info and add it to this thread. Standby...

@s-artemenko
Copy link

Steps to reproduce:

  1. Create a meeting on meet.google.com, get the meeting link (in my case https://meet.google.com/ypd-hohe-vhs)

  2. Start incognito Chrome or Chromium and use the link to join the meeting:

chrome

  1. Run puppeteer:

const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
puppeteer.use(StealthPlugin());
var browser = await puppeteer.launch({headless: false,
args : ['--incognito',
'--disable-features=IsolateOrigins,site-per-process',
'--disable-infobars',
'--no-sandbox',
'--disable-setuid-sandbox',
]
});
var page = (await browser.pages())[0];
await page.goto('https://meet.google.com/ypd-hohe-vhs', {
waitUntil: "networkidle0",
timeout: 120000
});

"You can't join this video call" is shown.
In the log you can see that POST request "ResolveMeetingSpace" is failed.

puppeteer

@s-artemenko
Copy link

Привет. Пиши по английски плиз, mp3michael не понимает, он следит.
I didn't try with Playwright.

@s-artemenko
Copy link

Thank you.
We are using some Chrome extension, therefore it will be difficult to switch to Firefox.
Do you see any way to make it works on puppeteer + Chrome/Chromium?

@s-artemenko
Copy link

Thank you.
We are using some Chrome extension, therefore it will be difficult to switch to Firefox.
Do you see any way to make it works on puppeteer + Chrome/Chromium?

I'd highly recommend this option enabled
await page.setBypassCSP(true)

When you load Meet, there are a bunch of errors in console. Trackdown the exact reason.
There is a bug in 2.6.1, so try to downdtrade to the previous versions, like 2.6.0

If I could login using Firefox with obvious fingerprint, and enable videos, then there is no protection in place, they do not track bots.

Ok, thank you. I will try.

@berstend
Copy link
Owner

Closing until there's more technical info provided.

@namnm
Copy link

namnm commented Feb 20, 2022

Having the same issue, not sure how to get pass this

@steinathan
Copy link

You can try to use this stealth plugin

https://www.npmjs.com/package/puppeteer-extra

@thearnica
Copy link

Confirmed to work with Stealth plugin

@yehorpenshyn
Copy link

yehorpenshyn commented Feb 26, 2024

Unfortunately, I'm having the same issue. I use puppeteer-extra library to launch the browser and page, but I already have had this label 'You can't join this video call', before joining. Therefore a few days ago everything works correctly.

Also I use stealth plugin

@siddharthbulia
Copy link

Not working for me either. Using stealth plugin.

@Hassaan11
Copy link

Its works if I logs into google account before joining the meeting but without google login its not working for me either.

@akumar044
Copy link

Has anyone figured out a solution for this? @Hassaan11 @siddharthbulia @yehorpenshyn

So far I have used the StealthPlugin and removed these evasions

stealthPlugin.enabledEvasions.delete("iframe.contentWindow"); stealthPlugin.enabledEvasions.delete("media.codecs");

Nothing seems to be working. Before joining the meeting I get "You can't join this video call".

@yehorpenshyn
Copy link

@akumar044 which version of puppeteer do u use?

I had the same error earlier and I found the issue in puppeteer versioning after my upgrading puppeteer package. Just downgrade the version and everything is working perfectly.

@akumar044
Copy link

I'm using these versions @yehorpenshyn

"puppeteer": "22.4.1", "puppeteer-extra": "^3.3.4", "puppeteer-extra-plugin-stealth": "^2.11.1"

@yehorpenshyn
Copy link

@akumar044 try to use my list of versions

"puppeteer": "^20.9.0", "puppeteer-extra": "^3.3.6", "puppeteer-extra-plugin-stealth": "^2.11.2",

@akumar044
Copy link

Awesome, it worked!. I'm using "puppeteer-stream": "3.0.9" and the above 3 versions are compatible with it.

Thankyou @yehorpenshyn

@Hassaan11
Copy link

const { executablePath } = require('puppeteer')

I am using "puppeteer": "^19.6.3", "puppeteer-extra": "^3.3.4", "puppeteer-extra-plugin-stealth": "^2.11.1",

this.browser = await launch(puppeteer, {
// executablePath: '/usr/local/bin/chromium',
executablePath: executablePath(),
devtools: false,
headless: false,
defaultViewport: null,
args: [
'--no-sandbox',
'--headless=new',
'--disable-setuid-sandbox',
'--ignore-certificate-errors',
'--disable-dev-shm-usage',
'--enable-features=ChromeBrowserCloudManagement',
'--disabled-setupid-sandbox',
],
});

  its working fine if i use 
  `executablePath: executablePath(),`
  puppeteer joins the meeting without asking to login
  
  but if i try to use custom chromium path like 
  // executablePath: '/usr/local/bin/chromium',
  then it wont work it gives 403 error.

@tamagoeggo
Copy link

If you didn’t want to deal with the complexities of implementing this yourself, an alternative is to use Recall.ai for your meeting bots instead. It’s a simple 3rd party API that lets you use meeting bots to get raw audio/video from meetings without you needing to spend months to build, scale and maintain these bots.

Disclaimer: I’m one of the founders.

@princemishra01
Copy link

rtunately Google Meet isn't fooled. Any conn

Hi @akumar044 We were trying the same thing, to get the recorded stream through puppeteer-extra and puppeteer-extra-plugin-stealth, but we are still not able to bypass the google authentication and getting the message "you can't join this video call".
By the above discussion I came to know that you have resolved this issue using the different version of above mentioned packages, but we are still not able to resolve it. Here is our code approach we followed to tackle this

const { launch, getStream } = require("../dist/PuppeteerStream");
const fs = require("fs");
const { executablePath } = require("puppeteer");

// make sure to install puppeteer-extra & puppeteer-extra-plugin-stealth to use this example
const puppeteer = require("puppeteer-extra");
const StealthPlugin = require("puppeteer-extra-plugin-stealth");

puppeteer.use(StealthPlugin());

const file = fs.createWriteStream(__dirname + "/test.webm");

async function test() {
  const browser = await launch(puppeteer, {
    executablePath: executablePath(),
    defaultViewport: {
      width: 1920,
      height: 1080,
    },
  });

  const page = await browser.newPage();
  await page.goto("https://meet.google.com/yto-rnuz-ink");
  const stream = await getStream(page, { audio: true, video: true });
  console.log("recording");

  stream.pipe(file);
  setTimeout(async () => {
    stream.destroy();
    await page.close();
    await browser.close();
    file.close();
    console.log("finished");
  }, 1000 * 10);
}

test();

Can you please be able to guide us through this to resolve the issue?

Thanks in advance

@akumar044
Copy link

Hi @princemishra01, I faced the same issue sometime back. I believe adding this should work

const stealthPlugin = StealthPlugin(); stealthPlugin.enabledEvasions.delete("iframe.contentWindow"); stealthPlugin.enabledEvasions.delete("media.codecs"); puppeteer.use(stealthPlugin);

Let me know how it goes!

@Spenquatch
Copy link

Using the suggestions here I have been able to get google meet to let me join locally on my PC, but when I try it in a Docker container it always gives me the "You can't join this video call" page. Any suggestions?

@buddhikajay
Copy link

I've created a sample project here.
@Spenquatch inside docker, I can make it work when I run xvfb-run --auto-servernum --server-args='-screen 0 1280x720x24' npm start but does not work when I add that to CMD.
This might be related to this. Please consider raising an MR if you find a solution

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