oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.32k stars 2.78k forks source link

Puppeteer Does not launch a new page on Linux, but works on macOS. Works on node with Linux and macOS #15060

Open andrew-stelmach opened 1 week ago

andrew-stelmach commented 1 week ago

What version of Bun is running?

1.1.34+5e5e7c60f

What platform is your computer?

Darwin 24.1.0 arm64 arm for macOS, Linux 5.15.153.1-microsoft-standard-WSL2 x86_64 x86_64, and regular Linux on Github Actions

What steps can reproduce the bug?

1) Install bun 2) bun add puppeteer 3) The following code is run:

console.log("going to ", url)
const browser = await puppeteer.launch({headless, args: [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-dev-shm-usage',  // Important for CI environments
        '--disable-accelerated-2d-canvas',
        '--disable-gpu',  // Required for some Linux environments
        '--window-size=1920,1080'
]});
console.log("hello")
const page = await browser.newPage();

await page.goto("google.com")

What is the expected behavior?

It should open a browser with an about:blank page and a tab at the url, regardless of platform.

What do you see instead?

It just opens an about:blank page and does not open a new tab with the intended url on Linux with bun.

The expected behavior happens on macOS with bun, however does not with bun + Linux. This all works correctly with node

Additional information

No response

cirospaciari commented 1 week ago

Can you try bun upgrade --canary? We add compatibility measures yesterday

guest271314 commented 1 week ago

Works for me on Linux xubuntu 5.15.0-43-generic after bunx puppeteer browsers install chrome.

Image