Repository navigation
Fix openXYOS install start: pass CORS_ORIGIN and fail-fast on Node crash - #36
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-Processdefaults toUseShellExecute=true, so$env:CORS_ORIGIN/NODE_ENVset instart-sidecar.ps1never reached Node.parseOriginsin production then throws and the process exits.What changed
ProcessStartInfo.UseShellExecute = $falseand copy the required env ontoEnvironmentVariables.Start-Process -FilePath $nodenow uses-NoNewWindow+ stdout/stderr redirects (those switches also forceUseShellExecute=$falseon PS 5.1).%LOCALAPPDATA%\FreeOS\openxyos\start.log.start.logexcerpt instead of a blind 90s livez wait.nsExecstill waits for the provisioner; no HKCU Run / logon autostart; livez is still required for success.Target branch
develop(feature / fix — default)main(matches Run openXYOS provision as a FreeOS installer subprocess #35 / current installer line)Type of change
Test plan
tests/unit/desktop/test_openxyos_provisioner.py, NSIS string checks)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 passedmake allon this PR (this cloud image has nouv/ full Octop env)Checklist
CHANGELOG.mddesktop/README.mdnotesstart.logand fail-fast exit 10