From 612d3e1f88dd3278b25412897ab9ec0145f9e60c Mon Sep 17 00:00:00 2001 From: krypticmouse Date: Sat, 23 May 2026 15:48:13 +0000 Subject: [PATCH] fix(install): make Windows install path discoverable + bail early on Git Bash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses the second half of the Discord support thread on the "Jarvis server did not become healthy in time" issue (PR #398 fixed the diagnostic gap; this fixes discoverability of the right install path so users don't end up there in the first place). Three changes, all surface improvements: 1. **`README.md`** — explicit Windows section in the Installation block. Previously, the only Windows mention was a footnote ("Platforms: ... WSL2 on Windows") that came AFTER the `curl … | bash` install command. Users on PowerShell would copy/paste the command, get a syntax error, then try to debug bash on Windows. Now the README clearly says: bash installer is macOS/Linux only; Windows users have two paths (WSL2 with one-time `wsl --install` setup, or the desktop .exe from Releases). Both link to the relevant docs. 2. **`scripts/install/install.sh`** — early bail when running under Git Bash / MSYS2 / Cygwin (MINGW*, MSYS*, CYGWIN* per `uname -s`). These environments aren't WSL — `uv` and `git` will install to Windows-side paths that OpenJarvis can't reach, Ollama integration silently breaks, and the user gets to debug it 3 minutes into a doomed install. The bail message points at both the WSL2 setup command (`wsl --install -d Ubuntu-24.04`) and the desktop .exe download as alternatives. Verified the case-match doesn't fire on Linux (`uname -s` → `Linux`, matches the wildcard fall-through, not the MINGW patterns). 3. **`frontend/src-tauri/src/lib.rs`** — when `resolve_bin("uv")` can't find uv, the per-OS error message now contains the exact install command for the user's OS, ready to copy/paste. On Windows that's the `irm https://astral.sh/uv/install.ps1 | iex` command Marc kept reposting on the Discord support thread (5/12-5/14). On macOS/Linux it's the standard `curl | sh` installer. The previous generic "Install it from https://astral.sh/uv" left users guessing whether to use winget, scoop, pip, or the official installer — which is exactly the confusion the Discord thread captured. None of these are root-cause code fixes (Discord users' uv installs fail for environment-specific reasons we can't diagnose remotely), but together they remove the three biggest friction sources we saw: copy-paste install command that can't possibly work, doomed git-bash installs that fail mysteriously, and missing exact install commands when uv isn't found. The Tauri change ships in the desktop binary; the README change is visible immediately on the repo page; the install.sh change reaches users via openjarvis.ai (when it's restored) and via the GitHub-raw fallback from PR #398. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 15 +++++++++++++-- frontend/src-tauri/src/lib.rs | 31 +++++++++++++++++++++++++------ scripts/install/install.sh | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 71b5795d..2b98c9c4 100644 --- a/README.md +++ b/README.md @@ -31,11 +31,22 @@ OpenJarvis is that stack. It is a framework for local-first personal AI, built a ## Installation +**macOS / Linux:** + ```bash curl -fsSL https://openjarvis.ai/install.sh | bash ``` -> **If you see `sslv3 alert handshake failure` on `openjarvis.ai`** ([issue #337](https://github.com/open-jarvis/OpenJarvis/issues/337)), use the GitHub mirror until the domain is restored: +**Windows:** the installer is a `bash` script and won't run in PowerShell or `cmd`. Pick one of: + +- **WSL2 (recommended for the CLI / Python SDK)** — one-time setup in an admin PowerShell, then run the same `curl … | bash` inside Ubuntu: + ```powershell + wsl --install -d Ubuntu-24.04 + ``` + Open the Ubuntu shell that gets installed, then follow [WSL2 install instructions](https://open-jarvis.github.io/OpenJarvis/getting-started/wsl2/). +- **Desktop app** — download the `.exe` from the [Releases page](https://github.com/open-jarvis/OpenJarvis/releases) for the GUI experience, no terminal required. + +> **If `curl` fails on `openjarvis.ai` with `sslv3 alert handshake failure`** ([issue #337](https://github.com/open-jarvis/OpenJarvis/issues/337)), use the GitHub mirror until the domain is restored: > > ```bash > curl -fsSL https://raw.githubusercontent.com/open-jarvis/OpenJarvis/main/scripts/install/install.sh | bash @@ -51,7 +62,7 @@ jarvis The Rust extension and bigger models continue downloading in the background while you chat. Run `jarvis doctor` to see status. -**Platforms:** macOS (Intel + Apple Silicon), Linux, WSL2 on Windows. +**Platforms:** macOS (Intel + Apple Silicon), Linux, WSL2 on Windows. Native Windows is not supported — use WSL2 or the desktop binary. **Manual install / contributors:** see [docs/getting-started/install.md](docs/getting-started/install.md). diff --git a/frontend/src-tauri/src/lib.rs b/frontend/src-tauri/src/lib.rs index 5108979d..5643640f 100644 --- a/frontend/src-tauri/src/lib.rs +++ b/frontend/src-tauri/src/lib.rs @@ -495,14 +495,33 @@ async fn boot_backend(backend: SharedBackend, status: SharedStatus) { let uv_bin = resolve_bin("uv"); - // Verify uv is actually installed + // Verify uv is actually installed. Concrete per-OS instructions — + // the generic "install it from astral.sh" was the #1 source of + // confusion on the Discord support thread; users couldn't tell whether + // to use winget, scoop, pip, or the official installer. if !std::path::Path::new(&uv_bin).exists() && uv_bin == "uv" { let mut s = status.lock().await; - s.error = Some( - "Could not find 'uv' (Python package manager). \ - Install it from https://astral.sh/uv then relaunch." - .into(), - ); + #[cfg(target_os = "windows")] + let msg = "Could not find 'uv' (Python package manager). \ + To install on Windows, open PowerShell and run:\n\n\ + powershell -ExecutionPolicy Bypass -c \"irm https://astral.sh/uv/install.ps1 | iex\"\n\n\ + Then close and relaunch this app. \ + (If the install completes but the app still can't find uv, \ + you may need to log out and back in so PATH refreshes.)"; + #[cfg(target_os = "macos")] + let msg = "Could not find 'uv' (Python package manager). \ + To install on macOS, open Terminal and run:\n\n\ + curl -LsSf https://astral.sh/uv/install.sh | sh\n\n\ + Then relaunch this app."; + #[cfg(target_os = "linux")] + let msg = "Could not find 'uv' (Python package manager). \ + To install on Linux, open a terminal and run:\n\n\ + curl -LsSf https://astral.sh/uv/install.sh | sh\n\n\ + Then relaunch this app."; + #[cfg(not(any(target_os = "windows", target_os = "macos", target_os = "linux")))] + let msg = "Could not find 'uv' (Python package manager). \ + Install it from https://astral.sh/uv then relaunch."; + s.error = Some(msg.into()); return; } diff --git a/scripts/install/install.sh b/scripts/install/install.sh index 2fa0d0d9..ef3c4041 100755 --- a/scripts/install/install.sh +++ b/scripts/install/install.sh @@ -29,6 +29,40 @@ for arg in "$@"; do esac done +# ---- non-WSL Windows refusal ---- +# Running the installer in Git Bash / MSYS2 / Cygwin on native Windows +# (i.e. NOT inside WSL2) gets the user into a confusing failure state: +# uv/git tooling installs to Windows paths the rest of OpenJarvis can't +# reach, and Ollama integration silently breaks. The supported Windows +# path is WSL2. Bail early with a clear next step rather than letting +# users discover this 3 minutes into a doomed install. +case "$(uname -s 2>/dev/null)" in + MINGW*|MSYS*|CYGWIN*) + cat >&2 <<'EOF' +install.sh: native Windows (Git Bash / MSYS2 / Cygwin) is not supported. + +OpenJarvis runs on Windows via WSL2. Two paths: + + 1. WSL2 (recommended for the CLI). One-time setup in an admin PowerShell: + + wsl --install -d Ubuntu-24.04 + + Open the Ubuntu shell that gets installed, then re-run: + + curl -fsSL https://openjarvis.ai/install.sh | bash + + (or the github mirror — see README if openjarvis.ai is down.) + + 2. Desktop app — download the .exe from the Releases page: + https://github.com/open-jarvis/OpenJarvis/releases + +See the WSL2 install guide for the full walkthrough: + https://open-jarvis.github.io/OpenJarvis/getting-started/wsl2/ +EOF + exit 1 + ;; +esac + # ---- root refusal ---- if [[ "$(id -u)" -eq 0 ]]; then cat >&2 <<'EOF'