Skip to content

[BUG] Webkit problem with libwebp-1.1.0-1, error while loading shared libraries: libwebp.so.6 #2621

@tahmid-shahriar

Description

@tahmid-shahriar

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions