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

Playwright does not work on Bunjs environment #10120

Closed
sohaieb opened this issue Apr 9, 2024 · 1 comment
Closed

Playwright does not work on Bunjs environment #10120

sohaieb opened this issue Apr 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@sohaieb
Copy link

sohaieb commented Apr 9, 2024

What version of Bun is running?

1.1.3

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64"Microsoft Windows NT 10.0.19045.0 x64

What steps can reproduce the bug?

Hi,
Actually I installed Playwright following its documentation, its dependencies and its browsers (using npx playwright install).

then I wrote this simple code:

import { chromium } from "playwright";

async function start() {
    const browser = await chromium.launch({
        headless: false
    })
    const page = await browser.newPage();
    await page.goto('https://google.com')
}


start();

runing the same code works well on pure NodeJs environment (without TypeScript), but running it using BunJs does not work.

What is the expected behavior?

It should display a browser window with a default tab showing https://google.com page

What do you see instead?

running the code above with --verbose flag shows this bunch of errors:

1 | import { chromium } from "playwright";
2 | 
                                         ^
TimeoutError: launch: launch: Timeout 180000ms exceeded.
Call log:
  - <launching> C:\Users\[user]\AppData\Local\ms-playwright\chromium-1112\chrome-win\chrome.exe --disable-field-trial-config --disable-background-networking --enable-features=NetworkSe
rvice,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishi
ng-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensio
ns --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,
CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades,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 --no-sandbox --user-data-dir=C:\Users\[user]\AppData\Local\Temp
\playwright_chromiumdev_profile-sudiUj --remote-debugging-pipe --no-startup-window
  - <launched> pid=11608
  - [pid=11608][err] [11608:10108:0409/165602.818:ERROR:chrome_browser_cloud_management_controller.cc(161)] Cloud management controller initialization aborted as CBCM is not enabled. Pl
ease use the `--enable-chrome-browser-cloud-management` command line flag to enable it if you are not using the official Google Chrome build.

      at C:\Users\[user]\Desktop\myproject\d.js:2:38
      at start (C:\Users\[user]\Desktop\myproject\d.js:3:21)
      at module code (C:\Users\[user]\Desktop\myproject\d.js:12:1)

running it without --verbose will only stuck and do not show anything.

Additional information

Installed @playwright with version 1.43.0

@sohaieb sohaieb added the bug Something isn't working label Apr 9, 2024
@Electroid
Copy link
Contributor

Duplicate of #9911

@Electroid Electroid marked this as a duplicate of #9911 Apr 9, 2024
@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants