{"record":{"id":"ab5118cf6b190189","repo":"kovidgoyal/kitty","slug":"failed-to-export-interface-s-at-object-path-s","errorCode":null,"errorMessage":"failed to export interface: %s at object path: %s with error: %w","messagePattern":"failed to export interface: (.+?) at object path: (.+?) with error: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kittens/desktop_ui/portal.go","lineNumber":135,"sourceCode":"\tif len(method_spec) > 0 {\n\t\tfor method_name, args := range method_spec {\n\t\t\tmethod_map[method_name] = method_name\n\t\t\tmeth_args := make([]introspect.Arg, len(args))\n\t\t\tfor i, a := range args {\n\t\t\t\tmeth_args[i] = introspect.Arg{\n\t\t\t\t\tName:      a.Name,\n\t\t\t\t\tType:      a.Type,\n\t\t\t\t\tDirection: utils.IfElse(a.Out, \"out\", \"in\"),\n\t\t\t\t}\n\t\t\t}\n\t\t\tmethods = append(methods, introspect.Method{\n\t\t\t\tName: method_name,\n\t\t\t\tArgs: meth_args,\n\t\t\t})\n\t\t}\n\t}\n\tif err = conn.ExportWithMap(object, method_map, op, interface_name); err != nil {\n\t\treturn fmt.Errorf(\"failed to export interface: %s at object path: %s with error: %w\", interface_name, object_path, err)\n\t}\n\tvar properties []introspect.Property\n\tp := prop.Map{interface_name: prop_spec}\n\tif len(prop_spec) > 0 {\n\t\tif props, err := prop.Export(conn, op, p); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to export properties with error: %w\", err)\n\t\t} else {\n\t\t\tproperties = props.Introspection(interface_name)\n\t\t}\n\t}\n\tvar signals []introspect.Signal\n\tif len(signal_spec) > 0 {\n\t\tfor signal_name, args := range signal_spec {\n\t\t\tsig_args := make([]introspect.Arg, len(args))\n\t\t\tfor i, a := range args {\n\t\t\t\tsig_args[i] = introspect.Arg{\n\t\t\t\t\tName:      a.Name,\n\t\t\t\t\tType:      a.Type,","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/desktop_ui/portal.go#L117-L153","documentation":"Raised by Portal.ExportInterface when conn.ExportWithMap fails to export the D-Bus interface at the given object path. It wraps the underlying godbus error and identifies which interface and object path failed.","triggerScenarios":"Exporting a D-Bus interface when the connection is closed, the object path is invalid, or an interface with the same name is already exported on the connection.","commonSituations":"Starting the desktop-ui portal twice over the same bus connection; a malformed object path; the session bus connection dropped between connect and export.","solutions":["Ensure only one instance of the desktop-ui kitten server is running per session bus","Check the bus connection is alive (dbus.SessionBus() succeeded) before exporting","Verify the object path is a valid D-Bus path (starts with /, no trailing slash)","Inspect the wrapped %w error for the godbus-specific cause"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := portal.Start(); err != nil {\n    if strings.Contains(err.Error(), \"failed to export interface\") {\n        // inspect wrapped cause; likely duplicate export or dead connection\n    }\n}","preventionTips":["Call Start() once per process","Ensure a single portal instance owns the bus name"],"tags":["dbus","desktop-ui","kitty","ipc"],"backgroundTag":"dbus-export-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}