zed-industries/zed · error
prompt_for_paths is not supported on the web
Error message
prompt_for_paths is not supported on the web
What it means
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.
Source
Thrown at crates/gpui_web/src/platform.rs:432
*self.active_window.borrow_mut() = Some(handle);
Ok(Box::new(window))
}
Err(error) => {
let canvas: &web_sys::Element = canvas_for_cleanup.as_ref();
canvas.remove();
self.window_lifecycle.set(WebWindowLifecycle::Unavailable);
Err(error)
}
}
}
fn window_appearance(&self) -> WindowAppearance {
let Ok(Some(media_query)) = self
.browser_window
.match_media("(prefers-color-scheme: dark)")
else {
return WindowAppearance::Light;
};
if media_query.matches() {
WindowAppearance::Dark
} else {
WindowAppearance::Light
}
}
fn open_url(&self, url: &str) {
if let Err(error) = self.browser_window.open_with_url(url) {
log::warn!("Failed to open URL '{url}': {error:?}");
}
}
fn on_open_urls(&self, callback: Box<dyn FnMut(Vec<String>)>) {
self.callbacks.borrow_mut().open_urls = Some(callback);
}
fn register_url_scheme(&self, _url: &str) -> Task<Result<()>> {View on GitHub (pinned to 9d272b0363)
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)
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/gpui_web/src/platform.rs:432 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20).
Data as JSON: /api/errors/57b00bbcd8fc146b.
Report an issue: GitHub.