Maestro icon indicating copy to clipboard operation
Maestro copied to clipboard

Bug: /wizard command fails with 'process is not defined' in renderer

Open DolphusCY opened this issue 10 months ago • 4 comments

Description

The /wizard command fails with the error process is not defined when invoked from the Maestro UI.

Error Details

  • Error message: process is not defined
  • Location: Appears in the "Something Went Wrong" error dialog within Maestro
  • Trigger: Running the /wizard command to add features to a project

Screenshot

The error dialog shows:

  • Title: "Something Went Wrong"
  • Message: "process is not defined"
  • Technical details section confirms: "process is not defined"

Technical Analysis

This is a classic Node.js-in-browser error. The process global is a Node.js runtime object that does not exist in browser/Electron renderer contexts.

Likely cause: Code using process.env.SOMETHING or process.platform is being executed in the renderer process where process is not exposed.

Suggested Fix

  1. If accessing environment variables, use Vite's import.meta.env instead of process.env
  2. If process is needed in renderer, expose it via Electron's contextBridge in preload script
  3. Guard access: typeof process !== 'undefined' ? process.env.VAR : fallback

Environment

  • OS: macOS (Darwin 25.2.0)
  • Date observed: 2026-02-03

Reported via DealSync Agent in Maestro

DolphusCY avatar Feb 03 '26 09:02 DolphusCY

Thanks for the report, can you see if the latest RC is still affected for you?

https://github.com/pedramamini/Maestro/releases/tag/v0.15.0-RC

Does regular chat work with that agent and only the wizard fails?

pedramamini avatar Feb 03 '26 13:02 pedramamini

Image

My version is v0.15.0-rc

DolphusCY avatar Feb 03 '26 13:02 DolphusCY

Merged from #241 (/wizard fails from any message)

Reported by @chancegraff — /wizard crashes with spawn claude ENOENT:

[ProcessManager] Child process error
  sessionId: "inline-wizard-1769488358106-4wi570qal"
  error: "spawn claude ENOENT"

Agent error detected: agent_crashed
  message: "Agent process error: spawn claude ENOENT"

The wizard spawns claude as a bare command but the binary isn't found. This may be downstream of the process is not defined error in this issue, or a separate PATH resolution problem for the inline wizard agent spawn. Screenshots and full spawn logs available in #241.

Closing #241 as a duplicate of this issue.

dmaynor avatar Feb 14 '26 22:02 dmaynor

Closing as duplicate of #241 — root cause analysis has been merged into that issue (the original report).

dmaynor avatar Feb 14 '26 22:02 dmaynor