{"record":{"id":"93323677c44dea11","repo":"kovidgoyal/kitty","slug":"failed-to-export-introspected-methods-with-error","errorCode":null,"errorMessage":"failed to export introspected methods with error: %w","messagePattern":"failed to export introspected methods with error: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kittens/desktop_ui/portal.go","lineNumber":178,"sourceCode":"\t\t\t})\n\t\t}\n\t}\n\n\tinterface_data := introspect.Interface{\n\t\tName:       interface_name,\n\t\tMethods:    methods,\n\t\tProperties: properties,\n\t\tSignals:    signals,\n\t}\n\tinterfaces := []introspect.Interface{\n\t\tintrospect.IntrospectData, interface_data,\n\t}\n\tif len(properties) > 0 {\n\t\tinterfaces = append(interfaces, prop.IntrospectData)\n\t}\n\tn := &introspect.Node{Name: object_path, Interfaces: interfaces}\n\tif err = conn.Export(introspect.NewIntrospectable(n), op, introspect.IntrospectData.Name); err != nil {\n\t\treturn fmt.Errorf(\"failed to export introspected methods with error: %w\", err)\n\t}\n\treturn\n}\n\nfunc (self *Portal) Start() (err error) {\n\tif self.bus, err = dbus.SessionBus(); err != nil {\n\t\treturn fmt.Errorf(\"could not connect to session D-Bus: %s\", err)\n\t}\n\treply, err := self.bus.RequestName(PORTAL_BUS_NAME, dbus.NameFlagDoNotQueue)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to register dbus name: %v\", err)\n\t}\n\tif reply != dbus.RequestNameReplyPrimaryOwner {\n\t\treturn fmt.Errorf(\"can't register D-Bus name: name already taken\")\n\t}\n\tprops := PropSpec{\n\t\t\"version\": {Value: uint32(1), Writable: false, Emit: prop.EmitFalse},\n\t}","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/desktop_ui/portal.go#L160-L196","documentation":"Raised by Portal.ExportInterface when conn.Export fails to export the org.freedesktop.DBus.Introspectable interface built from the generated introspection node. This is the final export step after methods and properties.","triggerScenarios":"The introspectable interface cannot be exported, typically because the connection is broken or the object path already hosts an introspectable implementation.","commonSituations":"Bus connection closed mid-setup; another portal backend already owning overlapping paths; concurrent Start() calls.","solutions":["Check for other running desktop-ui/portal processes on the session bus","Ensure Start() is called only once per Portal instance","Inspect the wrapped error from godbus for details","Retry after restarting the session bus if it was interrupted"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := portal.Start(); err != nil {\n    log.Fatalf(\"portal startup failed: %v\", err)\n}","preventionTips":["Treat any Start() failure as fatal for the server loop","Restart cleanly rather than retrying on a broken connection"],"tags":["dbus","desktop-ui","kitty","introspection"],"backgroundTag":"dbus-export-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}