zed-industries/zed · error · anyhow::Error
Failed to launch kernel: {body}
Error message
Failed to launch kernel: {body} What it means
Raised in launch_remote_kernel when the HTTP POST to the remote server's /kernels endpoint returns a non-success status. The response body (the server's error message) is interpolated into the message, telling the user why the remote kernel process could not be launched.
Source
Thrown at crates/repl/src/kernels/remote_kernels.rs:55
// Note: since the path we have locally may not be the same as the one on the remote server,
// we don't send it. We'll have to evaluate this decision along the way.
path: None,
};
let kernel_launch_request = serde_json::to_string(&kernel_launch_request)?;
let request = Request::builder()
.method("POST")
.uri(&remote_server.api_url("/kernels"))
.header("Authorization", format!("token {}", remote_server.token))
.body(AsyncBody::from(kernel_launch_request))?;
let response = http_client.send(request).await?;
if !response.status().is_success() {
let mut body = String::new();
response.into_body().read_to_string(&mut body).await?;
anyhow::bail!("Failed to launch kernel: {body}");
}
let mut body = String::new();
response.into_body().read_to_string(&mut body).await?;
let response: jupyter_websocket_client::Kernel = serde_json::from_str(&body)?;
Ok(response.id)
}
pub async fn list_remote_kernelspecs(
remote_server: RemoteServer,
http_client: Arc<dyn HttpClient>,
) -> Result<Vec<RemoteKernelSpecification>> {
let url = remote_server.api_url("/kernelspecs");
let request = Request::builder()
.method("GET")View on GitHub (pinned to f4178619ac)
Solutions
- Verify the remote Jupyter server is running and the API URL/token are correct
- Check that the requested kernel name exists on the remote server (`jupyter kernelspec list`)
- Inspect the returned body included in the error for the server-side cause
- Retry if the server was temporarily unavailable
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/repl/src/kernels/remote_kernels.rs:55 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/b793dd2120c03ed2.
Report an issue: GitHub.