tauri-apps/tauri · error

The isolation application path is set to

Error message

The isolation application path is set to `{dir:?}` but it does not exist

What it means

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.

Solutions

  1. Create the configured isolation directory and build the isolation app into it (it must set window.__TAURI_ISOLATION_HOOK__)
  2. Fix the `dir` in tauri.conf.json to point at the actual folder, relative to src-tauri
  3. Verify the path exists from the build context: check `src-tauri/<dir>` exists where the build runs
  4. If submodules are used, run `git submodule update --init --recursive`
  5. If isolation is not needed, switch app.security.pattern back to Brownfield

Example fix

// before (tauri.conf.json)
"pattern": { "use": "isolation", "options": { "dir": "../isolation/dist" } }
// after
git submodule update --init --recursive  # ensure ../isolation/dist exists
"pattern": { "use": "isolation", "options": { "dir": "../isolation/dist" } }
Defensive patterns

Strategy: validation

Validate before calling

import os, json, sys
cfg = json.load(open('src-tauri/tauri.conf.json'))
iso = cfg.get('app', {}).get('security', {}).get('pattern', {}).get('options', {}).get('dir')
if iso and not os.path.isdir(os.path.join('src-tauri', iso)):
    sys.exit(f'isolation dir missing: {iso}')

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of tauri-apps/tauri@460ec35447 (2026-09-18). Data as JSON: /api/errors/68483f0a5b8fb4a9. Report an issue: GitHub.

Appendix: 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 460ec35447)