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

Missing Dependencies preventing playwright launch #5893

Closed
vigneshtdev opened this issue Mar 19, 2021 · 7 comments
Closed

Missing Dependencies preventing playwright launch #5893

vigneshtdev opened this issue Mar 19, 2021 · 7 comments
Assignees

Comments

@vigneshtdev
Copy link

vigneshtdev commented Mar 19, 2021

ERROR Invoke Error {"errorType":"Error","errorMessage":"browserType.launch: Host system is missing dependencies!\n\n Missing libraries are:\n libgtk-3.so.0\n libgdk-3.so.0\n libX11.so.6\n libX11-xcb.so.1\n libxcb.so.1\n libXcomposite.so.1\n libXcursor.so.1\n libXdamage.so.1\n libXext.so.6\n libXfixes.so.3\n libXi.so.6\n libXrender.so.1\n libfreetype.so.6\n libfontconfig.so.1\n libdbus-glib-1.so.2\n libdbus-1.so.3\n libpangocairo-1.0.so.0\n libpango-1.0.so.0\n libatk-1.0.so.0\n libcairo-gobject.so.2\n libcairo.so.2\n libgdk_pixbuf-2.0.so.0\n libxcb-shm.so.0\n libpangoft2-1.0.so.0\n libXt.so.6\n","stack":["browserType.launch: Host system is missing dependencies!",""," Missing libraries are:"," libgtk-3.so.0"," libgdk-3.so.0"," libX11.so.6"," libX11-xcb.so.1"," libxcb.so.1"," libXcomposite.so.1"," libXcursor.so.1"," libXdamage.so.1"," libXext.so.6"," libXfixes.so.3"," libXi.so.6"," libXrender.so.1"," libfreetype.so.6"," libfontconfig.so.1"," libdbus-glib-1.so.2"," libdbus-1.so.3"," libpangocairo-1.0.so.0"," libpango-1.0.so.0"," libatk-1.0.so.0"," libcairo-gobject.so.2"," libcairo.so.2"," libgdk_pixbuf-2.0.so.0"," libxcb-shm.so.0"," libpangoft2-1.0.so.0"," libXt.so.6","Error"," at Object.captureStackTrace (/var/task/node_modules/playwright-firefox/lib/utils/stackTrace.js:48:19)"," at Connection.sendMessageToServer (/var/task/node_modules/playwright-firefox/lib/client/connection.js:69:48)"," at Proxy.<anonymous> (/var/task/node_modules/playwright-firefox/lib/client/channelOwner.js:64:61)"," at /var/task/node_modules/playwright-firefox/lib/client/browserType.js:64:67"," at BrowserType._wrapApiCall (/var/task/node_modules/playwright-firefox/lib/client/channelOwner.js:77:34)"," at BrowserType.launch (/var/task/node_modules/playwright-firefox/lib/client/browserType.js:55:21)"," at run (/var/task/app.js:6:35)"," at Runtime.exports.handler (/var/task/app.js:18:11)"," at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"]}

@vigneshtdev
Copy link
Author

Is there a single package that I can install to cover all these?

@vigneshtdev
Copy link
Author

Tried
yum -y install libappindicator-gtk3 yum -y install liberation-fonts

Still some are missing

{"errorType":"Error","errorMessage":"browserType.launch: Host system is missing dependencies!\n\n Missing libraries are:\n libdbus-glib-1.so.2\n libXt.so.6\n","trace":["browserType.launch: Host system is missing dependencies!",""," Missing libraries are:"," libdbus-glib-1.so.2"," libXt.so.6","Error"," at Object.captureStackTrace (/var/task/node_modules/playwright-firefox/lib/utils/stackTrace.js:48:19)"," at Connection.sendMessageToServer (/var/task/node_modules/playwright-firefox/lib/client/connection.js:69:48)"," at Proxy.<anonymous> (/var/task/node_modules/playwright-firefox/lib/client/channelOwner.js:64:61)"," at /var/task/node_modules/playwright-firefox/lib/client/browserType.js:64:67"," at BrowserType._wrapApiCall (/var/task/node_modules/playwright-firefox/lib/client/channelOwner.js:77:34)"," at BrowserType.launch (/var/task/node_modules/playwright-firefox/lib/client/browserType.js:55:21)"," at run (/var/task/app.js:6:35)"," at Runtime.exports.handler (/var/task/app.js:20:11)"," at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"]}%

@vigneshtdev
Copy link
Author

