tauri-apps/tauri · error

failed to read plist {}: {}

Error message

failed to read plist {}: {}

What it means

Compile-time panic in tauri-codegen on macOS dev builds. If an Info.plist file sits next to tauri.conf.json, it is parsed with plist::Value::from_file so codegen can merge in bundle settings; a file that exists but cannot be parsed panics with the path and the underlying plist error.

Source

Thrown at crates/tauri-codegen/src/context.rs:306

  let with_tray_icon_code = if target.is_desktop() {
    if let Some(tray) = &config.app.tray_icon {
      let tray_icon_icon_path = config_parent.join(&tray.icon_path);
      let icon = CachedIcon::new(&root, &tray_icon_icon_path)?;
      quote!(context.set_tray_icon(::std::option::Option::Some(#icon));)
    } else {
      quote!()
    }
  } else {
    quote!()
  };

  #[cfg(target_os = "macos")]
  let maybe_embed_plist_block = if target == Target::MacOS && dev && !running_tests {
    let info_plist_path = config_parent.join("Info.plist");
    let mut info_plist = if info_plist_path.exists() {
      plist::Value::from_file(&info_plist_path)
        .unwrap_or_else(|e| panic!("failed to read plist {}: {}", info_plist_path.display(), e))
    } else {
      plist::Value::Dictionary(Default::default())
    };

    if let Some(plist) = info_plist.as_dictionary_mut() {
      if let Some(bundle_name) = config
        .bundle
        .macos
        .bundle_name
        .as_ref()
        .or(config.product_name.as_ref())
      {
        plist.insert("CFBundleName".into(), bundle_name.as_str().into());
      }

      if let Some(version) = &config.version {
        let bundle_version = &config.bundle.macos.bundle_version;
        plist.insert("CFBundleShortVersionString".into(), version.clone().into());

View on GitHub (pinned to 52e4b6e71d)

Solutions

  1. Validate the file: `plutil -lint src-tauri/Info.plist` and fix the reported line
  2. Delete the Info.plist to let Tauri generate one from tauri.conf.json (bundle > macOS settings), which is the recommended flow
  3. Keep custom keys minimal and well-formed XML; re-create the file from a known-good template if unsure

Example fix

# before
plutil -lint src-tauri/Info.plist   # reports syntax error -> codegen panics

# after
plutil -lint src-tauri/Info.plist   # 'OK'
# or simply: rm src-tauri/Info.plist  (configure via tauri.conf.json bundle.macOS)
Defensive patterns

Strategy: validation

Validate before calling

#!/usr/bin/env bash
[ -f src-tauri/Info.plist ] && plutil -lint src-tauri/Info.plist # must print OK

Prevention

When it happens

Trigger: A hand-edited src-tauri/Info.plist with malformed XML (unclosed tags, stray characters, wrong doctype) or a corrupt/binary file the plist crate rejects in this context.

Common situations: Manually editing Info.plist instead of using tauri.conf.json bundle > macOS keys; merge conflicts resolved badly; files written with a wrong encoding.

Related errors


AI-assisted analysis of tauri-apps/tauri@52e4b6e71d (2026-08-20). Data as JSON: /api/errors/3f2ef7249d1845be. Report an issue: GitHub.