{"record":{"id":"25deaabc6e4989ff","repo":"rustdesk/rustdesk","slug":"create-session-error","errorCode":null,"errorMessage":"create-session: {error}","messagePattern":"create-session: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"libs/scrap/src/wayland/pipewire.rs","lineNumber":814,"sourceCode":"    );\n\n    let mut is_support_restore_token = false;\n    if let Ok(version) = screencast_portal::version(&portal) {\n        if version >= 4 {\n            is_support_restore_token = true;\n        }\n    }\n\n    // The following code may be improved.\n    // https://flatpak.github.io/xdg-desktop-portal/#:~:text=To%20avoid%20a%20race%20condition\n    // To avoid a race condition\n    // between the caller subscribing to the signal after receiving the reply for the method call and the signal getting emitted,\n    // a convention for Request object paths has been established that allows\n    // the caller to subscribe to the signal before making the method call.\n    handle_response(\n        &conn,\n        get_request_path(&conn, create_session_handle_token)\n            .map_err(|e| anyhow!(dbus_stage_err(\"create-session\", &e)))?,\n        on_create_session_response(\n            fd.clone(),\n            streams.clone(),\n            session.clone(),\n            trace.clone(),\n            is_support_restore_token,\n            capture_cursor,\n        ),\n        trace.clone(),\n        PortalStage::CreateSession,\n    )\n    .map_err(|e| anyhow!(dbus_stage_err(\"create-session\", &e)))?;\n    if is_server_running() {\n        let _ = screencast_portal::create_session(&portal, args)\n            .map_err(|e| anyhow!(dbus_stage_err(\"create-session\", &e)))?;\n    } else {\n        let _ = remote_desktop_portal::create_session(&portal, args)\n            .map_err(|e| anyhow!(dbus_stage_err(\"create-session\", &e)))?;","sourceCodeStart":796,"sourceCodeEnd":832,"githubUrl":"https://github.com/rustdesk/rustdesk/blob/91c9fccbb0f7bfe5f11644d5fbdec9b23fa10540/libs/scrap/src/wayland/pipewire.rs#L796-L832","documentation":"The CreateSession portal flow failed while obtaining the Request object path: get_request_path could not compute/uniquefy the request token path before subscribing to the Response signal. dbus_stage_err wraps it with the 'create-session' stage label.","triggerScenarios":"request_remote_desktop calls get_request_path(&conn, create_session_handle_token) and the underlying unique name / token extraction fails (e.g. malformed unique bus name, bus connection degraded).","commonSituations":"D-Bus daemon restarted mid-call, unusual bus implementations (dbus-broker quirks), or connection established but unique name unavailable.","solutions":["Retry the whole request_remote_desktop flow — transient bus failures resolve after reconnect.","Restart the D-Bus session daemon if it was reloaded during the call.","Verify the session bus is dbus-daemon or dbus-broker with normal unique-name behavior.","Update zbus/rustdesk version if get_request_path fails against a newer bus implementation."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match get_capturables() {\n    Err(e) if e.to_string().contains(\"create-session\") => {\n        // transient bus failure: reconnect and retry once\n        std::thread::sleep(Duration::from_millis(500));\n        get_capturables()\n    }\n    r => r,\n}","preventionTips":["Retry the full portal flow on transient D-Bus failures.","Restart the session bus daemon if it was reloaded mid-call.","Keep zbus / rustdesk versions current for dbus-broker compatibility.","Check bus health (`busctl --user status`) before long capture sessions."],"tags":["linux","wayland","dbus","portal","pipewire"],"backgroundTag":"dbus-request-path-failed","analyzedSha":"91c9fccbb0f7bfe5f11644d5fbdec9b23fa10540","analyzedAt":"2026-09-10T19:53:44.083Z","contentChangedAt":"2026-09-10T19:53:44.083Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}