{"record":{"id":"925de8de46302347","repo":"laurent22/joplin","slug":"model-not-found-at-path-modelpath","errorCode":null,"errorMessage":"Model not found at path ${modelPath}","messagePattern":"Model not found at path (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/app-mobile/services/voiceTyping/whisper.ts","lineNumber":266,"sourceCode":"\t\tlogger.debug('Creating Whisper session from path', modelFolderPath);\n\t\tif (!await shim.fsDriver().exists(modelFolderPath)) throw new Error(`No model found at path: ${JSON.stringify(modelFolderPath)}`);\n\n\t\tif (Setting.value('env') === Env.Dev) {\n\t\t\ttry {\n\t\t\t\tawait testWhisper();\n\t\t\t} catch (error) {\n\t\t\t\tlogger.error('Testing error', error);\n\t\t\t\tawait shim.showErrorDialog(`Test failure: ${error}`);\n\t\t\t}\n\t\t}\n\n\t\tconst modelPath = join(modelFolderPath, 'model.bin');\n\t\tconst configJsonPath = join(modelFolderPath, 'config.json');\n\t\tconst configJson = JSON.parse(await shim.fsDriver().readFile(configJsonPath, 'utf-8'));\n\t\tconst config = new WhisperConfig(configJson);\n\n\t\tif (!await shim.fsDriver().exists(modelPath)) {\n\t\t\tthrow new Error(`Model not found at path ${modelPath}`);\n\t\t}\n\n\t\tlogger.debug('Starting whisper session', config.supportsShortAudioCtx ? '(short audio context)' : '');\n\t\tconst session = openSession({\n\t\t\tmodelPath, locale, prompt: getPrompt(locale, config.prompts), shortAudioContext: config.supportsShortAudioCtx,\n\t\t});\n\t\treturn new Whisper(session, callbacks, config);\n\t},\n\tmodelName: 'whisper',\n};\n\nexport default whisper;\n","sourceCodeStart":248,"sourceCodeEnd":279,"githubUrl":"https://github.com/laurent22/joplin/blob/2654b33620775080d1d59c552259d41e33dad3d2/packages/app-mobile/services/voiceTyping/whisper.ts#L248-L279","documentation":"Thrown by the whisper provider's `build` when the model folder exists but the `model.bin` file inside it does not. This check runs after `config.json` is read and parsed, just before opening the Whisper session.","triggerScenarios":"The folder is present (so error 94 does not fire) but `model.bin` was deleted, never extracted from the zip, or named differently. Happens when a partial download/unzip left the folder with only `config.json`.","commonSituations":"Unzip extracted only `config.json`; the zip's inner filename differed from `model.bin`; an external cleaner removed large files from cache; partial extraction after an interrupt.","solutions":["Re-download: call `clearDownloads()` then `download()` to get a complete bundle.","Verify the extracted folder contains `model.bin` after download (the unzip step expects exactly one inner entry).","Free device storage before retrying."],"exampleFix":"// before\nconst session = await provider.build({ modelPath, callbacks, locale });\n\n// after\nif (!await shim.fsDriver().exists(join(modelPath, 'model.bin'))) {\n  await voiceTyping.clearDownloads();\n  await voiceTyping.download();\n}\nconst session = await provider.build({ modelPath, callbacks, locale });","handlingStrategy":"validation","validationCode":"const modelBin = join(modelPath, 'model.bin');\nif (!await shim.fsDriver().exists(modelBin)) {\n  logger.warn('model.bin missing; re-downloading bundle');\n  await voiceTyping.clearDownloads();\n  await voiceTyping.download();\n}","typeGuard":"null","tryCatchPattern":"try {\n  return await provider.build({ modelPath, callbacks, locale });\n} catch (error) {\n  if (/Model not found at path/i.test(error.message)) {\n    await voiceTyping.clearDownloads();\n    await voiceTyping.download();\n    return provider.build({ modelPath, callbacks, locale });\n  }\n  throw error;\n}","preventionTips":["Confirm the unzip step extracted model.bin before build.","Re-download on partial extraction.","Free device storage before retrying."],"tags":["voice-typing","whisper","filesystem","precondition","mobile"],"backgroundTag":null,"analyzedSha":"2654b33620775080d1d59c552259d41e33dad3d2","analyzedAt":"2026-08-12T14:26:46.263Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}