{"record":{"id":"68483f0a5b8fb4a9","repo":"tauri-apps/tauri","slug":"the-isolation-application-path-is-set-to-dir","errorCode":null,"errorMessage":"The isolation application path is set to `{dir:?}` but it does not exist","messagePattern":"The isolation application path is set to `(.+?)` but it does not exist","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-codegen/src/context.rs","lineNumber":362,"sourceCode":"      tauri::embed_plist::embed_info_plist!(#plist);\n    })\n  } else {\n    quote!()\n  };\n  #[cfg(not(target_os = \"macos\"))]\n  let maybe_embed_plist_block = quote!();\n\n  let pattern = match &options.pattern {\n    PatternKind::Brownfield => quote!(#root::Pattern::Brownfield),\n    #[cfg(not(feature = \"isolation\"))]\n    PatternKind::Isolation { dir: _ } => {\n      quote!(#root::Pattern::Brownfield)\n    }\n    #[cfg(feature = \"isolation\")]\n    PatternKind::Isolation { dir } => {\n      let dir = config_parent.join(dir);\n      if !dir.exists() {\n        panic!(\"The isolation application path is set to `{dir:?}` but it does not exist\")\n      }\n\n      let mut sets_isolation_hook = false;\n\n      let key = uuid::Uuid::new_v4().to_string();\n      let map_isolation = map_isolation(&options, dir.clone());\n      let assets = EmbeddedAssets::new(dir, &options, |key, path, input, csp_hashes| {\n        // we check if `__TAURI_ISOLATION_HOOK__` exists in the isolation code\n        // before modifying the files since we inject our own `__TAURI_ISOLATION_HOOK__` reference in HTML files\n        if String::from_utf8_lossy(input).contains(\"__TAURI_ISOLATION_HOOK__\") {\n          sets_isolation_hook = true;\n        }\n        map_isolation(key, path, input, csp_hashes)\n      })?;\n\n      if !sets_isolation_hook {\n        panic!(\"The isolation application does not contain a file setting the `window.__TAURI_ISOLATION_HOOK__` value.\");\n      }","sourceCodeStart":344,"sourceCodeEnd":380,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-codegen/src/context.rs#L344-L380","documentation":"Compile-time panic in tauri-codegen when the Isolation pattern is enabled (feature 'isolation' + app > security > pattern use = 'isolation'). The configured isolation dir is joined onto the config's parent directory; if that path does not exist, generation aborts because Tauri must embed the isolation frontend as assets.","triggerScenarios":"Configuring the isolation pattern without having created the isolation frontend directory; a typo'd dir value; the directory existing in one checkout but not on CI (gitignored or not committed).","commonSituations":"Following the isolation guide but skipping the 'create the isolation app' step; moving/renaming the folder without updating config; fresh clones missing an untracked directory.","solutions":["Create the configured isolation directory with at least an index.html (and your isolation scripts)","Fix the `dir` path under app > security > pattern so it points at the existing folder relative to tauri.conf.json","If isolation is not actually wanted, remove the pattern config to fall back to Brownfield"],"exampleFix":"// before (tauri.conf.json)\n\"app\": { \"security\": { \"pattern\": { \"use\": \"isolation\", \"isolation\": { \"dir\": \"../isolate\" } } } }\n// 'isolate' folder missing -> panic\n\n// after\nmkdir -p ../isolate && printf '<!doctype html><html><body><script>window.__TAURI_ISOLATION_HOOK__ = (e) => {};</script></body></html>' > ../isolate/index.html","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\ndir=$(jq -r '.app.security.pattern.isolation.dir // empty' src-tauri/tauri.conf.json)\n[ -n \"$dir\" ] && [ -d \"src-tauri/$dir\" ] || { echo \"isolation dir '$dir' missing\"; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Commit the isolation directory (even a minimal index.html) together with the pattern config","Add a CI step that checks the configured isolation dir exists","If you disable isolation temporarily, remove the pattern config so codegen takes the Brownfield path"],"tags":["isolation-pattern","tauri-codegen","codegen","security","config"],"backgroundTag":"configured-directory-missing","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}