cloudflare/quiche · error
Error creating qlog file attempted path was
Error message
Error creating qlog file attempted path was {path:?}: {e} What it means
h3i panics when it cannot create the qlog file at the path the user supplied on the command line, right before writing session traces. std::fs::File::create failed, which means the directory doesn't exist, the path is invalid, or the process lacks write permission. This is a hard abort: without a qlog sink the session cannot be recorded.
Solutions
- Create the target directory first (mkdir -p <dir>) and re-run.
- Check write permissions on the directory, or run from a writable location.
- Verify the --qlog filename argument for typos and use an absolute path to avoid working-directory surprises.
Example fix
// before h3i --qlog out/trace.qlog ... // after mkdir -p out && h3i --qlog out/trace.qlog ...
Defensive patterns
Strategy: validation
Validate before calling
// shell [ -d "$(dirname "$QLOG_PATH")" ] && [ -w "$(dirname "$QLOG_PATH")" ] || mkdir -p "$(dirname "$QLOG_PATH")"
Prevention
- Always create the qlog output directory before running h3i.
- Use absolute, writable paths in CI sandboxes.
When it happens
Trigger: Running the h3i binary with a --qlog-style filename whose parent directory is missing, unwritable, or whose path is otherwise invalid, causing File::create to return Err.
Common situations: Typo in output directory; running in a read-only container or restricted CI sandbox; relative path resolved from an unexpected working directory; filename containing characters invalid on the filesystem.
Understand the failure class
Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.
Related errors
- Error creating file for
- Error creating qlog file attempted path was
- Expected stream_send on stream
- Expected stream_send on stream
- Expected stream_send on stream
AI-assisted analysis of cloudflare/quiche@9f96daa2c2 (2026-09-08).
Data as JSON: /api/errors/3ddfc4872729abb2.
Report an issue: GitHub.
Appendix: source
Thrown at h3i/src/main.rs:448
}
/// Makes a buffered writer for a qlog.
pub fn make_qlog_writer() -> std::io::BufWriter<std::fs::File> {
let mut path = std::env::current_dir().unwrap();
let now = time::SystemTime::now();
let filename = format!(
"{}-qlog.sqlog",
now.duration_since(time::UNIX_EPOCH).unwrap().as_millis()
);
path.push(filename.clone());
log::info!("Session will be recorded to {filename}");
match std::fs::File::create(&path) {
Ok(f) => std::io::BufWriter::new(f),
Err(e) =>
panic!("Error creating qlog file attempted path was {path:?}: {e}"),
}
}
pub fn make_streamer(
writer: Box<dyn std::io::Write + Send + Sync>,
) -> qlog::streamer::QlogStreamer {
let vp = qlog::VantagePointType::Client;
let trace = qlog::TraceSeq::new(
Some("h3i".into()),
Some("h3i".into()),
None,
Some(qlog::VantagePoint {
name: None,
ty: vp,
flow: None,
}),
vec![QUIC_URI.to_string(), HTTP3_URI.to_string()],View on GitHub (pinned to 9f96daa2c2)