Skip to content

fix: select compatible AppImage media runtime - #1033

Open
xiaofan4122 wants to merge 3 commits into
alphaXiv:mainfrom
xiaofan4122:fix/linux-appimage-media
Open

xiaofan4122 wants to merge 3 commits into
alphaXiv:mainfrom
xiaofan4122:fix/linux-appimage-media

Conversation

@xiaofan4122

@xiaofan4122 xiaofan4122 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1032

Summary

An HTML preview with video or Web Audio can abort the AppImage's WebKit process when its bundled GStreamer loads missing or incompatible host plugins. The original v0.2.25 package reproduces this on Arch and Ubuntu 24.04; Ubuntu 22.04 works only when compatible media plugins are installed. Restoring the HTML tab can repeat the crash at startup.

Select a compatible complete runtime before opening the dashboard. A small helper discovers WebKitGTK 4.1 and checks the required GStreamer elements; AppRun rechecks with the selected library path and verifies the desktop binary's imports. A usable system stack keeps the session's GTK settings. Otherwise, the existing bundled WebKit is checked against compatible host media plugins. If neither works, a native dialog gives installation commands and exits instead of starting a broken window.

Media plugins and FFmpeg dependencies remain system packages. This deliberately requires a usable media stack: machines that previously opened a non-media dashboard without those dependencies now receive installation instructions. linux/README.md documents Ubuntu/Debian and Arch packages. The loader override is scoped to the webview; child commands and update relaunches receive the session's original library path.

Both stable and Canary test system selection, the bundled fallback and missing dependencies. Stable rebuilds take packaging tools from the workflow revision, so old source tags need not contain the helper or test fixture.

Using the same existing v0.2.25 desktop executable, the baseline package is 99,985,912 bytes and the revised package is 99,990,008 bytes: 4 KiB extra, both approximately 95.4 MiB. No media plugins or codec dependencies are added to the image. Installing missing system packages still consumes shared system disk space.

Test plan

  • Same built AppImage: native system runtime, dashboard and sandboxed media probe pass on Ubuntu 22.04, Ubuntu 24.04 and Debian 12 under Xvfb in containers. Helper executable/library maps confirm the selected stack.
  • Arch x86_64: real project Files → HTML preview succeeds without a manual library-path override. Restart restores the preview; maps show system WebKit/GStreamer/GLib.
  • Ubuntu 22.04 without system WebKit: bundled fallback passes dashboard and media checks with compatible system plugins.
  • Missing system WebKit/media: installation dialog appears before the dashboard; light/dark appearance and Escape closure verified, launch exits 1.
  • A registry populated by the incompatible old runtime is usable after switching to Ubuntu 24.04's native stack.
  • 45 script tests cover runtime selection, binary-load rejection, rechecking the final library path, missing dependencies, links and session settings. External SDK ABI fixtures exercise the real checker.
  • 10 shell-environment and 7 process Rust tests pass; original library paths are restored for host commands. cargo fmt, cargo clippy --all-targets --locked -- -D warnings, strict C compilation, shell checks, actionlint and offline zizmor pass. Cargo emits existing manifest warnings.

Runtime package tests reuse a source-built v0.2.25 executable; the Rust environment changes are tested from this PR's v0.2.27 source. Native ARM64 package execution, real Wayland sessions, macOS/Windows windows, full audio playback and subtitles were not exercised in this local matrix. The media probe checks AudioContext initialization and a decoded H.264 frame/green pixel. Optional WebVTT/GL-sink warnings remain. The release attachment workflow itself has not been dispatched.

Desktop evidence

Synthetic report and evidence notes: https://github.com/xiaofan4122/OpenResearch/tree/46db27683c98aded9e83220df0248ed4b573e23f. The source-built test runtime is marked Dev; no private report is included.

Before:

Original package freezes on media preview

After automatic system runtime selection:

Small AppImage renders the synthetic video

Missing dependencies:

Installation instructions before dashboard startup

Dark appearance.

Assisted-by: Codex

WebKit discovers GStreamer plugins at runtime, so ELF dependency deployment
omits the media elements needed by HTML previews. Bundle compatible plugins,
their codec dependencies and the scanner, and relocate their search paths.

Exercise Web Audio initialization and video frame decoding using the bundled
WebKit runtime in both stable and Canary package smoke tests.

Closes alphaXiv#1032

Assisted-by: Codex
@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issue was established.

Summary

The AppImage now checks the system WebKitGTK/GStreamer stack before trying its bundled fallback.

  • The Linux AppImage chooses a media runtime that can open the dashboard.
  • Commands started by the app keep the session's library path.

No new actionable issues were established. This review inspected source; it did not run an AppImage or repeat the reported desktop tests.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Start AppImage] --> B{System media checks and binary load pass?}
  B -->|Yes| C[Use system runtime and session GTK settings]
  B -->|No| D[Apply bundled GTK settings]
  D --> E{Bundled media checks and binary load pass?}
  E -->|Yes| F[Use bundled runtime]
  E -->|No| G[Show installation instructions and exit]
  C --> H[Open dashboard]
  F --> H
Loading

Reviews (3) · Last reviewed commit: "fix: select compatible AppImage media ru..." · Reviewed by Greptile

Comment thread .github/workflows/release-linux-app.yml Resolved
Keep release source checked out at source-sha, but take Linux packaging
scripts and assets from the workflow revision. Old release tags do not
contain the new media probe or its fixture, so mixing current workflow
commands with those old scripts fails before upload.

Assisted-by: Codex
@xiaofan4122

Copy link
Copy Markdown
Contributor Author

comment written by Codex

@greptileai Please re-review the current head, fbf3b05. The older-release packaging finding is fixed and the original thread has a reply describing the old-source packaging and isolated media smoke checks.

Prefer a compatible system WebKit/GStreamer stack and keep the existing
bundled WebKit fallback with compatible host media plugins. Check the media
elements and desktop imports before launch; show install instructions if
neither stack can run instead of restoring a tab that aborts WebKit.

Keep codec dependencies off the image. Restore the session's library path
for child processes, and cover system, fallback and missing-runtime paths.

Assisted-by: Codex
@xiaofan4122 xiaofan4122 changed the title fix: bundle AppImage media plugins fix: select compatible AppImage media runtime Nov 14, 2026
@xiaofan4122

Copy link
Copy Markdown
Contributor Author

comment written by Codex

@greptileai Please review current head 630ae7f. The final implementation selects a compatible system runtime and retains the original bundled fallback instead of adding media plugins/codecs to each image. The PR description has been rewritten around the resulting behavior, installation requirements, measured size and validation limits. The prior old-release tooling fix remains.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux AppImage crashes on HTML audio/video previews

1 participant