Skip to content

Identify(h) advertised over D-Bus but call returns UnknownMethod (Qt 6.11) #376

Description

@svan71

SUMMARY | 问题概要

org.desktopspec.ApplicationManager1.Identify is present in D-Bus introspection (signature hsoa{sa{sv}}), but live method calls with a valid unix:fd (h) fail with:

org.freedesktop.DBus.Error.UnknownMethod
No such method 'Identify' in interface 'org.desktopspec.ApplicationManager1'
at object path '/org/desktopspec/ApplicationManager1' (signature 'h')

This leaves Treeland's treeland-session-helper with an empty appId when resolving a newly mapped toplevel, which breaks prelaunch splash matching (real window + lingering Loading... splash / dual SurfaceWrappers).

Related design discussions: #276 (pidfd→pid TOCTOU), #278 (Identify via pid design). This report is specifically about registration/dispatch: the method is advertised but not invokable.

Environment | 环境

Component Version
OS Arch Linux x86_64
dde-application-manager 1.2.58 (Arch extra, also reproduced with a clean rebuild of the same tag)
Qt 6.11.1 (qt6-base)
Session Treeland / Wayland (DDE)
treeland (stock) 0.8.15 (session-helper calls Identify)

Steps to reproduce | 复现步骤

  1. Start a Treeland/DDE session with Application Manager running.
  2. Confirm introspection lists the method:
busctl --user introspect org.desktopspec.ApplicationManager1 \
  /org/desktopspec/ApplicationManager1 \
  org.desktopspec.ApplicationManager1 | grep Identify
# → .Identify  method  h  soa{sa{sv}}
  1. Launch an app that uses prelaunch splash (e.g. Deepin Terminal) from the launcher, or call Identify the same way Treeland does (Qt QDBusInterface / official app-identifier / Gio) with a real process pidfd.
  2. Observe session-helper / client error:
DBus Identify failed ... method= "Identify" error=
"No such method 'Identify' in interface 'org.desktopspec.ApplicationManager1'
 at object path '/org/desktopspec/ApplicationManager1' (signature 'h')"
respond sent N ""

Expected | 期望

  • Introspected Identify(h) is invokable.
  • Successful calls return a non-empty application id (and instance path / info as documented).

Actual | 实际

  • Introspect shows Identify.
  • Call with signature h returns UnknownMethod.
  • Callers (including stock treeland-session-helper) treat this as failure and respond with an empty appId.

Additional notes | 补充

  • Reproduced with:
    • Qt D-Bus client (same path treeland-session-helper uses)
    • Gio
    • Official app-identifier tooling
  • A fresh rebuild of AM 1.2.58 still exhibits the failure on this host.
  • Minimal standalone Qt D-Bus servers that export a method with signature h work on the same Qt 6.11 stack — so this appears AM registration/adaptor-path specific, not a blanket “Qt 6.11 cannot handle h” issue.
  • Method body exists in AM source (ApplicationManager1Service::Identify(const QDBusUnixFileDescriptor &...)).
  • Workaround used on the compositor side: if Identify fails, parse the process cgroup unit name app-DDE-<id>@*.service as a fallback appId (local treeland-session-helper patch only; not a substitute for fixing AM).

Impact | 影响

Prelaunch splash cannot be matched to the real toplevel when appId resolve is empty → dual windows / stuck Loading splash until prelaunchSplashTimeoutMs (typically ~5s). Visible with Terminal, Calculator, Chrome, etc. under Treeland on Arch + Qt 6.11.

Happy to provide more logs, a minimal Qt caller, or test a patch build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions