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

example doesn't do anything on Linux/Manjaro #52

Open
ralyodio opened this issue May 25, 2022 · 2 comments
Open

example doesn't do anything on Linux/Manjaro #52

ralyodio opened this issue May 25, 2022 · 2 comments

Comments

@ralyodio
Copy link

ralyodio commented May 25, 2022

import puppeteer from "https://deno.land/x/[email protected]/mod.ts";

const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto("https://example.com");
await page.screenshot({ path: "example.png" });

await browser.close();

nothing happens. I don't see any browser open or screenshot.png created.

I tried adding { headless false } and I get this error:

Check file:///home/ettinger/src/accounts/bot/test.ts
error: Uncaught TimeoutError: Timed out after 30000 ms while trying to connect to the browser! Only Chrome at revision r991974 is guaranteed to work.
    throw new TimeoutError(
          ^
    at https://deno.land/x/[email protected]/src/deno/BrowserRunner.ts:162:11
    at Object.action (deno:ext/web/02_timers.js:145:13)
    at handleTimerMacrotask (deno:ext/web/02_timers.js:62:12)
➜  bot 
$ 

I ran this command and it finished:


$ PUPPETEER_PRODUCT=chrome deno run -A --unstable https://deno.land/x/[email protected]/install.ts
Already downloaded at /home/ettinger/.cache/deno/deno_puppeteer/chromium/linux-991974/chrome-linux/chrome
@theowenyoung
Copy link

same here:

error: Uncaught (in promise) Error: Failed to launch the browser process!
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

  throw new Error(
        ^
    at waitForWSEndpoint (https://deno.land/x/[email protected]/src/deno/BrowserRunner.ts:176:9)
    at async BrowserRunner.setupConnection (https://deno.land/x/[email protected]/src/deno/BrowserRunner.ts:145:31)
    at async ChromeLauncher.launch (https://deno.land/x/[email protected]/src/deno/Launcher.ts:114:26)
    at async file:///home/green/ts2/test.js:3:17

@jespertheend
Copy link

jespertheend commented Aug 24, 2022

I was running into this issue on Ubuntu (though only when using headless: false), when trying to launch chromium using the exact same arguments as the ones I found while inspecting the deno process, I noticed Chromium was crashing with

execv /home/jesper/.cache/deno/deno_puppeteer/chromium/linux-991974/chrome-linux/chrome_crashpad_handler: Permission denied (13)

Needless to say, adding execute permissions to chrome-linux/chrome_crashpad_handler fixed it for me.

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