{"errorType":"Error","errorMessage":"browserType.launch: Host system is missing dependencies!\n\n Missing libraries are:\n libXt.so.6\n","trace":["browserType.launch: Host system is missing dependencies!",""," Missing libraries are:"," libXt.so.6","Error"," at Object.captureStackTrace (/var/task/node_modules/playwright-firefox/lib/utils/stackTrace.js:48:19)"," at Connection.sendMessageToServer (/var/task/node_modules/playwright-firefox/lib/client/connection.js:69:48)"," at Proxy.<anonymous> (/var/task/node_modules/playwright-firefox/lib/client/channelOwner.js:64:61)"," at /var/task/node_modules/playwright-firefox/lib/client/browserType.js:64:67"," at BrowserType._wrapApiCall (/var/task/node_modules/playwright-firefox/lib/client/channelOwner.js:77:34)"," at BrowserType.launch (/var/task/node_modules/playwright-firefox/lib/client/browserType.js:55:21)"," at run (/var/task/app.js:6:35)"," at Runtime.exports.handler (/var/task/app.js:20:11)"," at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"]}%

@thernstig
Copy link
Contributor

@vigneshtdev are you using the latest version of Playwright? It should report which dependencies you need to install with a better output than what you see there.

You should probably also list your system and paste here, using the command npx envinfo --preset playwright

You can see more here also:
https://github.com/microsoft/playwright/blob/master/utils/docker/Dockerfile.bionic

@eggerand13
Copy link

eggerand13 commented Mar 23, 2021

I have the same problem as the original poster.
This is my system (a Debian VPS):

  System:
    OS: Linux 4.19 Debian GNU/Linux 10 (buster) 10 (buster)
    Memory: 6.40 GB / 9.76 GB
    Container: Yes
  Binaries:
    Node: 14.15.1 - /usr/bin/node
    npm: 6.14.8 - /usr/bin/npm
  Languages:
    Bash: 5.0.3 - /usr/bin/bash
  npmPackages:
    playwright: ^1.9.2 => 1.9.2

I have no problems running my code locally on a Windows machine but get the error above on the server.

I tried to install them with this command but the error interestingly stayed the same
sudo apt-get install -y libgtk-3.so.0 libgdk-3.so.0 libX11-xcb.so.1 libXcomposite.so.1 libXcursor.so.1 libXdamage.so.1 libXfixes.so.3 libXi.so.6 libXrender.so.1 libdbus-glib-1.so.2 libpangocairo-1.0.so.0 libpango-1.0.so.0 libatk-1.0.so.0 libcairo-gobject.so.2 libcairo.so.2 libgdk_pixbuf-2.0.so.0 libxcb-shm.so.0 libpangoft2-1.0.so.0 libXt.so.6

What confuses me a little is that the output above tells me the VPS is running as a container. I am not running it in a container. It is most likely virtualized by my hosting provider but not specifically in a container. It should be a normal Debian installation.

EDIT:

@thernstig I now ran all the install commands that were listed in the Docker file and now it works. Thank you.

@aslushnikov
Copy link
Collaborator

@vigneshtdev we currently don't support Debian - please feel free to upvote #3167 to have it covered.

@vaghelmt
Copy link

I have the same problem as the original poster.
This is my system (a Debian VPS):

  System:
    OS: Linux 4.19 Debian GNU/Linux 10 (buster) 10 (buster)
    Memory: 6.40 GB / 9.76 GB
    Container: Yes
  Binaries:
    Node: 14.15.1 - /usr/bin/node
    npm: 6.14.8 - /usr/bin/npm
  Languages:
    Bash: 5.0.3 - /usr/bin/bash
  npmPackages:
    playwright: ^1.9.2 => 1.9.2

I have no problems running my code locally on a Windows machine but get the error above on the server.

I tried to install them with this command but the error interestingly stayed the same
sudo apt-get install -y libgtk-3.so.0 libgdk-3.so.0 libX11-xcb.so.1 libXcomposite.so.1 libXcursor.so.1 libXdamage.so.1 libXfixes.so.3 libXi.so.6 libXrender.so.1 libdbus-glib-1.so.2 libpangocairo-1.0.so.0 libpango-1.0.so.0 libatk-1.0.so.0 libcairo-gobject.so.2 libcairo.so.2 libgdk_pixbuf-2.0.so.0 libxcb-shm.so.0 libpangoft2-1.0.so.0 libXt.so.6

What confuses me a little is that the output above tells me the VPS is running as a container. I am not running it in a container. It is most likely virtualized by my hosting provider but not specifically in a container. It should be a normal Debian installation.

EDIT:

@thernstig I now ran all the install commands that were listed in the Docker file and now it works. Thank you.

Would you be able to share the command you used in DOCKERFILE to install these dependencies? For me, it still says not able to locate the package - 'Unable to locate package libatk-bridge-2'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants