You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
resolveWindowsAppPath passes [object Promise] instead of actual path — editor launch broken on Windows #27432
Describe the Bug
On Windows, the resolveWindowsAppPath function in the main process fails to resolve editor paths (e.g., code, cursor, zed). It incorrectly returns the literal string "[object Promise]" instead of the actual filesystem path, causing editor launches to fail silently.
Root Cause
In out/main/index.js (v1.14.49, line 60), the asynchronous execFile call is handled incorrectly:
JavaScript
// File: out/main/index.js
async function resolveWindowsAppPath(appName) {
let output;
try {
// BUG: Missing await and incorrect property access
output = execFilePromise("where", [appName]).toString();
} catch {
return null;
}
}
The Issue: execFilePromise (created via util.promisify) returns a Promise. Calling .toString() on a Promise object immediately returns "[object Promise]" without waiting for resolution.
The Result: The catch block becomes dead code (since .toString() won't throw), and the app attempts to spawn a process using the string "[object Promise]" as the executable path.
Suggested Fix
Update the function to properly await the promise and extract stdout:
JavaScript
async function resolveWindowsAppPath(appName) {
let output;
try {
// Fix: await the promise and access the stdout property
const result = await execFilePromise("where", [appName]);
output = result.stdout;
} catch {
return null;
}
}
All of these describe the same root cause (missing await on resolveWindowsAppPath) and the same [object Promise] error on Windows. Please check if your issue is already covered by one of the above before this proceeds further.
Activity
github-actions commentedon May 14, 2026
This issue might be a duplicate of existing issues. Please check:
All of these describe the same root cause (missing
awaitonresolveWindowsAppPath) and the same[object Promise]error on Windows. Please check if your issue is already covered by one of the above before this proceeds further.