tauri-apps/tauri · error

unable to autogenerate core:default set

Error message

unable to autogenerate core:default set

What it means

When building the `tauri` core, `define_default_permission_set` writes the autogenerated `core:default` permission set TOML listing every core plugin's `:default` permission. If writing that file fails, the build script panics. Like error 25, this is a filesystem failure during ACL codegen.

Solutions

  1. Make the `crates/tauri/permissions/` tree writable for the build user.
  2. Close processes locking the target file (editors, antivirus) or retry the build.
  3. Check disk space/quota and that the checkout isn't mounted read-only.
  4. Re-clone or git restore the permissions directory if it was manually modified.

Example fix

// before
sudo mount -o ro /workspace
// after
mount -o rw /workspace && cargo build
Defensive patterns

Strategy: validation

Validate before calling

[ -w crates/tauri/permissions ] || chmod -R u+w crates/tauri/permissions

Prevention

When it happens

Trigger: `define_default_permission_set` calls `write_if_changed(default_toml, toml_content)`; the write fails due to read-only workspace, a locked file, invalid path, or full disk while building the core `tauri` crate.

Common situations: Read-only CI checkouts; Windows file locks (indexer/antivirus); building a vendored/read-only copy of tauri; disk quota issues.

Understand the failure class

Background: "failed to write file", "Could not save figure", "Error saving remote file" — file write failed: causes and fixes across languages and libraries — this error's family across 38 libraries.

Related errors


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

Appendix: source

Thrown at crates/tauri/build.rs:466

    .expect("failed to create core:default permissions directory");

  let default_toml = permissions_out_dir.join("default.toml");
  let toml_content = format!(
    r#"{LICENSE_HEADER}

[default]
description = "Default core plugins set."
permissions = [{}]
"#,
    PLUGINS
      .iter()
      .map(|(k, _)| format!("\"{k}:default\""))
      .collect::<Vec<_>>()
      .join(",")
  );

  write_if_changed(default_toml, toml_content)
    .unwrap_or_else(|_| panic!("unable to autogenerate core:default set"));

  tauri_utils::acl::build::define_permissions(
    &PathBuf::from(glob::Pattern::escape(
      &permissions_out_dir.to_string_lossy(),
    ))
    .join("*.toml")
    .to_string_lossy(),
    "tauri:core",
    out_dir,
    |_| true,
  )
  .unwrap_or_else(|e| panic!("failed to define permissions for `core:default` : {e}"))
}

fn embed_manifest_for_tests() {
  static WINDOWS_MANIFEST_FILE: &str = "windows-app-manifest.xml";

  let manifest = std::env::current_dir()

View on GitHub (pinned to 460ec35447)