Skip to content

[BUG] Launch failure (no window) in v0.3.0 #189

Description

@daeh

I updated from v0.2.3 to v0.3.0 by downloading the dmg. When I open the app, it launches, but no window appears. I can open the "About" window, but not the main application window. Reload / Force Reload / Toggle Developer Tools have no effect.

Here's the output if I launch v0.3.0 from the cli:

❯ /Applications/Crystal.app/Contents/MacOS/Crystal ; exit;
[Polyfill] ReadableStream already available, skipping polyfill
[Crystal] Running as installed app, using ~/.crystal
[PanelManager] Loading panels from database...
[Main] App is ready, initializing services...
[Crystal] Running as installed app, using ~/.crystal
[Crystal] Running as installed app, using ~/.crystal
[Main] Logger initialized with file logging to ~/.crystal/logs
[Database] Model column exists in sessions table but will be ignored (moved to panel level)
[Database] Running Claude panels migration 004...
[Database] Found 107 sessions with Claude data to migrate
[Database] Failed to run Claude panels migration: TypeError: Cannot read properties of undefined (reading 'getDefaultModel')
    at DatabaseService.runMigrations (/Applications/Crystal.app/Contents/Resources/app.asar/main/dist/main/src/database/database.js:826:56)
    at DatabaseService.initialize (/Applications/Crystal.app/Contents/Resources/app.asar/main/dist/main/src/database/database.js:51:14)
    at initializeServices (/Applications/Crystal.app/Contents/Resources/app.asar/main/dist/main/src/index.js:415:21)
    at async /Applications/Crystal.app/Contents/Resources/app.asar/main/dist/main/src/index.js:519:5
[Main] Initializing Permission IPC server...
[Crystal] Running as installed app, using ~/.crystal
[Main] Starting Permission IPC server...
[Main] Permission IPC server started successfully
[Main] Permission IPC socket path: ~/.crystal/sockets/crystal-permissions-2059.sock
[2025-09-22T17:47:51.097Z] INFO: [CliToolRegistry] Initialized CLI tool registry
[2025-09-22T17:47:51.097Z] INFO: [CliToolRegistry] Registered CLI tool: Claude Code (claude)
[2025-09-22T17:47:51.097Z] INFO: [CliManagerFactory] Registered built-in CLI tools
[ClaudeTest] Testing Claude Code availability...
[ClaudeTest] Platform: darwin
Running in packaged app, using login shell to get full PATH...
Executing shell command to get PATH: /bin/zsh -c 'source /etc/zprofile 2>/dev/null || true; source ~/.zprofile 2>/dev/null || true; source /etc/zshrc 2>/dev/null || true; source ~/.zshrc 2>/dev/null || true; echo $PATH'
Successfully loaded user PATH from shell config files
[ClaudeTest] Using shell PATH with 26 entries
[ShellPath] Executable 'claude' not found after searching 26 paths
[ShellPath] First few paths searched: ~/miniforge3/envs/lab/bin, ~/miniforge3/condabin, ~/.local/state/fnm_multishells/2068_1758563271123/bin, /opt/homebrew/bin, /opt/homebrew/sbin
[ClaudeTest] Claude executable not found in PATH
[ClaudeTest] Searched PATH: ~/miniforge3/envs/lab/bin:~/miniforge3/condabin:~/.local/state/fnm_multishells/2068_1758563271123/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:~/.juliaup/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bi...
[ClaudeTest] Checking common installation locations...
[2025-09-22T17:47:51.592Z] ERROR: [CliManagerFactory] Failed to create claude manager: Error: CLI tool 'claude' is not available: Claude Code CLI not found in PATH. Please ensure claude is installed and in your PATH.
Stack: Error: CLI tool 'claude' is not available: Claude Code CLI not found in PATH. Please ensure claude is installed and in your PATH.
    at CliToolRegistry.createManager (/Applications/Crystal.app/Contents/Resources/app.asar/main/dist/main/src/services/cliToolRegistry.js:134:19)
    at async CliManagerFactory.createManager (/Applications/Crystal.app/Contents/Resources/app.asar/main/dist/main/src/services/cliManagerFactory.js:39:29)
    at async initializeServices (/Applications/Crystal.app/Contents/Resources/app.asar/main/dist/main/src/index.js:445:25)
    at async /Applications/Crystal.app/Contents/Resources/app.asar/main/dist/main/src/index.js:519:5
