agentscope-ai / agentscope-ai/QwenPaw
[Bug]: Desktop (macOS) local Whisper shows "ffmpeg: disabled" — backend PATH excludes /opt/homebrew/bin so Homebrew ffmpeg is never found
- Vorherrschende Sprache
- Python
- Sterne
- 34.9k
- Forks
- 3.1k
- Ø Merge
- 1 T. 15 Std.
- Gemergte PRs (30 T.)
- 225
Beschreibung
## QwenPaw Version
v2.1.0-beta.2 (Desktop, Tauri)
## Description
On macOS (Apple Silicon), the Console settings page keeps showing **"本地 Whisper 未就绪: ffmpeg: 已禁用 | openai-whisper: 已启用"** (Local Whisper not ready: ffmpeg disabled / openai-whisper enabled), even though ffmpeg IS installed via Homebrew at `/opt/homebrew/bin/ffmpeg`.
Root cause: the Desktop backend process runs with a **restricted PATH** (`:/usr/bin:/bin:/usr/sbin:/sbin`) that does NOT include `/opt/homebrew/bin` (the default Homebrew prefix on Apple Silicon). The readiness check uses `shutil.which("ffmpeg")`, which therefore fails even though ffmpeg exists on the system.
## Component(s) Affected
- [x] Core / Backend (app, agents, config, providers, utils, local_models)
- [ ] Console (frontend web UI)
- [ ] Channels (DingTalk, Feishu, QQ, Discord, iMessage, etc.)
- [ ] Skills
- [ ] CLI
- [ ] Documentation (website)
- [ ] Tests
- [ ] CI/CD
- [ ] Scripts / Deploy
## Environment
- **QwenPaw version:** v2.1.0-beta.2 (Desktop)
- **OS:** macOS 25.6 (Apple Silicon, arm64)
- **Install method:** Desktop app (Tauri shell)
- **ffmpeg:** 8.1.2 at /opt/homebrew/bin/ffmpeg (Homebrew)
## Steps to Reproduce
1. macOS (Apple Silicon), install ffmpeg via Homebrew: `brew install ffmpeg` → `/opt/homebrew/bin/ffmpeg`.
2. Install QwenPaw Desktop v2.1.0-beta.2.
3. Open Console → Settings. Local Whisper shows `ffmpeg: 已禁用` (disabled).
## Actual vs Expected
- **Actual:** `shutil.which("ffmpeg")` returns None inside the backend because `/opt/homebrew/bin` is not in the backend's PATH. Whisper cannot transcribe audio.
- **Expected:** The readiness check should find Homebrew ffmpeg (either by adding `/opt/homebrew/bin` to the backend PATH, or by explicitly checking common macOS install locations).
## Logs / Screenshots
Verified with the restricted PATH (simulating the backend env):
```
$ env PATH=":/usr/bin:/bin:/usr/sbin:/sbin" python3 -c "import shutil; print(shutil.which('ffmpeg'))"
None # ← Homebrew ffmpeg NOT found
$ env PATH=":/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin" python3 -c "import shutil; print(shutil.which('ffmpeg'))"
/opt/homebrew/bin/ffmpeg # ← found once /opt/homebrew/bin is in PATH
```
## Additional Notes
- Workaround: a symlink/wrapper `ffmpeg` inside the backend binaries dir (`qwenpaw-backend/ffmpeg` → `/opt/homebrew/bin/ffmpeg`) makes the check pass. But the wrapper is **wiped on every app update**, so this is a recurring user pain point.
- Suggested fix: include `/opt/homebrew/bin` (and possibly `/usr/local/bin`) in the backend PATH on macOS, or make the ffmpeg readiness check fall back to these known paths.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.