Skip to content

Failed to open file: Error: Server failed to start #136

Closed

Description

@vsenn

Description

Subj on running a v1.30.12 Rustfava version. Looks like a default port conflict, probably need some config file for custom port

Steps to Reproduce

  1. Install
  2. xattr -d com.apple.quarantine /Applications/rustfava.app
  3. Open bean/beancount file
  4. See above error

Rustfava Version

v1.30.12

Python Version

3.13

Operating System

macOS

Additional Context

No response

Activity

  1. added
    bug
    on May 7, 2026
  2. vsenn commented on May 7, 2026

    @vsenn
    Author

    The bug is similar to #120 but I'm on MacOS 26.3.1 (a) version. Running rustfava -p 5009 main.bean also failing after update to latest version uv tool upgrade rustfava with error share/uv/tools/rustfava/lib/python3.13/site-packages/rustfava/rustledger/engine.py", line 164, in _rpc_call raise RustledgerError(f"Empty response: {error_msg}") rustfava.rustledger.engine.RustledgerError: Empty response: rustledger-ffi-wasi - Rustledger FFI via WASI (JSON API for embedding)

  3. robcohen commented on Jun 19, 2026

    @robcohen
    Member

    Root cause + fix status

    The crash comes from the legacy JSON-RPC backend, which runs rledger by spawning a wasmtime CLI subprocess. On macOS that bundled binary is blocked by Gatekeeper/quarantine (note you had to xattr -d com.apple.quarantine), so the subprocess produces no output and you get Empty response: rustledger-ffi-wasi (and, in the desktop app, "Server failed to start").

    This is already fixed on main: the default backend is now the in-process Component-Model engine (loaded via wasmtime-py, no subprocess), so there's no external binary for Gatekeeper to block. Your reports are from v1.30.12, which predates that change — the fix reaches you in the next release (uv tool upgrade rustfava once it's out, or a new desktop build).

    #187 additionally makes the remaining legacy/fallback failures actionable (the "Empty response" / "wasmtime not found" messages now explain the cause and point at the component backend), so if anything still goes wrong you get guidance instead of a cryptic error.

    #120 is the same issue — consolidating there.

    I'll leave this open until a release with the component default ships; if you'd like to verify sooner, a pip install from main (or a pre-release build) should resolve it.

  4. robcohen commented on Jun 19, 2026

    @robcohen
    Member

    Fixed in v1.30.13 (just released — PyPI, Docker, Nix, and the desktop .dmg). The default backend is now the in-process Component-Model engine (rustledger v0.16.5): it loads via wasmtime-py and runs in-process, so there is no wasmtime subprocess for macOS Gatekeeper to block — which was the root cause of the "Server failed to start" / "Empty response" errors.

    To get the fix:

    • CLI: uv tool upgrade rustfava (or uv tool install rustfava)
    • Desktop: download the v1.30.13 .dmg from Releases

    Please reopen if it still fails on v1.30.13 — that would be a genuinely new failure mode (the subprocess is gone) and I'd want the details.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions