Skip to content

Fix: support macOS arm64 packaged webapp startup#5777

Open
Acfufu wants to merge 1 commit into
LmeSzinc:masterfrom
Acfufu:codex/fix-macos-webapp-packaging
Open

Fix: support macOS arm64 packaged webapp startup#5777
Acfufu wants to merge 1 commit into
LmeSzinc:masterfrom
Acfufu:codex/fix-macos-webapp-packaging

Conversation

@Acfufu

@Acfufu Acfufu commented Jul 4, 2026

Copy link
Copy Markdown

Summary

  • locate the ALAS root for packaged Electron launches instead of relying on process.cwd()
  • keep the configured Deploy.Python.PythonExecutable when it exists
  • add a macOS arm64 fallback that looks for a local alas conda environment when the default Windows ./toolkit/python.exe path is missing

Problem

Fixes #5105.

On macOS arm64, the packaged Electron app can start from Finder or another non-repo working directory. In that case the main process should not assume process.cwd() is the project root. The default Python path in config/deploy.yaml also points to ./toolkit/python.exe, which does not exist on Apple Silicon setups and causes spawn .../toolkit/python.exe ENOENT.

Issue #1873 already shows that Apple Silicon users need to provide their own Python environment. This change keeps the current config-first behavior, but lets the packaged app recover by using a local alas conda environment when the configured Windows path is unavailable.

Verification

  • cd webapp && PATH=/Users/acfufu/.nvm/versions/node/v16.20.2/bin:$PATH npm run typecheck
  • cd webapp && PATH=/Users/acfufu/.nvm/versions/node/v16.20.2/bin:$PATH npm run build
  • cd webapp && PATH=/Users/acfufu/.nvm/versions/node/v16.20.2/bin:$PATH npm run compile
  • launched webapp/dist/mac-arm64/alas.app/Contents/MacOS/alas from /tmp
  • confirmed the packaged app responded on http://127.0.0.1:22267/ without toolkit/python.exe spawn errors

Notes

  • the repository pre-push hook currently runs npm run typecheck from the repo root, but the only package.json is under webapp/, so that hook fails before checking the actual webapp workspace
  • npm test still times out in the existing Electron smoke test while waiting for the first window, even though the packaged app and WebUI start successfully

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.

mac下yarn生成客户端不可用

1 participant