{"record":{"id":"0ca9309393e6f8a5","repo":"wezterm/wezterm","slug":"no-size-information-available","errorCode":null,"errorMessage":"no size information available","messagePattern":"no size information available","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"termwiz/src/caps/probed.rs","lineNumber":236,"sourceCode":"                                }\n                            }\n                            _ => {\n                                done = true;\n                            }\n                        },\n                        _ => {\n                            done = true;\n                        }\n                    },\n                    _ => {\n                        done = true;\n                    }\n                }\n            });\n        }\n\n        if size.rows == 0 && size.cols == 0 {\n            bail!(\"no size information available\");\n        }\n\n        Ok(size)\n    }\n}\n","sourceCodeStart":218,"sourceCodeEnd":242,"githubUrl":"https://github.com/wezterm/wezterm/blob/3ff7522b9617ec920f7fbdb22b57e93d42d93ee9/termwiz/src/caps/probed.rs#L218-L242","documentation":"Thrown by the terminfo/size probing code in termwiz (caps/probed.rs). probe_size writes the XTWINOPS window-report queries (CSI 14 t / 16 t / 18 t) to the terminal and parses replies with the vt parser. It bails with 'no size information available' when the read loop ends and the parser never decoded a Window::ResizeWindowCells or ReportCellSizePixelsResponse report, leaving rows and cols at 0. The catch-all `done = true` arms at lines 220-230 also end the loop early on any unexpected reply, so a terminal that answers with something other than the expected CSI window reports produces the same error.","triggerScenarios":"Calling TerminalCapabilities::probe_terminal / probe_size on a terminal that does not implement xterm window reporting: it ignores CSI 14/16/18 t, replies with an unrecognized sequence (which trips `done = true`), or replies after the read loop has already given up. ConPTY sessions that emit xtversion queries but no size report, plain `linux` console, `TERM=dumb`, and pipes instead of ptys all hit this.","commonSituations":"Running termwiz/wezterm-based TUI apps under CI where there is no real TTY; inside screen/tmux configurations that swallow window-report queries; over serial consoles; with TERM unset or set to a minimal terminfo entry; after a terminal emulator upgrade that changed which XTWINOPS modes it supports.","solutions":["Run inside a modern xterm-compatible terminal (WezTerm, xterm, kitty, Windows Terminal via ConPTY) that answers CSI 14 t / 16 t / 18 t","Set TERM to a full-featured entry such as xterm-256color instead of dumb, linux, or an unknown value","If you only need cell dimensions, skip the probe and use Terminal::get_size_in_cells / UnixTty::get_size (ioctl TIOCGWINSZ), which do not depend on terminal replies","When embedding termwiz, wrap probe_size in a timeout/retry so slow terminals get a chance to answer before you give up","If you maintain the terminal emulator, implement XTWINOPS window reports (modes 14, 16, 18)"],"exampleFix":"// before\nlet size = probe_size(&mut read, &mut write, false).await?; // bails: no size information available\n// after: fall back to the kernel-reported size when the terminal ignores XTWINOPS\nlet size = match probe_size(&mut read, &mut write, false).await {\n    Ok(size) => size,\n    Err(_) => {\n        let (cols, rows) = terminal.get_size_in_cells()?; // ioctl(TIOCGWINSZ)\n        Size { rows, cols, xpixel: 0, ypixel: 0 }\n    }\n};","handlingStrategy":"fallback","validationCode":"// before probing, make sure we are on a real terminal that can answer\nif unsafe { libc::isatty(libc::STDOUT_FILENO) } != 1 {\n    return fallback_size(); // no tty => the probe cannot succeed\n}","typeGuard":null,"tryCatchPattern":"let size = match probe_size(&mut read, &mut write, false).await {\n    Ok(size) => size,\n    Err(_) => {\n        // terminal ignores XTWINOPS; use ioctl(TIOCGWINSZ)\n        let (cols, rows) = terminal.get_size_in_cells()?;\n        Size { rows, cols, xpixel: 0, ypixel: 0 }\n    }\n};","preventionTips":["Test on terminals known to implement XTWINOPS (WezTerm, xterm, kitty, Windows Terminal) before shipping size-probe-dependent features","Never rely on escape-sequence probing as the only size source; always pair it with an ioctl/env-var fallback","Set TERM to a full terminfo entry in your app's documented supported environments"],"tags":["termwiz","terminal","size-probe","xtwinops","escape-sequence"],"backgroundTag":"terminal-size-detection-failed","analyzedSha":"3ff7522b9617ec920f7fbdb22b57e93d42d93ee9","analyzedAt":"2026-08-20T04:47:31.434Z","contentChangedAt":"2026-08-20T04:47:31.434Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}