{"record":{"id":"57b00bbcd8fc146b","repo":"zed-industries/zed","slug":"prompt-for-paths-is-not-supported-on-the-web","errorCode":null,"errorMessage":"prompt_for_paths is not supported on the web","messagePattern":"prompt_for_paths is not supported on the web","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/gpui_web/src/platform.rs","lineNumber":432,"sourceCode":"                *self.active_window.borrow_mut() = Some(handle);\n                Ok(Box::new(window))\n            }\n            Err(error) => {\n                let canvas: &web_sys::Element = canvas_for_cleanup.as_ref();\n                canvas.remove();\n                self.window_lifecycle.set(WebWindowLifecycle::Unavailable);\n                Err(error)\n            }\n        }\n    }\n\n    fn window_appearance(&self) -> WindowAppearance {\n        let Ok(Some(media_query)) = self\n            .browser_window\n            .match_media(\"(prefers-color-scheme: dark)\")\n        else {\n            return WindowAppearance::Light;\n        };\n        if media_query.matches() {\n            WindowAppearance::Dark\n        } else {\n            WindowAppearance::Light\n        }\n    }\n\n    fn open_url(&self, url: &str) {\n        if let Err(error) = self.browser_window.open_with_url(url) {\n            log::warn!(\"Failed to open URL '{url}': {error:?}\");\n        }\n    }\n\n    fn on_open_urls(&self, callback: Box<dyn FnMut(Vec<String>)>) {\n        self.callbacks.borrow_mut().open_urls = Some(callback);\n    }\n\n    fn register_url_scheme(&self, _url: &str) -> Task<Result<()>> {","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/gpui_web/src/platform.rs#L414-L450","documentation":"Sentinel from the web platform's prompt_for_paths: browsers cannot open native file-open dialogs, so the oneshot channel immediately receives this error. It always fires on the web when the multi-file open prompt API is called — an unimplemented capability, not a runtime fault.","triggerScenarios":"Thrown at crates/gpui_web/src/platform.rs:432 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an HTML input type=file or drag-and-drop based picker on the web platform","Gate file-dialog UI behind platform capability checks instead of calling and handling the error","Callers can detect this sentinel and degrade gracefully (hide the open-file button)"],"exampleFix":null,"handlingStrategy":"validation","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-14T00:17:10.932Z"}