slint-ui/slint · error · std::io::Error
Connection is no longer available
Error message
Connection is no longer available
What it means
Error "Connection is no longer available" thrown in slint-ui/slint.
Source
Thrown at internal/live-preview/remote/compilation.rs:21
use std::rc::Weak;
use i_slint_core::InternalToken;
use lsp_types::Url;
use super::connection::Connection;
pub fn init_compiler(connection: Weak<Connection>) -> slint_interpreter::Compiler {
let mut compiler = slint_interpreter::Compiler::new();
let file_loader_connection = connection.clone();
compiler.set_file_loader(move |path: &std::path::Path| {
let url = Url::from_file_path(path);
let path_display = path.display().to_string();
let connection = file_loader_connection.clone();
Box::pin(async move {
let Some(connection) = connection.upgrade() else {
return Some(Err(std::io::Error::new(
std::io::ErrorKind::BrokenPipe,
"Connection is no longer available",
)));
};
let Ok(url) = url else {
return Some(Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,
format!("Not an absolute file path: {path_display}"),
)));
};
Some(
connection.request_file(url).await.map(|file_content| {
String::from_utf8_lossy(&file_content.contents).to_string()
}),
)
})
});
View on GitHub (pinned to 3fd8f2ec03)
Solutions
- Reconnect the live-preview remote connection and retry the operation.
- Check the network/WebSocket between the viewer and the remote side.
When it happens
Trigger: Thrown at internal/live-preview/remote/compilation.rs:21 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of slint-ui/slint@3fd8f2ec03 (2026-08-19).
Data as JSON: /api/errors/8ad10f2df8ae0667.
Report an issue: GitHub.