{"record":{"id":"e65cc4597fcb4d7e","repo":"kovidgoyal/kitty","slug":"failed-to-export-properties-with-error-w","errorCode":null,"errorMessage":"failed to export properties with error: %w","messagePattern":"failed to export properties with error: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kittens/desktop_ui/portal.go","lineNumber":141,"sourceCode":"\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,\n\t\t\t\t\tDirection: \"out\",\n\t\t\t\t}\n\t\t\t}\n\t\t\tsignals = append(signals, introspect.Signal{\n\t\t\t\tName: signal_name,\n\t\t\t\tArgs: sig_args,","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/desktop_ui/portal.go#L123-L159","documentation":"Raised by Portal.ExportInterface when prop.Export fails while exporting the interface's properties (org.freedesktop.DBus.Properties). Wraps the godbus prop package error.","triggerScenarios":"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.","commonSituations":"Duplicate property export on the same path; running two portal instances over one connection; invalid Variant types in the property spec.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"err := portal.Start()\nif err != nil && strings.Contains(err.Error(), \"failed to export properties\") {\n    log.Printf(\"property export failed: %v\", err)\n}","preventionTips":["Use plain scalar dbus types in PropSpec values","Avoid exporting the same path twice"],"tags":["dbus","desktop-ui","kitty","properties"],"backgroundTag":"dbus-export-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}