Skip to content

fails to run with x server. #534

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

Open
luojiyin1987 opened this issue Apr 15, 2025 · 2 comments
Open

fails to run with x server. #534

luojiyin1987 opened this issue Apr 15, 2025 · 2 comments

Comments

@luojiyin1987
Copy link

I want run it on Linux without an image interface.
But I get some error.

WARNING  [browser] Page load failed, continuing...
ERROR    [browser] Failed to initialize Playwright browser: BrowserType.launch: Target page, context or browser has been closed
Browser logs:

╔════════════════════════════════════════════════════════════════════════════════════════════════╗
║ Looks like you launched a headed browser without having a XServer running.                     ║
║ Set either 'headless: true' or use 'xvfb-run <your-playwright-app>' before running Playwright. ║
║                                                                                                ║
║ <3 Playwright Team                                                                             ║
╚════════════════════════════════════════════════════════════════════════════════════════════════╝
Call log:
  - <launching> /home/dev/.cache/ms-playwright/chromium-1161/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --disable-background-timer-throttling --disablluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-ck --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparenDeferRendererTasksAfterInput,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOPaintHolding,ThirdPartyStoragePartitioning,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost -ackgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --di-choice-screen --unsafely-disable-devtools-self-xss-warnings --no-sandbox --no-sandbox --disable-blink-features=AutomationControlled --disable-infobars --disable-background-timer-throttlinlocking --disable-backgrounding-occluded-windows --disable-renderer-backgrounding --disable-window-activation --disable-focus-on-load --no-first-run --no-default-browser-check --no-startupsition=0,0 --disable-web-security --disable-site-isolation-trials --disable-features=IsolateOrigins,site-per-process --accept_downloads=True --window-size=1280,1100 --user-data-dir=/tmp/plv_profile-lSRNYQ --remote-debugging-pipe --no-startup-window
  -   - <launched> pid=38961
  -   - [pid=38961][err] [38961:38961:0415/104608.490808:ERROR:ozone_platform_x11.cc(245)] Missing X server or $DISPLAY
  -   - [pid=38961][err] [38961:38961:0415/104608.490869:ERROR:env.cc(257)] The platform failed to initialize.  Exiting.

ERROR    [agent] ❌ Result failed 3/3 times:
 BrowserType.launch: Target page, context or browser has been closed
Browser logs:

╔════════════════════════════════════════════════════════════════════════════════════════════════╗
║ Set either 'headless: true' or use 'xvfb-run <your-playwright-app>' before running Playwright. ║
║                                                                                                ║
║ <3 Playwright Team                                                                             ║
╚════════════════════════════════════════════════════════════════════════════════════════════════╝
Call log:
  - <launching> /home/dev/.cache/ms-playwright/chromium-1161/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --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=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DeferRendererTasksAfterInput,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --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 --unsafely-disable-devtools-self-xss-warnings --no-sandbox --no-sandbox --disable-blink-features=AutomationControlled --disable-infobars --disable-background-timer-throttling --disable-popup-blocking --disable-backgrounding-occluded-windows --disable-renderer-backgrounding --disable-window-activation --disable-focus-on-load --no-first-run --no-default-browser-check --no-startup-window --window-position=0,0 --disable-web-security --disable-site-isolation-trials --disable-features=IsolateOrigins,site-per-process --accept_downloads=True --window-size=1280,1100 --user-data-dir=/tmp/playwright_chromiumdev_profile-lSRNYQ --remote-debugging-pipe --no-startup-window
  -   - <launched> pid=38961
  -   - [pid=38961][err] [38961:38961:0415/104608.490808:ERROR:ozone_platform_x11.cc(245)] Missing X server or $DISPLAY
  -   - [pid=38961][err] [38961:38961:0415/104608.490869:ERROR:env.cc(257)] The platform failed to initialize.  Exiting.

ERROR    [src.agent.custom_agent] ❌ Stopping due to 3 consecutive failures
WARNING  [agent] No history to create GIF from
^CKeyboard interruption in main thread... closing server.
@uwzis
Copy link

uwzis commented Apr 22, 2025

Have this issue as well, any solution? I am running an x server but I still get this error regardless.

@uwzis
Copy link

uwzis commented Apr 22, 2025

Please change title to fails to run with x server.

@luojiyin1987 luojiyin1987 changed the title Can it run on Linux without an image interface? fails to run with x server. Apr 26, 2025
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

2 participants