question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] Enhance Debian 11 support especially with WebKit

See original GitHub issue

Users often use the official Node.js or Python images as Docker base images which are based on Debian (latest - 10) or only officially available with Debian based builds. GitHub Codespaces with Python (since official Python docker image) uses Debian as well. Currently we neither provide an official Dockerfile which can be used for Debian 10 nor it does work fully there since users have to compile libjpeg themselves and libicu60 is not available in their apt repos either.

If they use e.g. the Ubuntu deb package of libicu60 or compile it themselves from source, the headful (xvfb-run) WebKit variant works but the headless variant crashes.

Related issues:

Building WebKit on Debian 10:

apt update
apt install -y git zip
apt-get build-dep -y cockpit
git clone https://github.com/microsoft/playwright
git config --global user.email "max@schmitt.mx"
git config --global user.name "Max Schmitt"

# Prepare Playwright and install build deps
cd playwright
./browser_patches/prepare_checkout.sh webkit
yes | ./browser_patches/webkit/checkout/Tools/gtk/install-dependencies
cd ..

# Build gpgme
wget https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-1.14.0.tar.bz2
tar -xjvf gpgme-1.14.0.tar.bz2 
cd gpgme-1.14.0/
apt install -y libassuan-dev
./configure
make
make install
cd ..

# Build flatpak
wget https://github.com/flatpak/flatpak/releases/download/1.4.4/flatpak-1.4.4.tar.xz
tar -xvf flatpak-1.4.4.tar.xz
cd flatpak-1.4.4/
apt install -y libcap-dev libarchive-dev libfuse-dev libostree-dev libappstream-glib-dev
./configure
make
make install
cd ..

# Build WebKit
cd playwright
export JHBUILD_RUN_AS_ROOT=
./browser_patches/webkit/build.sh

curl -sL https://deb.nodesource.com/setup_12.x | bash -
apt-get install -y nodejs
./browser_patches/webkit/archive.sh $(pwd)/webkit.zip

When the built binaries will be used from the separate build, then it works fine. Used these requirements:

    libwoff1 \
    libopus0 \
    libwebp6 \
    libwebpdemux2 \
    libenchant1c2a \
    libgudev-1.0-0 \
    libsecret-1-0 \
    libhyphen0 \
    libgdk-pixbuf2.0-0 \
    libegl1 \
    libxslt1.1 \
    libgles2 \
    libnotify4 \
    libharfbuzz-icu0 \
    libvpx5 \
    libevent-2.1-6 \
    # gstreamer and plugins to support video playback in WebKit
    libgstreamer-gl1.0-0 \
    libgstreamer-plugins-bad1.0-0 \
    gstreamer1.0-plugins-good \

Next steps

  • Investigate why the page crashes in headless mode
  • Setup azure bots for building it on Debian.
  • Docs change that node:*-buster needs to be used because Node default images use Debian 9. Not sure how complicated it is to make them Debian 9 compatible too.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:68
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
aslushnikovcommented, Jul 13, 2022

Turns out this is not fixed yet!

2reactions
AlexDanielcommented, Feb 16, 2022

OK. Reporting back. I pulled libjpeg-turbo8 and libicu66 deb files from ubuntu and installed them in debian without any issue. I then ran npx playwright test (headless) and it seems to work. --headed option is working too. So far, so good. Though keep in mind that I’m on debian sid (unstable), so maybe that’s why it was so easy. Your mileage may vary.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release Notes for Debian 11 (bullseye), 64-bit ARM
There has been a lot of development on the Debian Installer since its previous official release with. Debian 10, resulting in improved hardware...
Read more >
Chapter 5. Issues to be aware of for buster - Debian
5.1. Upgrade specific items for buster · 5.1.1. Hidepid mount option for procfs unsupported · 5.1.2. ypbind fails to start with -no-dbus ·...
Read more >
Updated Debian 11: 11.5 released
The Debian project is pleased to announce the fifth update of its stable distribution Debian 11 (codename bullseye ).
Read more >
Debian Reference
Focus on smooth upgrade to the latest software packages in the testing archives. • Large number of supported hardware architectures.
Read more >
Debian -- Software Packages in "bullseye"
... hash function generator; ace-netsvcs (6.5.12+dfsg-3): ACE network service ... android-libselinux (10.0.0+r36-1): Security-Enhanced Linux for Android ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found