Skip to content

Fix NSIS installer abort when openXYOS livez is slow - #33

Merged
XYAIStudio merged 2 commits into
mainfrom
cursor/fix-nsis-openxyos-label-363f
Sep 16, 2026
Merged

XYAIStudio merged 2 commits into
mainfrom
cursor/fix-nsis-openxyos-label-363f

Conversation

@XYAIStudio

@XYAIStudio XYAIStudio commented Sep 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Windows Setup of v0.0.1 aborted around 40% after extracting openXYOS:

  1. extract-openxyos.cmd printed 系统找不到指定的批处理标签 - liveNodeOk and exited 1.
  2. node\node.exe and nested openxyos\dist\index.html were already on disk; top-level dist\index.html is not required. FreeOS-openXYOS was created.
  3. probeOpenXYOS then waited 60s for http://127.0.0.1:3780/api/health/livez and Aborted the whole install (exit 12 / error 68) before writing .install-ready. Port 3780 was not occupied — the old MessageBox was misleading.

Root cause: the generated cmd wrote liveNodeOk: but cmd.exe only accepts :liveNodeOk as a goto target.

This PR:

  • Writes :liveNodeOk and ends extract with exit /b 0 when LIVE has node\node.exe plus dist\index.html or openxyos\dist\index.html.
  • Softens the install-time livez probe: wait 90s, re-run the LIMITED FreeOS-openXYOS task once at 30s, then warn + continue (DetailPrint + information MessageBox). Does not blame a busy 3780 port.
  • Writes .install-ready after layout + autostart, before the livez wait, so Organization can start the sidecar later even if livez is still down.
  • Still Abort only when node/dist are missing (requireOpenXYOSLayout / error 67).
  • Does not spawn Node as admin (IShellDispatch2 / medium IL unchanged).
  • Adds a string-level test that the generated cmd contains :liveNodeOk and no liveNodeOk: label, and that .install-ready is stamped before probe.

Target branch

  • Base is develop (feature / fix — default)
  • Base is main (this repo ships installer fixes to main)

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactor / chore
  • Release / hotfix

Test plan

  • uv run pytest tests/unit/desktop/test_nsis_uninstall.py -q — 16 passed
  • make lint + make typecheck — green
  • make test — 3424 passed, 15 skipped (pre-stamp-move; NSIS tests re-run after)
  • GitHub CI (Linux + Windows + desktop package)
  • Added/updated tests (test_nsis_extract_cmd_uses_colon_prefixed_batch_labels; probe no longer Aborts / error 68; .install-ready before probe)

How to verify on Windows:

  1. Build/install FreeOS-desktop-windows-amd64-*.exe elevated.
  2. Extract log must not contain 系统找不到指定的批处理标签 and should show extract exit 0 once node.exe + nested or flat dist\index.html exist.
  3. If livez is slow/down, Setup shows a warning and finishes. %LOCALAPPDATA%\FreeOS\openxyos\.install-ready, HKCU Run FreeOS-openXYOS, and the logon task remain even when port 3780 never answered.

Checklist

  • Updated CHANGELOG.md (if user-facing)
  • README / docs updated (if needed)
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 16, 2026 12:19
cmd.exe never saw :liveNodeOk because the generated extract script wrote
liveNodeOk: (invalid goto target), so extract exited 1. Probe then aborted
the whole installer when livez was slow. Keep Abort only when node/dist
are missing; warn and continue when files and autostart are in place.

Co-authored-by: XYAI Labs <haoboy8@gmail.com>
Stamp the live workdir after layout and autostart succeed, so a slow
sidecar cannot leave Organization without the install-ready marker.

Co-authored-by: XYAI Labs <haoboy8@gmail.com>
@XYAIStudio
XYAIStudio marked this pull request as ready for review September 16, 2026 13:00
@XYAIStudio
XYAIStudio merged commit 9dfd3a6 into main Sep 16, 2026
12 checks passed
@XYAIStudio
XYAIStudio deleted the cursor/fix-nsis-openxyos-label-363f branch September 16, 2026 13:00
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