Skip to content

Fix openXYOS install start: pass CORS_ORIGIN and fail-fast on Node crash - #36

Merged
XYAIStudio merged 1 commit into
mainfrom
cursor/fix-openxyos-start-env-42c6
Sep 16, 2026
Merged

XYAIStudio merged 1 commit into
mainfrom
cursor/fix-openxyos-start-env-42c6

Conversation

@XYAIStudio

@XYAIStudio XYAIStudio commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Install-time openXYOS died immediately with CORS_ORIGIN must be explicitly configured in production, then the provisioner waited 90s and exited 12 with no Node on 3780.

Root cause: Windows PowerShell 5.1 Start-Process defaults to UseShellExecute=true, so $env:CORS_ORIGIN / NODE_ENV set in start-sidecar.ps1 never reached Node. parseOrigins in production then throws and the process exits.

What changed

  • Start Node with ProcessStartInfo.UseShellExecute = $false and copy the required env onto EnvironmentVariables.
  • Start-Process -FilePath $node now uses -NoNewWindow + stdout/stderr redirects (those switches also force UseShellExecute=$false on PS 5.1).
  • Capture Node output in %LOCALAPPDATA%\FreeOS\openxyos\start.log.
  • If Node is gone and 3780 is not listening within a few seconds, provisioner exits 10 with a start.log excerpt instead of a blind 90s livez wait.
  • Install architecture unchanged: NSIS nsExec still waits for the provisioner; no HKCU Run / logon autostart; livez is still required for success.

Target branch

Type of change

  • Bug fix

Test plan

  • Added/updated tests (tests/unit/desktop/test_openxyos_provisioner.py, NSIS string checks)
  • Local: python3 -m pytest --noconftest tests/unit/desktop/test_openxyos_provisioner.py tests/unit/desktop/test_nsis_uninstall.py tests/unit/desktop/test_stage_openxyos_runtime.py -q → 26 passed
  • CI make all on this PR (this cloud image has no uv / full Octop env)

Checklist

  • Updated CHANGELOG.md
  • desktop/README.md notes start.log and fail-fast exit 10
Open in Web Open in Cursor 

PowerShell 5.1 Start-Process defaults to UseShellExecute=true, so
CORS_ORIGIN/NODE_ENV never reached Node. Production parseOrigins then
exited immediately and the provisioner waited 90s for livez (exit 12).

Start Node with UseShellExecute=false, copy env onto ProcessStartInfo,
capture stdout/stderr in start.log, and exit 10 if the process dies
before livez instead of presenting an opaque timeout.

Co-authored-by: XYAI Labs <haoboy8@gmail.com>
@XYAIStudio
XYAIStudio marked this pull request as ready for review September 16, 2026 17:10
@XYAIStudio
XYAIStudio merged commit d15a91f into main Sep 16, 2026
12 checks passed
@XYAIStudio
XYAIStudio deleted the cursor/fix-openxyos-start-env-42c6 branch September 16, 2026 17:41
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