Skip to content

desktop: attachment file picker fails instantly with "Desktop IPC handler failed" (regression from 2.0.6) #50621

Closed

Description

@SDSDFFG-rgb

Summary

Clicking the "Image and File" attach menu (Ctrl+U) in OpenCode Desktop 2.0.13 on Windows instantly shows a toast Request failed / Desktop IPC handler failed, and the native file dialog never opens. Desktop 2.0.6 worked fine, so this looks like a regression between 2.0.6 and 2.0.13.

Environment

  • opencode version: Desktop 2.0.13 (release, channel latest, confirmed via debug-log manifest.json); CLI on PATH is 2.0.10 (C:\Users\<user>\.opencode\bin\opencode.exe); last known good Desktop: 2.0.6
  • OS: Microsoft Windows [Version 10.0.26200.9457] (win32 x64)
  • Terminal: N/A (Desktop GUI issue)
  • Shell: C:\WINDOWS\system32\cmd.exe
  • Install/channel: release / latest
  • Active plugins: none (no plugin entries in global or project config; global config only defines mcp.context7 and a custom lmstudio provider)

Reproduction

  1. Open OpenCode Desktop 2.0.13 on Windows.
  2. In the prompt composer, click + → Image and File (or press Ctrl+U).
  3. A toast Request failed / Desktop IPC handler failed appears immediately. The native file picker never opens.

Expected Behavior

The native OS file picker (dialog.showOpenDialog) should open so an image/file can be selected for attachment, as it did in 2.0.6.

Actual Behavior

Instant failure with no dialog. Exact UI text: Request failed / Desktop IPC handler failed. 100% reproducible.

Isolation results:

  • The folder picker (open project) works.
  • Drag & drop and clipboard paste of images work (they bypass the dialog).
  • Only the attachment file picker (FilesOpenFilePicker) fails, before any file is chosen, so this is not the 20 MiB attachment budget.

Additional Context

Code path in 2.0.13 (packages/desktop):

  • packages/app/src/composer/attachments/attachments.ts pick() calls the picker with { defaultPath: input.directory(), multiple: true } and no title/extensions.
  • packages/desktop/src/renderer/platform/files.ts forwards that to FilesOpenFilePicker.
  • packages/desktop/src/main/files/index.ts DesktopFiles.openFilePicker passes it straight to dialog.showOpenDialog({ ..., defaultPath, filters: undefined }) with Effect.orDie, so any throw (e.g. from defaultPath or nativeT("desktop.dialog.chooseFile")) surfaces only as the generic IPC failure.
  • The directory picker sends no defaultPath, which matches the observation that only the file picker fails.

Log evidence from Export debug logs (2.0.13, win32 x64):

  • desktop/*/main.log contains no DesktopFiles/openFilePicker defect entry.
  • desktop/*/renderer.log shows: Unable to fetch & register locale data for 'ja', falling back to 'en-US'. Cause: SyntaxError: Unexpected token 'H', "HTTP/1.1 4"... is not valid JSON.
  • A stale 2.0.10 serve --service was fighting the 2.0.13 service on the same port (reason: 'version-mismatch', GET /api/info → 503, event-stream ERR_CONNECTION_RESET). After killing the stale service so only the staged 2.0.13 serve --service runs, the picker still fails, so the service flap is not (or not the only) cause.

Workaround: attach via drag & drop or paste instead of the attach menu.

Activity

  1. github-actions commented on Sep 22, 2026

    @github-actions
    Contributor

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

    These issues describe the same symptom (file picker immediately failing with "Desktop IPC handler failed" on Windows Desktop). They were closed, so a fix may have been merged. If the problem persists on the latest release, it may be a re-regression worth tracking separately.

  2. Hona commented on Sep 22, 2026

    @Hona
    Member

    Fixed in #50599 (merged to v2 as 8e62ad7). The renderer sent optional picker fields as undefined, which the main process's JSON schema codec rejected before the handler ran. The fix lands in the next desktop release after 2.0.12.

    Workaround until then: drag and drop or paste from the clipboard.

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