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 4 years ago
- Reactions: 5
- Comments: 24 (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 2 years ago
Manjaro: I solved it by installing the following libs: aur/enchant1.6 aur/icu66 aur/libwebp052
I’m running Manjaro and I’m encountering the same issue:
Is Arch support on the roadmap? Has anyone found a workaround?
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 am also using Arch, and got same errors.
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
@yury-s Arch Linux x86_64
can everyone confirm this?
Microsoft should provide also an option for Arch based operative systems.
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
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:
@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.