(node:2059) UnhandledPromiseRejectionWarning: Error: CLI tool 'claude' is not available: Claude Code CLI not found in PATH. Please ensure claude is installed and in your PATH.
    at CliToolRegistry.createManager (/Applications/Crystal.app/Contents/Resources/app.asar/main/dist/main/src/services/cliToolRegistry.js:134:19)
    at async CliManagerFactory.createManager (/Applications/Crystal.app/Contents/Resources/app.asar/main/dist/main/src/services/cliManagerFactory.js:39:29)
    at async initializeServices (/Applications/Crystal.app/Contents/Resources/app.asar/main/dist/main/src/index.js:445:25)
    at async /Applications/Crystal.app/Contents/Resources/app.asar/main/dist/main/src/index.js:519:5
(Use `Crystal --trace-warnings ...` to show where the warning was created)
(node:2059) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 25)

I use FNM for managing node versions, so in v0.2.3 I used the "Custom Claude Installation" field to specify a custom launch script: ~/fnscripts/exec-claude.zsh. Here's the cli launch of v0.2.3 (which works):

Last login: Mon Sep 22 13:47:50 on ttys001
/Applications/Crystal.app/Contents/MacOS/Crystal ; exit;
❯ /Applications/Crystal.app/Contents/MacOS/Crystal ; exit;
[Polyfill] ReadableStream already available, skipping polyfill
[Main] App is ready, initializing services...
[Main] Logger initialized with file logging to ~/.crystal/logs
[Main] Initializing Permission IPC server...
[Main] Starting Permission IPC server...
[Main] Permission IPC server started successfully
[Main] Permission IPC socket path: ~/.crystal/sockets/crystal-permissions-2792.sock
[WorktreeNameGenerator] No API key found, AI name generation disabled
[TaskQueue] Initializing task queue...
[TaskQueue] Platform: darwin, Session concurrency: 5
[TaskQueue] Using SimpleQueue for Electron environment
[SimpleQueue] Created queue: session-creation with concurrency: 5
[SimpleQueue] Created queue: session-input with concurrency: 10
[SimpleQueue] Created queue: session-continue with concurrency: 10
[TaskQueue] Setting up processors...
[SimpleQueue] Processor registered
[SimpleQueue] Processor registered
[SimpleQueue] Processor registered
[TaskQueue] Task queue initialized
[2025-09-22T17:52:55.023Z] INFO: [Version Checker] Starting periodic version checks (every 24 hours)
[Main] Services initialized, creating window...
Loading index.html from: /Applications/Crystal.app/Contents/Resources/app.asar/frontend/dist/index.html
[2025-09-22T17:52:55.217Z] INFO: [Main] Window created successfully
[2025-09-22T17:52:55.236Z] INFO: [Database] Getting folders for project 1: []
[2025-09-22T17:52:55.236Z] INFO: [Database] Getting folders for project 4: []
[2025-09-22T17:52:55.236Z] INFO: [Database] Getting folders for project 5: []
[2025-09-22T17:52:55.236Z] INFO: [Database] Getting folders for project 7: []
[2025-09-22T17:52:55.236Z] INFO: [Database] Getting folders for project 8: []
[2025-09-22T17:52:55.236Z] INFO: [Database] Getting folders for project 9: []
[2025-09-22T17:52:55.236Z] INFO: [Database] Getting folders for project 10: []
[2025-09-22T17:52:55.236Z] INFO: [Database] Getting folders for project 11: []
[2025-09-22T17:52:55.237Z] INFO: [Database] Getting folders for project 3: []
[2025-09-22T17:52:55.237Z] INFO: [Database] Getting folders for project 13: []
[2025-09-22T17:52:55.237Z] INFO: [Database] Getting folders for project 14: []
[2025-09-22T17:52:55.239Z] WARN: (electron) 'console-message' arguments are deprecated and will be removed. Please use Event<WebContentsConsoleMessageEventParams> object instead.
[2025-09-22T17:52:55.239Z] INFO: 🚀 [WORKTREE DEBUG] version:get-info called - NEW BUILD!
[2025-09-22T17:52:55.239Z] INFO: 🚀 [WORKTREE DEBUG] app.isPackaged: true
[2025-09-22T17:52:55.239Z] INFO: 🚀 [WORKTREE DEBUG] process.cwd(): ~
[2025-09-22T17:52:55.239Z] INFO: [Version Debug] Not adding worktreeName. isPackaged: true worktreeName: undefined
[2025-09-22T17:52:55.239Z] INFO: [Version Debug] Final response data: {
  "current": "0.2.3",
  "name": "crystal",
  "workingDirectory": "~"
}
[2025-09-22T17:52:55.262Z] INFO: [Database] Retrieved session bb8a381f-2f75-4a42-93c5-8a697f42ede3 with skip_continue_next: {
  "raw_value": 0,
  "type": "number",
  "is_truthy": false
}
[2025-09-22T17:52:55.262Z] INFO: [Database] Retrieved session bb8a381f-2f75-4a42-93c5-8a697f42ede3 with skip_continue_next: {
  "raw_value": 0,
  "type": "number",
  "is_truthy": false
}
[2025-09-22T17:52:55.263Z] INFO: [Database] Retrieved session bb8a381f-2f75-4a42-93c5-8a697f42ede3 with skip_continue_next: {
  "raw_value": 0,
  "type": "number",
  "is_truthy": false
}
[2025-09-22T17:52:55.263Z] INFO: [Database] Retrieved session bb8a381f-2f75-4a42-93c5-8a697f42ede3 with skip_continue_next: {
  "raw_value": 0,
  "type": "number",
  "is_truthy": false
}
[2025-09-22T17:52:55.263Z] INFO: captureWorkingDirectoryDiff called for: ~/coding/_worktrees/composition-buddy/savedstate
[2025-09-22T17:52:55.263Z] INFO: [CommandExecutor] Executing: git rev-parse HEAD in ~/coding/_worktrees/composition-buddy/savedstate
[2025-09-22T17:52:55.263Z] INFO: [ShellPath] Starting PATH detection...
[2025-09-22T17:52:55.263Z] INFO: [ShellPath] Platform: darwin
[2025-09-22T17:52:55.263Z] INFO: [ShellPath] Current process PATH: ~/miniforge3/envs/lab/bin:~/.local/state/fnm_multishells/2745_1758563574194/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:~/.juliaup/bin:/System/Cryptexes/App/usr/...
[2025-09-22T17:52:55.263Z] INFO: [ShellPath] Shell environment: /bin/zsh
[2025-09-22T17:52:55.263Z] INFO: [ShellPath] Home directory: ~
[2025-09-22T17:52:55.263Z] INFO: [ShellPath] Detected shell: /bin/zsh (zsh)
[2025-09-22T17:52:55.263Z] INFO: [ShellPath] Unix/Linux PATH detection - Shell: /bin/zsh, isLinux: false
[2025-09-22T17:52:55.263Z] INFO: [ShellPath] Shell command: /bin/zsh -l -i -c 'echo $PATH'
[2025-09-22T17:52:55.263Z] INFO: Running in packaged app, using login shell to get full PATH...
[2025-09-22T17:52:55.263Z] INFO: Executing shell command to get PATH: /bin/zsh -c 'source /etc/zprofile 2>/dev/null || true; source ~/.zprofile 2>/dev/null || true; source /etc/zshrc 2>/dev/null || true; source ~/.zshrc 2>/dev/null || true; echo $PATH'
[2025-09-22T17:52:55.544Z] INFO: Successfully loaded user PATH from shell config files
[2025-09-22T17:52:55.544Z] INFO: [ShellPath] Retrieved shell PATH (24 entries): ~/miniforge3/envs/lab/bin:~/miniforge3/condabin:~/.local/state/fnm_multishells/2802_1758563575294/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:~/.juliaup...
[2025-09-22T17:52:55.544Z] INFO: [ShellPath] Current process PATH has 23 entries
[2025-09-22T17:52:55.544Z] INFO: [ShellPath] Checking for npm/yarn global paths (non-Linux)...
[2025-09-22T17:52:55.766Z] INFO: [ShellPath] Final combined PATH has 26 entries
[2025-09-22T17:52:55.766Z] INFO: [ShellPath] Added 2 additional paths
[2025-09-22T17:52:55.766Z] INFO: [ShellPath] First few PATH entries: ~/miniforge3/envs/lab/bin, ~/miniforge3/condabin, ~/.local/state/fnm_multishells/2802_1758563575294/bin, /opt/homebrew/bin, /opt/homebrew/sbin
[2025-09-22T17:52:55.766Z] INFO: [ShellPath] PATH loading completed successfully
...

I'm on macOS 14.7.8, M2 Pro

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions