Skip to content

PDF-Viewer Extension Errors #783

Open

Description

@sgilstrap015

Session chat generated a report detailing my error and attempted troubleshooting.

pdf-viewer-connector-error-report.md

Activity

  1. tzipora-rose commented on Oct 20, 2026

    @tzipora-rose

    Defect A, the empty allowedDirectories, has three causes. We traced them on Windows with pdf-viewer 2.0.0 and the current desktop app (2.42304.0.0):

    1. The default does reach the server, but unexpanded. The app puts the manifest's default, ${HOME}/Documents, into the arguments as written, without substituting ${HOME}, so the server gets the literal text and drops it. The app's main.log shows it: [pdf-server] Warning: File not found: C:\Users\<user>\${HOME}\Documents. The MCPB manifest spec says a default supports variable substitution, so this one is the app's: [BUG] pdf-viewer opens no local PDF on Windows: roots become C:\C:\..., configured folders are wiped, and ${HOME} in their default is never expanded anthropics/claude-code#103692.
    2. A folder chosen in the setting is wiped. It reaches the server, one argument per folder, and is registered at startup; then refreshRoots() empties the list when the app sends its roots: v1.7.0 refreshRoots() clears allowedLocalDirs when host advertises roots capability but returns empty list — wipes CLI-arg directories #644, with a fix in fix(pdf-server): keep CLI-arg directories across client roots refreshes #805.
    3. The app's roots are dropped. The app does send roots (for a Code session, its folder), but as file:///C:/... URLs, which the server's fileUrlToPath() turns into C:\C:\... and skips: fix(pdf-server): resolve Windows file:// URLs to the right path #816.

    So the list ends up empty whatever the setting holds. Until fixed versions ship, https://github.com/tzipora-rose/pdf-local-read patches the installed extension in place, reversibly.

    Investigated and written in collaboration with Claudia in Claude Code.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions