Skip to content

Chinese/Unicode path broken since v1.1.54 - "Failed to reload [object Object]" / "List files failed" #13061

Closed as not planned

Description

@ljjay

Description

Opening a workspace with Chinese characters in the path fails with multiple errors since v1.1.54. This worked
correctly in v1.1.53 and all earlier versions.

Plugins

No response

OpenCode version

OpenCode Desktop version: v1.1.56 (also broken in v1.1.54, v1.1.55)

Steps to reproduce

  1. Create or open a project with Chinese characters in the path, e.g. E:\LocalProjects\DailyUse\chrome控制台插件
  2. Add it as a workspace in OpenCode Desktop
  3. Try to open the workspace

Screenshot and/or share link

Image

Operating System

OS: Windows 11 x64

Terminal

powershell

Activity

  1. github-actions commented on Feb 11, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of or related to existing issues. Please check:

    These appear to be related to the same root cause affecting Unicode/non-ASCII paths on Windows in v1.1.54+. Consider reviewing these together for a unified fix.

  2. alexyaroshuk commented on Feb 13, 2026

    @alexyaroshuk
    Contributor

    I believe this is fixed, please try latest version. Then, if fixed, please close the issue

  3. zer0Black commented on Apr 10, 2026

    @zer0Black

    The problem has occurred again.

  4. removed
    bugSomething isn't working
    webRelates to opencode on web / desktop
    on May 3, 2026
  5. GrayXDD commented on Jun 8, 2026

    @GrayXDD

    Confirming this is not specific to Chinese — it reproduces with any composed (NFC) non-ASCII directory name, e.g. Cyrillic й (U+0439) / ё (U+0451), on Windows 11 / NTFS. Same regression window (works on ≤ v1.1.53).

    Root cause looks like Unicode normalization. The server queries lstat / realPath against the NFD (decomposed) form of the path, but NTFS stores filenames in NFC, so lstat returns ENOENT and file listing fails. Only names that differ between NFC and NFD are affected (which is why an ASCII-ish root can open while specific subfolders fail).

    Server log:

    ERROR service=server error=NotFound: FileSystem.realPath (D:\...\Отчёты)
      Caused by: ENOENT: no such file or directory, lstat 'D:\...\Отчёты'
      cause=PlatformError: NotFound: FileSystem.realPath (...)
    

    Verified against the real, existing directory:

    os.path.exists(as-is) -> True     # the directory exists
    NFC == NFD            -> False    # name has composed chars (ё/й)
    os.path.exists(NFC)   -> True
    os.path.exists(NFD)   -> False    # <-- the form the app queries
    listdir(parent) returns the entry name normalized as NFC
    

    Minimal reproduction (no Chinese needed):

    mkdir "D:\octest\Отчёты"            # ё = U+0451 (NFC)
    mkdir "D:\octest\Записи внедрений"  # й = U+0439 (NFC)

    Open D:\octest in OpenCode Desktop → file tree fails with "Failed to list files" / realPath ... ENOENT.

    Note: the symlink workaround from #13112 does not help when the affected characters are in nested directory names rather than only the project-root path — aliasing the root to an ASCII path leaves the inner folders failing on listing.

    Suggested fix: on Windows, normalize lookups to NFC (or preserve the OS-returned form) before lstat / realPath; don't assume NFD.

  6. simondkan commented on Aug 6, 2026

    @simondkan

    Workaround that worked for me (Windows, opencode desktop 1.18.14):

    I was hitting the same "List files failed" / "Unexpected server error" on Windows. The fix turned out to be embarrassingly simple: I just moved the project from a non-ASCII parent directory (path contained Chinese characters) to a pure-ASCII root like C:\projects\xxx\. No code changes, no state reset, no version downgrade needed.

    This matches @GrayXDD's NFD/NFC analysis above. The server queries lstat in NFD but NTFS returns NFC -> ENOENT -> wrapped as HTTP 500. Until the upstream fix lands, keep project paths pure ASCII on Windows is the most reliable workaround. I tried all the "official" suggestions (clearing %APPDATA%\ai.opencode.desktop\, downgrading to 1.18.13, blocking the updater via hosts) -- none of those addressed the actual bug.

  7. github-actions commented on Oct 7, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions