flathub / flathub/org.zaproxy.ZAP

GUI fails to launch on Wayland

Open Beginner friendly
#23 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
0
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Since `--socket=x11` was changed to `--socket=fallback-x11` in `finish-args`, the ZAP Flatpak fails to start its GUI on any Wayland session.

### Environment

- ZAP Flatpak `2.17.0` from Flathub
- Manifest commit `ca403f042096` (merge of PR #22), built 2026-07-23
- Flatpak build (OSTree) commit `9da73aa2444a6d8f0e7e3194401aa013b607099b87441ea51ce64237edbe906f`
- Runtime `org.freedesktop.Platform/x86_64/25.08`
- Fedora Linux 44 (KDE Plasma Desktop Edition), Plasma 6.7.4 / KWin 6.7.4, Wayland session

### Steps to reproduce

1. On a Wayland session, install `org.zaproxy.ZAP` from Flathub.
2. Launch it from the desktop icon or run `flatpak run org.zaproxy.ZAP`.

**Expected:** the ZAP GUI opens.
**Actual:** the process exits within a second. `~/.ZAP/zap.log` shows:

```
INFO GuiBootstrap - ZAP 2.17.0 started ... cores: 16 maxMemory: 7 GB
FATAL GuiBootstrap - ZAP GUI is not supported on a headless environment.
Run ZAP inline or in daemon mode, use -help command line argument for more details.
```

### Root cause

`fallback-x11` grants the X11 socket only when Wayland is unavailable. Combined with `--socket=wayland`, a Wayland session therefore gets the Wayland socket and no X11. Inside the sandbox:

```console
$ flatpak run --command=sh org.zaproxy.ZAP -c 'echo "DISPLAY=[$DISPLAY]"; ls /tmp/.X11-unix/'
DISPLAY=[]
(empty)
```

ZAP's UI is Java Swing, and Java 17's AWT has no Wayland backend. With no `DISPLAY`, the JVM reports itself headless and `GuiBootstrap` treats that as fatal.

### Workaround

```console
$ flatpak override --user --socket=x11 org.zaproxy.ZAP
```

This restores normal launch, confirming the socket declaration is the cause.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Flatpak manifest at the change represented by commit ca403f042096, focusing on its finish-args socket declarations. Reproduce with flatpak run org.zaproxy.ZAP on a Wayland session and inspect DISPLAY and the launch log; done means the ZAP GUI opens without a user override and the headless-environment error no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, linux
Domain
desktop
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.