Skip to content

[v3]wails3 generate appimage looks for GTK3 runtime files on the new GTK4 default (alpha.93) #5475

Closed

Description

@RALIST

Description

Since alpha.93, the default CGO build target on Linux is GTK4 / WebKitGTK 6 (the GTK3 path is retained behind -tags gtk3, per the alpha.93 changelog). But wails3 generate appimage still hard-codes the WebKit2GTK 4.x runtime filenames when packaging, so on a runner that only has the GTK4 toolchain installed, AppImage generation aborts:

Processing GTK files. [3/5] 60% | 1m13s
ERROR  Unable to locate all required files: libwebkit2gtkinjectedbundle.so
task: Failed to run task "linux:create:appimage": exit status 1

The hardcoded list:

https://github.com/wailsapp/wails/blob/v3.0.0-alpha.93/v3/internal/commands/appimage.go#L142

filesNeeded := []string{"WebKitWebProcess", "WebKitNetworkProcess", "libwebkit2gtkinjectedbundle.so"}

No branching on build tag, so even when the binary it's packaging is linked against WebKitGTK 6, the bundler still goes looking for the GTK3 set.

To Reproduce

  1. go.mod pinned to github.com/wailsapp/wails/v3 v3.0.0-alpha.93, no -tags gtk3.
  2. On Ubuntu 24.04: sudo apt install libgtk-4-dev libwebkitgtk-6.0-dev (no GTK3 dev packages).
  3. go install github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-alpha.93 — succeeds.
  4. go build ./... — succeeds, links against GTK4 / WebKitGTK 6.
  5. wails3 generate appimage -binary <APP> -icon <ICON> -desktopfile <FILE> -outputdir <DIR> -builddir <DIR> — fails as above.

Expected behaviour

When the binary is built against GTK4 / WebKitGTK 6, the AppImage bundler should pick the matching WebKitGTK 6 runtime files instead of the WebKit2GTK 4.x set — either by checking the build tag, ldd'ing the input binary, or taking a CLI flag.

Attempted Fixes

Workaround that works today: pin the app build to -tags gtk3 and put libgtk-3-dev libwebkit2gtk-4.1-dev back on the runner. The changelog calls this the "legacy" path, but pre-alpha.93 it was just "the path", so the takeaway from a downstream perspective is "GTK4 AppImage isn't wired up yet" rather than "GTK3 was deprecated and you missed it".

Additional context

Hit this when bumping a downstream project from alpha.90 → alpha.93. Same Taskfile.yml worked at alpha.90 with libgtk-3-dev libwebkit2gtk-4.1-dev installed; failed at alpha.93 with the GTK4 packages; recovered at alpha.93 with -tags gtk3 + GTK3 packages. Happy to attach wails doctor output from a matching Linux env if useful.

Activity

  1. changed the title [-]`wails3 generate appimage` looks for GTK3 runtime files on the new GTK4 default (alpha.93)[/-] [+][v3]`wails3 generate appimage` looks for GTK3 runtime files on the new GTK4 default (alpha.93)[/+] on May 18, 2026
  2. leaanthony commented on May 18, 2026

    @leaanthony
    Member

    Ah nice catch! I knew the switcharoo wouldn't be seamless 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingv3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions