kovidgoyal/kitty · error
failed to export properties with error: %w
Error message
failed to export properties with error: %w
What it means
Raised by Portal.ExportInterface when prop.Export fails while exporting the interface's properties (org.freedesktop.DBus.Properties). Wraps the godbus prop package error.
Source
Thrown at kittens/desktop_ui/portal.go:141
Name: a.Name,
Type: a.Type,
Direction: utils.IfElse(a.Out, "out", "in"),
}
}
methods = append(methods, introspect.Method{
Name: method_name,
Args: meth_args,
})
}
}
if err = conn.ExportWithMap(object, method_map, op, interface_name); err != nil {
return fmt.Errorf("failed to export interface: %s at object path: %s with error: %w", interface_name, object_path, err)
}
var properties []introspect.Property
p := prop.Map{interface_name: prop_spec}
if len(prop_spec) > 0 {
if props, err := prop.Export(conn, op, p); err != nil {
return fmt.Errorf("failed to export properties with error: %w", err)
} else {
properties = props.Introspection(interface_name)
}
}
var signals []introspect.Signal
if len(signal_spec) > 0 {
for signal_name, args := range signal_spec {
sig_args := make([]introspect.Arg, len(args))
for i, a := range args {
sig_args[i] = introspect.Arg{
Name: a.Name,
Type: a.Type,
Direction: "out",
}
}
signals = append(signals, introspect.Signal{
Name: signal_name,
Args: sig_args,View on GitHub (pinned to 6d5d0c4406)
Solutions
- Ensure property spec values are valid dbus.Variant-compatible types
- Avoid exporting the same object path/interface twice on one connection
- Check the wrapped error for the exact marshalling failure
- Restart the kitten server so the bus state is clean
Defensive patterns
Strategy: try-catch
Try / catch
err := portal.Start()
if err != nil && strings.Contains(err.Error(), "failed to export properties") {
log.Printf("property export failed: %v", err)
} Prevention
- Use plain scalar dbus types in PropSpec values
- Avoid exporting the same path twice
When it happens
Trigger: Passing a non-empty prop_spec whose property values have signatures that cannot be marshalled, or exporting properties at an object path where the properties interface already exists.
Common situations: Duplicate property export on the same path; running two portal instances over one connection; invalid Variant types in the property spec.
Related errors
- failed to export interface: %s at object path: %s with error
- failed to export introspected methods with error: %w
- could not connect to session D-Bus: %s
- failed to register dbus name: %v
- can't register D-Bus name: name already taken
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/e65cc4597fcb4d7e.
Report an issue: GitHub.