Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

playwright._impl._api_types.Error: Host system is missing dependencies??

Tags:

playwright

enter image description here

root@f083f367b874:/app# vim test.py
root@f083f367b874:/app# python test.py
Traceback (most recent call last):
  File "test.py", line 13, in <module>
    run(playwright)
  File "test.py", line 3, in run
    browser = playwright.chromium.launch(headless=False)
  File "/usr/local/lib/python3.7/site-packages/playwright/sync_api/_generated.py", line 9449, in launch
    firefoxUserPrefs=mapping.to_impl(firefox_user_prefs),
  File "/usr/local/lib/python3.7/site-packages/playwright/_impl/_sync_base.py", line 103, in _sync
    return task.result()
  File "/usr/local/lib/python3.7/site-packages/playwright/_impl/_browser_type.py", line 90, in launch
    raise e
  File "/usr/local/lib/python3.7/site-packages/playwright/_impl/_browser_type.py", line 86, in launch
    return from_channel(await self._channel.send("launch", params))
  File "/usr/local/lib/python3.7/site-packages/playwright/_impl/_connection.py", line 36, in send
    return await self.inner_send(method, params, False)
  File "/usr/local/lib/python3.7/site-packages/playwright/_impl/_connection.py", line 54, in inner_send
    result = next(iter(done)).result()
playwright._impl._api_types.Error: Host system is missing dependencies!

  Missing libraries are:
      libnss3.so
      libnssutil3.so
      libsmime3.so
      libnspr4.so
      libatk-1.0.so.0
      libatk-bridge-2.0.so.0
      libcups.so.2
      libdrm.so.2
      libdbus-1.so.3
      libxkbcommon.so.0
      libXcomposite.so.1
      libXdamage.so.1
      libXfixes.so.3
      libXrandr.so.2
      libgbm.so.1
      libasound.so.2
      libatspi.so.0
      libxshmfence.so.1

How to solve this problem?

like image 923
NQ31 Avatar asked Aug 26 '26 16:08

NQ31


1 Answers

If you're using Playwright for Python, run: playwright install-deps

If you're using vanilla JS Playwright, run: npx playwright install-deps

Looks like you're using the Python version.

like image 80
Mihir Kumar Avatar answered Aug 30 '26 08:08

Mihir Kumar