oven-sh / bun

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

[Bug]: Timeout Error when Launching Chromium with Playwright #11759

Closed JoShMiQueL closed 2 weeks ago

JoShMiQueL commented 3 months ago

What version of Bun is running?

1.1.6+e58d67b46

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

Create a script that open and closes the browser.

import { chromium } from "playwright";
const browser = await chromium.launch();
await browser.close()

Run it with bun start

What is the expected behavior?

Open and close the browser with normally

What do you see instead?

$ bun start
$ bun src/index.ts
1 | import { chromium } from 'playwright'
2 |
                                         ^
TimeoutError: launch: Timeout 180000ms exceeded.
Call log:
  - <launching> C:\Users\Josemi\AppData\Local\ms-playwright\chromium-1117\chrome-win\chrome.exe --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,rades,PaintHolding --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=C:\Users\Josemi\AppData\Local\Temp\playwright_chromiumdev_profile-vOL8UI --remote-debugging-pipe --no-startup-window
  - <launched> pid=16688

Additional information

System:
    OS: Windows 11 10.0.22631
    CPU: (28) x64 Intel(R) Core(TM) i7-14700K
    Memory: 5.67 GB / 31.78 GB
  Binaries:
    Node: 21.7.1 - C:\Program Files\nodejs\node.EXE
    npm: 10.5.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.15.5 - ~\AppData\Local\pnpm\pnpm.CMD
    bun: 1.1.6 - ~\.bun\bin\bun.EXE
  IDEs:
    VSCode: 1.90.0 - C:\Users\Josemi\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
  Languages:
    Bash: 5.2.26 - C:\Program Files\Git\usr\bin\bash.EXE
  npmPackages:
    @playwright/test: ^1.44.1 => 1.44.1
bugggggggg commented 3 months ago

i also got this error. is there any advice?

henrikvilhelmberglund commented 3 months ago

Kind of same (?), I get a different error:

$ bun screenshots/screenshots.js
111 |     env: options.env,
112 |     cwd: options.cwd,
113 |     shell: options.shell,
114 |     stdio
115 |   };
116 |   const spawnedProcess = childProcess.spawn(options.command, options.args || [], spawnOptions);
                                            ^
ENOENT: Failed to connect
   errno: 2
 syscall: "connect"

      at connect (node:net:302:10)
      at new  (node:net:16:31)
      at #getBunSpawnIo (node:child_process:630:17)
      at #createStdioObject (node:child_process:687:21)
      at node:child_process:721:12
      at spawn (node:child_process:724:8)
      at node:child_process:2:21
      at C:\Github\<project>\node_modules\playwright-core\lib\utils\processLauncher.js:116:39
      at launchProcess (C:\Github\<project>\node_modules\playwright-core\lib\utils\processLauncher.js:103:30)
      at C:\Github\<project>\node_modules\playwright-core\lib\server\browserType.js:179:36

Bun v1.1.15 (Windows x64 baseline)
error: script "screenshots" exited with code 1