Failed to initialize Playwright browser: BrowserType.launch: Executable doesn't exist
Can't find Chromium browser when running agent
I'm getting the same error when trying to run the agent with "Use Own Browser" disabled. It's trying to open Chromium 1148. The ms-playwright folder has Chromium 1155 (most recent) instead.
File "C:\Users\___\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11\LocalCache\local-packages\Python311\site-packages\playwright\_impl\_connection.py", line 528, in wrap_api_call
raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None
playwright._impl._errors.Error: BrowserType.launch: Executable doesn't exist at C:\Users\___\AppData\Local\ms-playwright\chromium-1148\chrome-win\chrome.exe
Solution 5: Use a Specific Browser Channel If the issue is specific to Chromium, you can try using a different browser channel (e.g., Chrome or Microsoft Edge) by specifying it in your code: (channel="chrome")
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
# Use Chrome instead of Chromium
browser = p.chromium.launch(channel="chrome", headless=False)
page = browser.new_page()
page.goto("https://example.com")
print(page.title())
browser.close()
that works! at least for me
DO this playwright install chromium instead of playwright install
Not working. Can anyone suggest a solution?
DO this
playwright install chromiuminstead ofplaywright install
exec :" playwright install chromium " is working!
.venv/bin/playwright install
To install same
In MAC browser = await p.chromium.launch(headless=True) to browser = await p.chromium.launch(channel="chrome",headless=True) is working