sharkdp / bat

A cat(1) clone with wings.
Apache License 2.0
48.97k stars 1.23k forks source link

[BUG] Invalid non-UTF8 @data passed as text to web_socket_connection_send() on Cockpit #3010

Open DodoLeDev opened 3 months ago

DodoLeDev commented 3 months ago

What steps will reproduce the bug?

  1. open Cockpit on a web browser
  2. Go to "terminal" tab
  3. Use bat to open a file

What happens?

Nothing is displayed, and journalctl shows:

invalid non-UTF8 @data passed as text to web_socket_connection_send()

Even more strange: using bat with cat <file> | bat just works!

What did you expect to happen instead?

bat should display the file as usual

How did you install bat?

I used the EPEL release


bat version and environment

Software version

bat 0.24.0

Operating system

Linux 5.14.0-427.16.1.el9_4.x86_64

Command-line

bat --diagnostic 

Environment variables

SHELL=/usr/bin/zsh
PAGER=less
LESS=-R
LANG=fr_FR.UTF-8
LC_ALL=<not set>
BAT_PAGER=<not set>
BAT_PAGING=<not set>
BAT_CACHE_PATH=<not set>
BAT_CONFIG_PATH=<not set>
BAT_OPTS=<not set>
BAT_STYLE=<not set>
BAT_TABS=<not set>
BAT_THEME=<not set>
XDG_CONFIG_HOME=<not set>
XDG_CACHE_HOME=<not set>
COLORTERM=<not set>
NO_COLOR=<not set>
MANPAGER=<not set>

System Config file

Could not read contents of '/etc/bat/config': No such file or directory (os error 2).

Config file

Could not read contents of '/home/geoadmin/.config/bat/config': No such file or directory (os error 2).

Custom assets metadata

Could not read contents of '/home/geoadmin/.cache/bat/metadata.yaml': No such file or directory (os error 2).

Custom assets

'/home/geoadmin/.cache/bat' not found

Compile time information

Less version

> less --version 
less 590 (POSIX regular expressions)
Copyright (C) 1984-2021  Mark Nudelman

less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less