asciinema/asciinema

Error: Terminal does not support reporting screen sizes in pixels

ju1ius opened this issue · 6 comments

Describe the bug

Using the kitty terminal, running the icat kitten to display images causes the following error:

Error: Terminal does not support reporting screen sizes in pixels,
use a terminal such as kitty, WezTerm, Konsole, etc. that does.

Steps to Reproduce

  1. Run the kitty terminal
  2. Start a new asciinema recording: asciinema rec /path/to/file.cast
  3. Try to display an image by running kitten icat /path/to/some/image.png
  4. See error

Expected behavior

The image should show correctly.
In addition, the error message is confusing since I'm actually using a terminal that «supports reporting screen sizes in pixels».

Versions:

  • OS: Debian sid
  • asciinema cli: 2.4.0

Additional context:

Here's the cast:
{"version": 2, "width": 98, "height": 28, "timestamp": 1700476942, "env": {"SHELL": "/bin/bash", "TERM": "xterm-kitty"}}
[0.24583, "o", "\u001b[?2004h\u001b[1;36m~/tmp/demo\u001b[0m \r\n\u001b[90m➜\u001b[0m "]
[1.808961, "o", "k"]
[2.042065, "o", "i"]
[2.214341, "o", "t"]
[2.386478, "o", "t"]
[2.607982, "o", "e"]
[2.833577, "o", "n"]
[3.127023, "o", " "]
[3.38527, "o", "i"]
[3.604812, "o", "c"]
[3.833219, "o", "a"]
[4.040119, "o", "t"]
[4.523513, "o", " "]
[5.052099, "o", "~"]
[5.580483, "o", "/"]
[6.179512, "o", "i"]
[6.277611, "o", "m"]
[6.445922, "o", "g"]
[6.995226, "o", "/"]
[7.408386, "o", "m"]
[7.56524, "o", "a"]
[7.792798, "o", "o"]
[8.261278, "o", "."]
[8.584539, "o", "p"]
[8.841456, "o", "n"]
[8.961138, "o", "g"]
[9.730059, "o", "\r\n\u001b[?2004l\r"]
[9.764596, "o", "\u001b[1;91mError\u001b[221;39m: Terminal does not support reporting screen sizes in pixels, use a terminal such as kitty, WezTerm, Konsole, etc. that does.\r\n"]
[9.868469, "o", "\u001b[?2004h\u001b[1;36m~/tmp/demo\u001b[0m \r\n\u001b[31m✖\u001b[0m "]
[10.904578, "o", "\u001b[?2004l\r\r\nexit\r\n"]

I tested this with the latest version from develop, which is a new Rust codebase, and it seems to work. This new implementation will be released as 3.0, but I have no ETA at the moment.