sxyazi / yazi

💥 Blazing fast terminal file manager written in Rust, based on async I/O.
https://yazi-rs.github.io
MIT License
16.33k stars 377 forks source link

Bug: Yazi takes forever (30+ seconds) to load at the *new* Windows Terminal Preview 1.22.2362.0 #1570

Closed MoaidHathot closed 2 months ago

MoaidHathot commented 2 months ago

What system are you running Yazi on?

Windows

What terminal are you running Yazi in?

Windows Terminal Preview 1.22.2362.0

yazi --debug output

Yazi
    Version: 0.3.2 (ddb8ce5 2024-08-28)
    Debug  : false
    OS     : windows-x86_64 (windows)

Ya
    Version: 0.3.2 (ddb8ce5 2024-08-28)

Emulator
    Emulator.via_env: ("", "")
    Emulator.via_csi: Ok(Unknown([]))
    Emulator.detect : Unknown([])

Adapter
    Adapter.matches: Chafa

Desktop
    XDG_SESSION_TYPE: None
    WAYLAND_DISPLAY : None
    DISPLAY         : None

SSH
    shared.in_ssh_connection: false

WSL
    /proc/sys/fs/binfmt_misc/WSLInterop: false

Variables
    SHELL              : None
    EDITOR             : None
    VISUAL             : None
    YAZI_FILE_ONE      : Some("C:\\Program Files\\Git\\usr\\bin\\file.exe")
    YAZI_CONFIG_HOME   : None

Text Opener
    default: Some(Opener { run: "code %*", block: false, orphan: true, desc: "code", for_: None, spread: true })
    block  : Some(Opener { run: "code -w %*", block: true, orphan: false, desc: "code (block)", for_: None, spread: true })

Multiplexers
    TMUX               : false
    tmux version       : program not found
    ZELLIJ_SESSION_NAME: None
    Zellij version     : program not found

Dependencies
    file             : 5.45
    ueberzugpp       : program not found
    ffmpegthumbnailer: program not found
    magick           : program not found
    fzf              : 0.52.1
    fd               : 10.1.0
    rg               : 14.1.0
    chafa            : program not found
    zoxide           : program not found
    7z               : program not found
    7zz              : program not found
    jq               : 1.7.1

Did you try the latest nightly build to see if the problem got fixed?

No

Describe the bug

Yazi takes more than 30 seconds to load when used with the new Windows Terminal Preview 1.22.2362.0. This issue doesn't reproduce with older Preview versions and with the non-preview version.

Logs:

  2024-08-29T21:26:15.499134Z  WARN yazi_adapter::emulator: [Adapter] No special environment variables detected
    at yazi-adapter\src\emulator.rs:70

  2024-08-29T21:26:15.499158Z  WARN yazi_adapter::emulator: [Adapter] Unknown TERM_PROGRAM: 
    at yazi-adapter\src\emulator.rs:84

  2024-08-29T21:26:15.499159Z  WARN yazi_adapter::emulator: [Adapter] Unknown TERM: 
    at yazi-adapter\src\emulator.rs:92

  2024-08-29T21:26:25.510270Z ERROR yazi_adapter::emulator: read_until_da1 timed out: [91, 63, 54, 49, 59, 52, 59, 54, 59, 55, 59, 49, 52, 59, 50, 49, 59, 50, 50, 59, 50, 51, 59, 50, 52, 59, 50, 56, 59, 51, 50, 59, 52, 50, 99], error: Elapsed(())
    at yazi-adapter\src\emulator.rs:210

  2024-08-29T21:26:25.510398Z  WARN yazi_adapter::adapter: [Adapter] Could not identify XDG_SESSION_TYPE
    at yazi-adapter\src\adapter.rs:101

  2024-08-29T21:26:25.510442Z  WARN yazi_adapter::adapter: [Adapter] Falling back to chafa
    at yazi-adapter\src\adapter.rs:113

  2024-08-29T21:26:25.515093Z  WARN yazi_adapter::ueberzug: ueberzugpp spawning failed: program not found
    at yazi-adapter\src\ueberzug.rs:87

  2024-08-29T21:26:36.202796Z ERROR yazi_adapter::emulator: read_until_da1 timed out: [], error: Elapsed(())
    at yazi-adapter\src\emulator.rs:210

  2024-08-29T21:26:36.202974Z  WARN yazi_adapter::emulator: [Adapter] No special environment variables detected
    at yazi-adapter\src\emulator.rs:70

  2024-08-29T21:26:36.202979Z  WARN yazi_adapter::emulator: [Adapter] Unknown TERM_PROGRAM: 
    at yazi-adapter\src\emulator.rs:84

  2024-08-29T21:26:36.202981Z  WARN yazi_adapter::emulator: [Adapter] Unknown TERM: 
    at yazi-adapter\src\emulator.rs:92

  2024-08-29T21:26:46.213493Z ERROR yazi_adapter::emulator: read_until_da1 timed out: [], error: Elapsed(())
    at yazi-adapter\src\emulator.rs:210

  2024-08-29T21:26:46.213577Z  WARN yazi_adapter::emulator: [Adapter] No special environment variables detected
    at yazi-adapter\src\emulator.rs:70

  2024-08-29T21:26:46.213579Z  WARN yazi_adapter::emulator: [Adapter] Unknown TERM_PROGRAM: 
    at yazi-adapter\src\emulator.rs:84

  2024-08-29T21:26:46.213580Z  WARN yazi_adapter::emulator: [Adapter] Unknown TERM: 
    at yazi-adapter\src\emulator.rs:92

  2024-08-29T21:26:56.226514Z ERROR yazi_adapter::emulator: read_until_da1 timed out: [], error: Elapsed(())
    at yazi-adapter\src\emulator.rs:210

  2024-08-29T21:26:56.226591Z  WARN yazi_adapter::adapter: [Adapter] Could not identify XDG_SESSION_TYPE
    at yazi-adapter\src\adapter.rs:101

  2024-08-29T21:26:56.226645Z  WARN yazi_adapter::adapter: [Adapter] Falling back to chafa
    at yazi-adapter\src\adapter.rs:113

Minimal reproducer

Use Windows Terminal Preview version 1.22.2362.0 Call yazi

Anything else?

Reproduce with both PowerShell Core and CMD

sxyazi commented 2 months ago

Hi, I ran into the same issue yesterday - it's actually a bug in Windows Terminal Preview 1.22.2362.0, and I've reported it to them at https://github.com/microsoft/terminal/discussions/17809#discussioncomment-10469993. Hope it will be fixed in the next version.

Closing as not Yazi

sxyazi commented 2 months ago

FYI there's a PR to fix it https://github.com/microsoft/terminal/pull/17833

j4james commented 1 month ago

FYI, a new Windows Terminal preview (v1.22.2702.0) was released yesterday which includes the fix for this issue.

sxyazi commented 1 month ago

Nice work @j4james, thanks for the reminder! 👍🏻

github-actions[bot] commented 1 week ago

I'm going to lock this issue because it has been closed for 30 days. ⏳ This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please file a new issue and complete the issue template so we can capture all the details necessary to investigate further.