[BUG] Webkit problem with libwebp-1.1.0-1, error while loading shared libraries: libwebp.so.6
Context:
- Playwright Version: ^1.1.1
- Operating System: Arch Linux x86_64
- Kernel: 5.7.2-arch1-1
- Node version: v14.4.0
- Browser: WebKit
- Extra: libwebp-1.1.0-1
Code Snippet
const playwright = require('playwright')
;(async () => {
for (const browserType of ['webkit']) {
const browser = await playwright[browserType].launch()
const context = await browser.newContext()
const page = await context.newPage()
await page.goto('http://whatsmyuseragent.org/')
await page.screenshot({ path: `example-${browserType}.png` })
await browser.close()
}
})()
Describe the bug error while loading shared libraries: libwebp.so.6
pw:api => webkit.launch started +0ms
pw:api <= webkit.launch failed +23ms
(node:329099) UnhandledPromiseRejectionWarning: Protocol error (Playwright.enable): Browser has been closed.
==================== webkit.launch logs ====================
<launching> /home/thesorryguy/.cache/ms-playwright/webkit-1269/pw_run.sh --inspector-pipe --headless --no-startup-window
<launched> pid=329110
/home/thesorryguy/.cache/ms-playwright/webkit-1269/minibrowser-wpe/MiniBrowser: error while loading shared libraries: libwebp.so.6: cannot open shared object file: No such file or directory
<process did exit: exitCode=127, signal=null>
============================================================
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.Error
at /home/thesorryguy/Documents/youtube-stream/node_modules/playwright/lib/webkit/wkConnection.js:104:63
at new Promise (<anonymous>)
at WKSession.send (/home/thesorryguy/Documents/youtube-stream/node_modules/playwright/lib/webkit/wkConnection.js:103:16)
at Function.connect (/home/thesorryguy/Documents/youtube-stream/node_modules/playwright/lib/webkit/wkBrowser.js:50:37)
at WebKit._connectToTransport (/home/thesorryguy/Documents/youtube-stream/node_modules/playwright/lib/server/webkit.js:33:38)
at WebKit._innerLaunch (/home/thesorryguy/Documents/youtube-stream/node_modules/playwright/lib/server/browserType.js:86:36)
at async ProgressController.run (/home/thesorryguy/Documents/youtube-stream/node_modules/playwright/lib/progress.js:76:28)
at async WebKit.launch (/home/thesorryguy/Documents/youtube-stream/node_modules/playwright/lib/server/browserType.js:61:25)
at async /home/thesorryguy/Documents/youtube-stream/src/index.js:5:21
(Use `node --trace-warnings ...` to show where the warning was created)
(node:329099) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:329099) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
which I fixed by creating the symbolic link manually.
sudo ln /usr/lib/libwebp.so.7 /usr/lib/libwebp.so.6
Then again running into
pw:api => webkit.launch started +0ms
pw:api <= webkit.launch failed +24ms
(node:330939) UnhandledPromiseRejectionWarning: Protocol error (Playwright.enable): Browser has been closed.
==================== webkit.launch logs ====================
<launching> /home/thesorryguy/.cache/ms-playwright/webkit-1269/pw_run.sh --inspector-pipe --headless --no-startup-window
<launched> pid=330950
/home/thesorryguy/.cache/ms-playwright/webkit-1269/minibrowser-wpe/MiniBrowser: error while loading shared libraries: libpcre.so.3: cannot open shared object file: No such file or directory
<process did exit: exitCode=127, signal=null>
============================================================
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.Error
at /home/thesorryguy/Documents/youtube-stream/node_modules/playwright/lib/webkit/wkConnection.js:104:63
at new Promise (<anonymous>)
at WKSession.send (/home/thesorryguy/Documents/youtube-stream/node_modules/playwright/lib/webkit/wkConnection.js:103:16)
at Function.connect (/home/thesorryguy/Documents/youtube-stream/node_modules/playwright/lib/webkit/wkBrowser.js:50:37)
at WebKit._connectToTransport (/home/thesorryguy/Documents/youtube-stream/node_modules/playwright/lib/server/webkit.js:33:38)
at WebKit._innerLaunch (/home/thesorryguy/Documents/youtube-stream/node_modules/playwright/lib/server/browserType.js:86:36)
at async ProgressController.run (/home/thesorryguy/Documents/youtube-stream/node_modules/playwright/lib/progress.js:76:28)
at async WebKit.launch (/home/thesorryguy/Documents/youtube-stream/node_modules/playwright/lib/server/browserType.js:61:25)
at async /home/thesorryguy/Documents/youtube-stream/src/index.js:5:21
(Use `node --trace-warnings ...` to show where the warning was created)
(node:330939) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:330939) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Which I solved by creating the symbolic link manually again.
sudo ln /usr/lib/libpcre.so.1 /usr/lib/libpcre.so.3
Is it because of the latest libwebp-1.1.0-1 ?
Which Linux distribution are you using?
@yury-s Arch Linux x86_64
I am also using Arch, and got same errors.
Is it because of the latest libwebp-1.1.0-1 ?
@somoy99 It might be! But i wouldn't say anything for sure.
All in all, our recent effort at making launch experience smoother should help you here: you'll get a list of all missing dependencies, at least as of our upcoming 1.3 release.
We don't consider missing dependency a bug in this case since ArchLinux support is out of scope for us at the moment. Closing this since it's not actionable on our side.
Arch support would be nice!
I had missing .so errors, which I solved with
cd /usr/lib
sudo ln -s libicui18n.so.67 libicui18n.so.66
sudo ln -s libicuuc.so.67 libicuuc.so.66
sudo ln -s libwebp.so.7 libwebp.so.6
Now I have this error:
[err] /home/trusktr/.cache/ms-playwright/webkit-1343/minibrowser-wpe/bin/MiniBrowser: symbol lookup error: /home/trusktr/.cache/ms-playwright/webkit-1343/minibrowser-wpe/lib/libWPEWebKit-1.0.so.3: undefined symbol: u_strToUpper_66
Any ideas? Maybe the new errors is due to linking to the wrong versions, which I know isn't the actual solution.
Arch support would be nice!
I had missing
.soerrors, which I solved withcd /usr/lib sudo ln -s libicui18n.so.67 libicui18n.so.66 sudo ln -s libicuuc.so.67 libicuuc.so.66 sudo ln -s libwebp.so.7 libwebp.so.6Now I have this error:
[err] /home/trusktr/.cache/ms-playwright/webkit-1343/minibrowser-wpe/bin/MiniBrowser: symbol lookup error: /home/trusktr/.cache/ms-playwright/webkit-1343/minibrowser-wpe/lib/libWPEWebKit-1.0.so.3: undefined symbol: u_strToUpper_66Any ideas? Maybe the new errors is due to linking to the wrong versions, which I know isn't the actual solution.
Same issue, did you manage to solve it?
I had the same issue in ubuntu 18.04 LTS.
I run following command and solved it.
sudo apt update
sudo apt upgrade
sudo apt update
sudo apt-get install libgles2
sudo apt-get install gstreamer1.0-libav
sudo apt-get install libharfbuzz-icu0
sudo apt-get install libwoff1
sudo apt-get install libgstreamer-plugins-bad1.0-0
sudo apt-get install libgstreamer-gl1.0-0
sudo apt-get install libwebp-dev
Can you please include everything when we install?
Cheers
same issue here on arch linux
Missing libraries are:
libicui18n.so.66
libicuuc.so.66
libgstcodecparsers-1.0.so.0
libwebp.so.6
libenchant.so.1
After linking system libraries with above i get the error below
[err] /home/username/.cache/ms-playwright/webkit-1402/minibrowser-wpe/bin/MiniBrowser: symbol lookup error:
/home/username/.cache/ms-playwright/webkit-1402/minibrowser-wpe/lib/libWPEWebKit-1.0.so.3: undefined symbol: u_strToLower_66
I'm running Manjaro and I'm encountering the same issue:
Error: Host system is missing dependencies!
Missing libraries are:
libwebp.so.6
libenchant.so.1
libicui18n.so.66
libicuuc.so.66
Is Arch support on the roadmap? Has anyone found a workaround?
With Ubuntu 20.04.2 LTS (minimal installation) + Playwright 1.10.0 when running WebKit you get this error:
libgstcodecparsers-1.0.so.0: cannot open shared object file: No such file or directory
Protocol error (Playwright.enable): Browser closed.
==================== Browser output: ====================
<launching> /home/tanguy/.cache/ms-playwright/webkit-1446/pw_run.sh --inspector-pipe --headless --no-startup-window
<launched> pid=22226
[pid=22226][err] /home/tanguy/.cache/ms-playwright/webkit-1446/minibrowser-wpe/bin/MiniBrowser: error while loading shared libraries: libgstcodecparsers-1.0.so.0: cannot open shared object file: No such file or directory
[pid=22226] <process did exit: exitCode=127, signal=null>Error
at /home/tanguy/dev/flex-wrap-layout/examples/node_modules/playwright/lib/server/webkit/wkConnection.js:105:63
at new Promise (<anonymous>)
at WKSession.send (/home/tanguy/dev/flex-wrap-layout/examples/node_modules/playwright/lib/server/webkit/wkConnection.js:104:16)
at Function.connect (/home/tanguy/dev/flex-wrap-layout/examples/node_modules/playwright/lib/server/webkit/wkBrowser.js:72:37)
at WebKit._connectToTransport (/home/tanguy/dev/flex-wrap-layout/examples/node_modules/playwright/lib/server/webkit/webkit.js:32:38)
at WebKit._innerLaunch (/home/tanguy/dev/flex-wrap-layout/examples/node_modules/playwright/lib/server/browserType.js:131:36)
at async ProgressController.run (/home/tanguy/dev/flex-wrap-layout/examples/node_modules/playwright/lib/server/progress.js:79:28)
at async WebKit.launch (/home/tanguy/dev/flex-wrap-layout/examples/node_modules/playwright/lib/server/browserType.js:78:25)
at async BrowserServerLauncherImpl.launchServer (/home/tanguy/dev/flex-wrap-layout/examples/node_modules/playwright/lib/browserServerImpl.js:58:25)
at async PlaywrightRunner.launchServer (/home/tanguy/dev/flex-wrap-layout/examples/node_modules/jest-playwright-preset/lib/PlaywrightRunner.js:68:44)
Solution:
sudo apt-get install gstreamer1.0-plugins-bad
same issue here on arch linux
Missing libraries are: libicui18n.so.66 libicuuc.so.66 libgstcodecparsers-1.0.so.0 libwebp.so.6 libenchant.so.1After linking system libraries with above i get the error below
[err] /home/username/.cache/ms-playwright/webkit-1402/minibrowser-wpe/bin/MiniBrowser: symbol lookup error: /home/username/.cache/ms-playwright/webkit-1402/minibrowser-wpe/lib/libWPEWebKit-1.0.so.3: undefined symbol: u_strToLower_66
Install the correct version of libicu manually:
wget 'http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu66_66.1-2ubuntu2_amd64.deb' -O /tmp/libicu66.deb
dpkg -i /tmp/libicu66.deb
Missing libraries are:
libicui18n.so.66
libicuuc.so.66
libwebp.so.6
libenchant.so.1
Manjaro: I solved it by installing the following libs: aur/enchant1.6 aur/icu66 aur/libwebp052
Missing libraries are: libicui18n.so.66 libicuuc.so.66 libwebp.so.6 libenchant.so.1Manjaro: I solved it by installing the following libs: aur/enchant1.6 aur/icu66 aur/libwebp052
I did that too, but I still had some missing libraries, so I had to also install aur/libffi7 And run this command: sudo ln -s /usr/lib/libpcre.so /usr/lib/libpcre.so.3 After that the problem was gone
I ended up installing a bunch more dependencies than the ones described here and here what I did it pretty much put the name of the dependency and "arch" on google to see the parent package and install each one of them.
using arch wsl, I installed these package and solved it yay -S enchant icu66 libwebp gtk3 nss alsa-lib dbus-glib
using arch wsl, I installed these package and solved it yay -S enchant icu66 libwebp gtk3 nss alsa-lib dbus-glib
can everyone confirm this?
Microsoft should provide also an option for Arch based operative systems.
❯ uname -r
6.0.1-arch2-1
yay -S libffi7 enchant1.6 icu66 libwebp052
sudo ln -s libicui18n.so.67 libicui18n.so.66
sudo ln -s libicuuc.so.67 libicuuc.so.66
sudo ln -s libwebp.so.7 libwebp.so.6
sudo ln -s /usr/lib/libffi /usr/lib/libffi.so.8.1.2
i wouldn't call it "runs everywhere" :laughing: Anyways, my arch error after all comments in this thread is:
1) [webkit] › example.spec.ts:3:5 › has title ────────────────────────────────────────────────────
browserType.launch:
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Missing libraries: ║
║ libflite_cmu_us_awb.so.1 ║
║ libflite_cmu_us_kal.so.1 ║
║ libflite_cmu_us_rms.so.1 ║
╚══════════════════════════════════════════════════════╝
Playwright - 1.31.0 Arch - 6.1.12-arch1-1
@slch Had the exact same missing dependencies. Here's how to add the missing libraries:
- Download flite1 package from: https://builds.garudalinux.org/repos/chaotic-aur/x86_64/flite1-1.4-5-x86_64.pkg.tar.zst
- Extract the tar (7z x flite1-1.4-5-x86_64.pkg.tar.zst)
- Copy the required files to
/usr/lib:
cd <extract_location>/usr/lib
sudo cp libflite_cmu_us_awb.so.1 libflite_cmu_us_kal.so.1 libflite_cmu_us_rms.so.1 /usr/lib
Where extract_location is where you extracted the package.
Related ref: https://github.com/microsoft/playwright/issues/8100#issuecomment-1554876306