asciinema/asciinema · error

not an asciicast v3 file

Error message

not an asciicast v3 file

What it means

Sentinel validation error from the asciicast v3 parser's open(): the first line parsed as a JSON header but its version field is not 3. The input is an older asciicast (v1 or v2) or not an asciicast file, so the v3 parser cannot handle it.

Source

Thrown at src/asciicast/v3.rs:78

enum V3EventCode {
    Output,
    Input,
    Resize,
    Marker,
    Exit,
    Other(char),
}

pub struct Parser {
    header: V3Header,
    prev_time: Duration,
}

pub fn open(header_line: &str) -> Result<Parser> {
    let header = serde_json::from_str::<V3Header>(header_line)?;

    if header.version != 3 {
        bail!("not an asciicast v3 file")
    }

    Ok(Parser {
        header,
        prev_time: Duration::from_micros(0),
    })
}

impl Parser {
    pub fn parse<'a, I: Iterator<Item = io::Result<String>> + Send + 'a>(
        mut self,
        lines: I,
    ) -> Asciicast<'a> {
        let term_theme = self.header.term.theme.as_ref().map(|t| t.into());

        let header = Header {
            term_cols: self.header.term.cols,
            term_rows: self.header.term.rows,

View on GitHub (pinned to 7749806198)

Solutions

  1. Detect the version from the header line and dispatch to the matching loader
  2. Upgrade the recording to asciicast v3 format before loading
  3. Show the user which version was detected and what is supported
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/asciicast/v3.rs:78 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of asciinema/asciinema@7749806198 (2026-09-03). Data as JSON: /api/errors/f8610878840c6937. Report an issue: GitHub.