playwright-go icon indicating copy to clipboard operation
playwright-go copied to clipboard

[Bug]: Host system is missing dependencies to run browsers - on Ubuntu 24.04

Open naimsulejmani opened this issue 1 year ago • 1 comments


2024/05/09 23:57:14 Downloading browsers...
Playwright Host validation warning: 
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Missing libraries:                                   ║
║     libicudata.so.70                                 ║
║     libicui18n.so.70                                 ║
║     libicuuc.so.70                                   ║
║     libvpx.so.7                                      ║
╚══════════════════════════════════════════════════════╝
    at validateDependenciesLinux (/home/naimsulejmani/.cache/ms-playwright-go/1.42.1/package/lib/server/registry/dependencies.js:216:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Registry._validateHostRequirements (/home/naimsulejmani/.cache/ms-playwright-go/1.42.1/package/lib/server/registry/index.js:627:43)
    at async Registry._validateHostRequirementsForExecutableIfNeeded (/home/naimsulejmani/.cache/ms-playwright-go/1.42.1/package/lib/server/registry/index.js:725:7)
    at async Registry.validateHostRequirementsForExecutablesIfNeeded (/home/naimsulejmani/.cache/ms-playwright-go/1.42.1/package/lib/server/registry/index.js:714:43)
    at async t.<anonymous> (/home/naimsulejmani/.cache/ms-playwright-go/1.42.1/package/lib/cli/program.js:119:7)
2024/05/09 23:57:15 Downloaded browsers successfully


Recently, I upgraded my Ubuntu to the latest version, 24.04, and now my Go project is failing due to missing libraries as mention above. Are there any plans for a quick fix to address this issue?

naimsulejmani avatar May 09 '24 22:05 naimsulejmani

Depend on upstream: https://github.com/microsoft/playwright/issues/30368

canstand avatar May 15 '24 02:05 canstand

Solved in #472 (v0.4501.0)

canstand avatar Jul 10 '24 03:07 canstand

in ubuntu:22.04 ╔══════════════════════════════════════════════════════╗ ║ Host system is missing dependencies to run browsers. ║ ║ Missing libraries: ║ ║ libglib-2.0.so.0 ║ ║ libgobject-2.0.so.0 ║ ║ libnss3.so ║ ║ libnssutil3.so ║ ║ libsmime3.so ║ ║ libnspr4.so ║ ║ libdbus-1.so.3 ║ ║ libatk-1.0.so.0 ║ ║ libatk-bridge-2.0.so.0 ║ ║ libcups.so.2 ║ ║ libgio-2.0.so.0 ║ ║ libdrm.so.2 ║ ║ libexpat.so.1 ║ ║ libxcb.so.1 ║ ║ libxkbcommon.so.0 ║ ║ libatspi.so.0 ║ ║ libX11.so.6 ║ ║ libXcomposite.so.1 ║ ║ libXdamage.so.1 ║ ║ libXext.so.6 ║ ║ libXfixes.so.3 ║ ║ libXrandr.so.2 ║ ║ libgbm.so.1 ║ ║ libpango-1.0.so.0 ║ ║ libcairo.so.2 ║ ║ libasound.so.2 ║ ╚══════════════════════════════════════════════════════╝

yqchilde avatar Oct 17 '24 06:10 yqchilde

I found that this issue only exists with playwright install chromium, and everything is normal when I switch to chrome

yqchilde avatar Oct 17 '24 07:10 yqchilde

Try run go run github.com/playwright-community/playwright-go/cmd/playwright@latest install --with-deps

canstand avatar Oct 17 '24 07:10 canstand

Try run go run github.com/playwright-community/playwright-go/cmd/playwright@latest install --with-deps

Yes, that's correct, but it will cause the volume to increase in the container, and only chromium is the smallest, so I want to use chromium 🤣

However, I can currently use Chrome. Thank you for your contribution

yqchilde avatar Oct 17 '24 08:10 yqchilde

Maybe you can use go run github.com/playwright-community/playwright-go/cmd/playwright@latest install chromium --with-deps. I'm pretty sure it ignores Firefox and Webkit and their dependencies.

canstand avatar Oct 17 '24 08:10 canstand

也许你可以使用go run github.com/playwright-community/playwright-go/cmd/playwright@latest install chromium --with-deps。我很确定它会忽略 Firefox 和 Webkit 及其依赖项。

👍 good

yqchilde avatar Oct 17 '24 10:10 yqchilde