Skip to content

Fix desktop app not opening / engine not starting (v1.1.1) - #4

Merged
ccharafeddine merged 1 commit into
masterfrom
claude/loving-hypatia-d1h2xo
Sep 24, 2026
Merged

ccharafeddine merged 1 commit into
masterfrom
claude/loving-hypatia-d1h2xo

Conversation

@ccharafeddine

Copy link
Copy Markdown
Owner

Summary

On Windows, the v1.1.0 .exe does nothing when launched. This PR fixes the two causes.

  1. No window, and the process stays running. If the fixed port 47813 fails with any error other than EADDRINUSE, startServer rejects and nothing handles it. On Windows, a port inside a Hyper-V/WSL/Docker reserved range fails with EACCES. The app then creates no window, but the process keeps running and holds the single-instance lock, so every later launch exits silently. Now any listen error falls back to a random port. If startup still fails, the app shows an error box and exits.
  2. The engine never started in Electron. BrowserWindow doesn't honor COOP/COEP, so crossOriginIsolated stays false and SharedArrayBuffer is undefined. The multi-threaded engine therefore couldn't start. v1.0.0 never hit this because it was actually running the single-threaded build. The fix is app.commandLine.appendSwitch('enable-features', 'SharedArrayBuffer').

Also in this PR:

  • On a second launch, the running app shows and focuses its window, or creates one if none exists.
  • The portable .exe now shows a splash screen while it unpacks its ~320MB.
  • Version bumped to 1.1.1, with release notes in docs/release-notes/v1.1.1.md.

Testing

  • npm run lint, npm test (45 tests) and npm run build pass.
  • Reproduced the missing window with a simulated EACCES, then confirmed the fallback port and the error-box path.
  • Ran the real Electron app under Xvfb, both in dev and as the packaged linux-unpacked build:
    • the engine runs with 3 threads at about 1M nps;
    • each drag-move gets a best line in about 200ms;
    • with port 47813 already taken, the app falls back to a random port;
    • a second launch hands off to the running app and exits.
  • I haven't run it on Windows itself.

🤖 Generated with Claude Code

https://claude.ai/code/session_017ZHKbLKcpoa8QJGzqkbDTJ


Generated by Claude Code

- A listen error other than EADDRINUSE on the fixed port (Windows returns
  EACCES for ports in Hyper-V/WSL/Docker excluded ranges) left startup
  rejected with no window while the process kept running and holding the
  single-instance lock, so every later launch silently did nothing. Fall
  back to a random port on any listen error; if startup still fails, show
  an error box and exit.
- Electron's BrowserWindow doesn't honor COOP/COEP, so SharedArrayBuffer
  was undefined and the multi-threaded engine never started. Enable it
  with the SharedArrayBuffer feature switch.
- second-instance: show/focus the window, or create one if none exists.
- Portable .exe shows a splash screen while it unpacks.

Verified in real Electron (dev and packaged) under Xvfb: engine runs
multi-threaded, port-taken fallback works, second launch hands off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ZHKbLKcpoa8QJGzqkbDTJ
@ccharafeddine
ccharafeddine merged commit bf069b3 into master Sep 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants