web-arena-x / webarena

Code repo for "WebArena: A Realistic Web Environment for Building Autonomous Agents"
https://webarena.dev
Apache License 2.0
632 stars 90 forks source link

Getting error with playwright #142

Closed plzdoo closed 1 month ago

plzdoo commented 1 month ago

Thanks for your great work. The command I run is python run.py --instruction_path agent/prompts/jsons/p_cot_id_actree_2s.json --test_start_idx 0 --test_end_idx 1 --model gpt-3.5-turbo --result_dir ./result1

I think the headless option is already set to be true, but I still got the following error.


2024-05-28 20:30:20,287 - INFO - [Unhandled Error] 
Error("\n╔════════════════════════════════════════════════════════════════════════════════════════════════╗\n║ Looks like you launched a headed browser without having a XServer running.                     
║\n║ Set either 'headless: true' or use 'xvfb-run <your-playwright-app>' before running Playwright. 
║\n║                                                                                                
║\n║ <3 Playwright Team                                                                             
║\n╚════════════════════════════════════════════════════════════════════════════════════════════════╝\n=========================== logs ===========================\n<launching> 
/home/ubuntu/.cache/ms-playwright/chromium-1055/chrome-linux/chrome --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,DialMe
diaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBef
oreUnloadCheckSync,Translate --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-
popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --
metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun
 --export-tagged-pdf --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-ZBxObZ --remote-debugging-pipe 
--no-startup-window\n<launched> pid=37186\n[pid=37186][err] 
[37186:37186:0528/203020.263559:ERROR:ozone_platform_x11.cc(239)] Missing X server or $DISPLAY\n[pid=37186][err
] [37186:37186:0528/203020.263620:ERROR:env.cc(255)] The platform failed to initialize.  
Exiting.\n============================================================")]```