{"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!(\n          \"The isolation application does not contain a file setting the `window.__TAURI_ISOLATION_HOOK__` value.\"","sourceCodeStart":344,"sourceCodeEnd":380,"githubUrl":"https://github.com/tauri-apps/tauri/blob/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri-codegen/src/context.rs#L344-L380","documentation":"The Tauri configuration declares an isolation pattern (PatternKind::Isolation) with a directory containing the isolation application, but at compile time that directory does not exist on disk. The codegen macro joins the configured dir with the config parent path and panics when `dir.exists()` is false, aborting the build.","triggerScenarios":"Setting `app.security.pattern` to Isolation with a `dir` in tauri.conf.json whose path does not exist relative to src-tauri; typos in the dir path; deleting or renaming the isolation app folder; building from a different working directory so the relative path resolves elsewhere.","commonSituations":"Cloning a repo without submodules/LFS that carried the isolation assets; following the isolation guide but forgetting to create the dist folder for the isolation app; moving tauri.conf.json or the isolation directory without updating the config; case-sensitive filesystems on Linux/CI mismatching folder name casing.","solutions":["Create the configured isolation directory and build the isolation app into it (it must set window.__TAURI_ISOLATION_HOOK__)","Fix the `dir` in tauri.conf.json to point at the actual folder, relative to src-tauri","Verify the path exists from the build context: check `src-tauri/<dir>` exists where the build runs","If submodules are used, run `git submodule update --init --recursive`","If isolation is not needed, switch app.security.pattern back to Brownfield"],"exampleFix":"// before (tauri.conf.json)\n\"pattern\": { \"use\": \"isolation\", \"options\": { \"dir\": \"../isolation/dist\" } }\n// after\ngit submodule update --init --recursive  # ensure ../isolation/dist exists\n\"pattern\": { \"use\": \"isolation\", \"options\": { \"dir\": \"../isolation/dist\" } }","handlingStrategy":"validation","validationCode":"import os, json, sys\ncfg = json.load(open('src-tauri/tauri.conf.json'))\niso = cfg.get('app', {}).get('security', {}).get('pattern', {}).get('options', {}).get('dir')\nif iso and not os.path.isdir(os.path.join('src-tauri', iso)):\n    sys.exit(f'isolation dir missing: {iso}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build the isolation app into the configured dir as a pre-build step","Check the isolation dir into the repo (or use submodules and init them in CI)","Verify paths on case-sensitive CI filesystems","Only enable isolation pattern once the isolation app exists"],"tags":["config","isolation","codegen","path"],"backgroundTag":"directory-not-found","analyzedSha":"460ec35447493200d64290dd7f015d5a91d0fd58","analyzedAt":"2026-09-18T23:55:51.277Z","contentChangedAt":"2026-09-18T23:55:51.277Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}