{"record":{"id":"cee879556928ca93","repo":"SubtitleEdit/subtitleedit","slug":"qwen3-tts-server-executable-not-found","errorCode":null,"errorMessage":"Qwen3 TTS server executable not found.","messagePattern":"Qwen3 TTS server executable not found\\.","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"critical","filePath":"src/ui/Features/Video/TextToSpeech/Engines/Qwen3TtsCpp.cs","lineNumber":349,"sourceCode":"\n        await ServerLock.WaitAsync(ct);\n        try\n        {\n            if (_serverProcess is { HasExited: false } && _serverPort != 0 && _serverModelFileName == modelFileName)\n            {\n                return;\n            }\n\n            // Different model selected, or server not running — (re)start with the requested model.\n            if (_serverProcess != null)\n            {\n                StopServerInternal();\n            }\n\n            var exe = GetExecutableFileName();\n            if (!File.Exists(exe))\n            {\n                throw new FileNotFoundException(\"Qwen3 TTS server executable not found.\", exe);\n            }\n\n            var port = FindFreeLoopbackPort();\n            var psi = new ProcessStartInfo\n            {\n                WorkingDirectory = GetSetFolder(),\n                FileName = exe,\n                UseShellExecute = false,\n                CreateNoWindow = true,\n                RedirectStandardError = true,\n                RedirectStandardOutput = true,\n            };\n            psi.ArgumentList.Add(\"-m\");\n            psi.ArgumentList.Add(GetSetModelsFolder());\n            psi.ArgumentList.Add(\"--model-name\");\n            psi.ArgumentList.Add(modelFileName);\n            psi.ArgumentList.Add(\"--host\");\n            psi.ArgumentList.Add(\"127.0.0.1\");","sourceCodeStart":331,"sourceCodeEnd":367,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/ui/Features/Video/TextToSpeech/Engines/Qwen3TtsCpp.cs#L331-L367","documentation":"Thrown by EnsureServerRunningAsync when GetExecutableFileName() resolves to a path that does not exist on disk. It is a FileNotFoundException whose FileName carries the resolved exe path, surfaced before any Process.Start attempt so the user gets a precise 'what is missing' instead of a Win32 error.","triggerScenarios":"The Qwen3 TTS set folder was never installed or was partially deleted; GetExecutableFileName points at a per-OS binary name (qwen3-tts-server.exe / qwen3-tts-server) that the installer didn't stage for this platform; the user moved the set folder after configuration.","commonSituations":"First run on a machine where the Qwen3 TTS dependency bundle wasn't downloaded; a portable install where the path in settings points at a drive that's no longer mounted; cross-platform copy that brought only Windows binaries to Linux.","solutions":["Check the FileName in the exception — it tells you the exact resolved path that's missing.","Re-run the Qwen3 TTS set installer/downloader so the binary is staged under the configured models folder.","Verify GetSetFolder() in settings points at the folder that actually contains the executable for your OS.","Confirm the OS-appropriate binary name exists (qwen3-tts-server.exe on Windows, qwen3-tts-server on Linux/macOS)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"var exe = GetExecutableFileName();\nif (!File.Exists(exe))\n    throw new FileNotFoundException(\"Qwen3 TTS server executable not found.\", exe);\n// Or, before calling Speak, surface a friendly 'install required' state in the UI:\nvar installed = File.Exists(GetExecutableFileName());","typeGuard":null,"tryCatchPattern":"try { await EnsureServerRunningAsync(modelFileName, ct); }\ncatch (FileNotFoundException ex) when (ex.FileName == GetExecutableFileName())\n{\n    // Prompt the user to install the Qwen3 TTS bundle, then retry.\n    await OfferInstallAsync();\n}","preventionTips":["Run an install/availability check when the engine is selected, not only at Speak time.","Stage the OS-appropriate binary name during install.","Validate GetSetFolder() resolves to an existing directory at startup."],"tags":["tts","qwen3-tts","file-not-found","setup","csharp"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}