#1730·JUCE

Linux: WebBrowserComponent shows nothing unless the GTK and WebKit development packages are installed

Author: jdfCreated Sep 6, 2026Updated Sep 6, 2026

Detailed steps on how to reproduce the bug

  1. On Ubuntu 24.04 or 22.04 (Debian and Fedora behave the same), install the runtime packages only: libwebkit2gtk-4.1-0 (or libwebkit2gtk-4.0-37) and libgtk-3-0, and make sure no -dev package for them is installed.
  2. Run any JUCE application or plugin that shows a WebBrowserComponent and call goToURL() on it, for example the DemoRunner's WebBrowserDemo built elsewhere and copied over.

What is the expected behaviour?

The page renders.

What is the actual behaviour?

The component stays blank and nothing is reported. WebKitSymbols in modules/juce_gui_extra/native/juce_WebBrowserComponent_linux.cpp opens the libraries with dlopen under their unversioned names (libgtk-3.so, libglib-2.0.so, libwebkit2gtk-4.1.so, libjavascriptcoregtk-4.1.so, libsoup-3.0.so, and the 4.0 equivalents). Distributions ship those unversioned names only in the development packages, as a symlink to the versioned library; a system with just the runtime packages has libwebkit2gtk-4.1.so.0 and libgtk-3.so.0. Every dlopen fails, isWebKitAvailable() is false, and Platform::init() returns before launching the child process, so goToURL does nothing.

On a user's machine (Ubuntu, no development packages):

$ ls -l /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.1.so* /usr/lib/x86_64-linux-gnu/libgtk-3.so*
lrwxrwxrwx 1 root root       21 Jan 27  2025 /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 -> libgtk-3.so.0.2409.32
-rw-r--r-- 1 root root  8156632 Jan 27  2025 /usr/lib/x86_64-linux-gnu/libgtk-3.so.0.2409.32
lrwxrwxrwx 1 root root       28 Aug 21 19:04 /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.1.so.0 -> libwebkit2gtk-4.1.so.0.21.10
-rw-r--r-- 1 root root 94901008 Aug 21 19:04 /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.1.so.0.21.10

Reproduced in a container built from Ubuntu 22.04 with the development packages installed: the view renders; after removing only the unversioned symlinks (libgtk-3.so, libglib-2.0.so, libwebkit2gtk-4.0.so, libjavascriptcoregtk-4.0.so, libsoup-2.4.so), the same binary shows a blank view.

Trying each library under its versioned name as a fallback (libwebkit2gtk-4.1.so.0, libjavascriptcoregtk-4.1.so.0, libsoup-3.0.so.0, libgtk-3.so.0, libglib-2.0.so.0, and libwebkit2gtk-4.0.so.37, libjavascriptcoregtk-4.0.so.18, libsoup-2.4.so.1) makes the view render on that system. Pull request to follow.

Operating systems

Linux

What versions of the operating systems?

Ubuntu 24.04 (reported), Ubuntu 22.04 (reproduced)

Architectures

x86_64

Stacktrace

None; nothing crashes.

Plug-in formats (if applicable)

VST3 and a standalone application, identically.

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

The bug is present on the develop branch (04e167d)

Code of Conduct

  • I agree to follow the Code of Conduct