playwright: [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 ?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 6
- Comments: 34 (2 by maintainers)
Commits related to this issue
- chore(playwright): run web server Run webkit browsers SEE https://github.com/microsoft/playwright/issues/2621#issuecomment-931530175 — committed to leosuncin/redux-offline-example by leosuncin 5 years ago
Manjaro: I solved it by installing the following libs: aur/enchant1.6 aur/icu66 aur/libwebp052
Solved the dependency issue on Arch Linux:
First I’ve installed these dependencies through yay and pacman package managers:
Thank you, @dmitriiweb, @vaziliybober
The libwebp052 AUR repository is no longer available, so you can do two things:
Build the libraries yourself
Use the newer libwebp AUR repository
Now only flite is missing
I’ve used an approach suggested by @simontong here #8100
Playwright should be working now.
Arch support would be nice!
I had missing
.soerrors, which I solved withNow I have this error:
Any ideas? Maybe the new errors is due to linking to the wrong versions, which I know isn’t the actual solution.
I’m running Manjaro and I’m encountering the same issue:
Is Arch support on the roadmap? Has anyone found a workaround?
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 am also using Arch, and got same errors.
i wouldn’t call it “runs everywhere” 😆 Anyways, my arch error after all comments in this thread is:
Playwright - 1.31.0 Arch - 6.1.12-arch1-1
can everyone confirm this?
Microsoft should provide also an option for Arch based operative systems.
@yury-s Arch Linux x86_64
Seems to do, just
sudo pacman -S --needed nss nspr at-spi2-core libcups libdrm dbus libxcb libxkbcommon at-spi2-core libx11 libxcomposite libxdamage libxext libxfixes libxrandr mesa pango cairo alsa-lib xorg-server-xvfbfixed mostly untouched vanilla ArchInstructions provided by @KorcakDaniel work perfectly on Manjaro Arch!
Thank you @KorcakDaniel, life saver! 🥳
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 directorySolution:
libxml2is also required on Arch and symlink created@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.
Nope, and yet it seems to be helpful with the latest playwright without installing anything else
I faced the longest list so far:
But playwright does work. (Haven’t tried taking a screenshot, reading the clipboard, or any of that fancy stuff)
For Amazonlinux (Fedora) it works for my case:
using arch wsl, I installed these package and solved it yay -S enchant icu66 libwebp gtk3 nss alsa-lib dbus-glib