{"record":{"id":"c2663175a7a79768","repo":"zed-industries/zed","slug":"couldn-t-open-file-picker-due-to-missing-xdg-deskt","errorCode":null,"errorMessage":"Couldn't open file picker due to missing xdg-desktop-portal implementation.","messagePattern":"Couldn't open file picker due to missing xdg-desktop-portal implementation\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui_linux/src/linux/platform.rs","lineNumber":490,"sourceCode":"                    \"Open Folder\"\n                } else {\n                    \"Open File\"\n                };\n\n                let request = match ashpd::desktop::file_chooser::OpenFileRequest::default()\n                    .identifier(identifier.await)\n                    .modal(true)\n                    .title(title)\n                    .accept_label(options.prompt.as_ref().map(gpui::SharedString::as_str))\n                    .multiple(options.multiple)\n                    .directory(options.directories)\n                    .send()\n                    .await\n                {\n                    Ok(request) => request,\n                    Err(err) => {\n                        let result = match err {\n                            ashpd::Error::PortalNotFound(_) => anyhow!(FILE_PICKER_PORTAL_MISSING),\n                            err => err.into(),\n                        };\n                        let _ = done_tx.send(Err(result));\n                        return;\n                    }\n                };\n\n                let result = match request.response() {\n                    Ok(response) => Ok(Some(\n                        response\n                            .uris()\n                            .iter()\n                            .filter_map(|uri: &ashpd::Uri| url::Url::parse(uri.as_str()).ok())\n                            .filter_map(|uri: url::Url| uri.to_file_path().ok())\n                            .collect::<Vec<_>>(),\n                    )),\n                    Err(ashpd::Error::Response(_)) => Ok(None),\n                    Err(e) => Err(e.into()),","sourceCodeStart":472,"sourceCodeEnd":508,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/gpui_linux/src/linux/platform.rs#L472-L508","documentation":"Raised in prompt_for_paths when the ashpd xdg-desktop-portal OpenFileRequest fails to send: the system has no (or a broken) xdg-desktop-portal implementation, so native file/folder pickers cannot be shown.","triggerScenarios":"Thrown at crates/gpui_linux/src/linux/platform.rs:435 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install xdg-desktop-portal and a desktop backend (e.g. xdg-desktop-portal-gtk or -kde)","Ensure the portal service is running: `systemctl --user status xdg-desktop-portal`","Verify XDG_CURRENT_DESKTOP / portal environment is set correctly in the session","Fall back to a native file dialog path if the environment cannot provide portals"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}