tauri-apps/tauri · error
The isolation application path is set to `{dir:?}` but it do
Error message
The isolation application path is set to `{dir:?}` but it does not exist What it means
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.
Source
Thrown at crates/tauri-codegen/src/context.rs:362
tauri::embed_plist::embed_info_plist!(#plist);
})
} else {
quote!()
};
#[cfg(not(target_os = "macos"))]
let maybe_embed_plist_block = quote!();
let pattern = match &options.pattern {
PatternKind::Brownfield => quote!(#root::Pattern::Brownfield),
#[cfg(not(feature = "isolation"))]
PatternKind::Isolation { dir: _ } => {
quote!(#root::Pattern::Brownfield)
}
#[cfg(feature = "isolation")]
PatternKind::Isolation { dir } => {
let dir = config_parent.join(dir);
if !dir.exists() {
panic!("The isolation application path is set to `{dir:?}` but it does not exist")
}
let mut sets_isolation_hook = false;
let key = uuid::Uuid::new_v4().to_string();
let map_isolation = map_isolation(&options, dir.clone());
let assets = EmbeddedAssets::new(dir, &options, |key, path, input, csp_hashes| {
// we check if `__TAURI_ISOLATION_HOOK__` exists in the isolation code
// before modifying the files since we inject our own `__TAURI_ISOLATION_HOOK__` reference in HTML files
if String::from_utf8_lossy(input).contains("__TAURI_ISOLATION_HOOK__") {
sets_isolation_hook = true;
}
map_isolation(key, path, input, csp_hashes)
})?;
if !sets_isolation_hook {
panic!("The isolation application does not contain a file setting the `window.__TAURI_ISOLATION_HOOK__` value.");
}View on GitHub (pinned to 52e4b6e71d)
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
Example fix
// before (tauri.conf.json)
"app": { "security": { "pattern": { "use": "isolation", "isolation": { "dir": "../isolate" } } } }
// 'isolate' folder missing -> panic
// after
mkdir -p ../isolate && printf '<!doctype html><html><body><script>window.__TAURI_ISOLATION_HOOK__ = (e) => {};</script></body></html>' > ../isolate/index.html Defensive patterns
Strategy: validation
Validate before calling
#!/usr/bin/env bash
dir=$(jq -r '.app.security.pattern.isolation.dir // empty' src-tauri/tauri.conf.json)
[ -n "$dir" ] && [ -d "src-tauri/$dir" ] || { echo "isolation dir '$dir' missing"; exit 1; } Prevention
- 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
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- The isolation application does not contain a file setting th
- The `frontendDist` configuration is set to `{path:?}` but th
- failed to read plist {}: {}
- failed to parse icon {}: {}
- failed to decode icon {}: {}
AI-assisted analysis of tauri-apps/tauri@52e4b6e71d (2026-08-20).
Data as JSON: /api/errors/68483f0a5b8fb4a9.
Report an issue: GitHub.