DioxusLabs/dioxus · error · anyhow::Error
Bundle identifier was not provided in `Dioxus.toml`. Add i
Error message
Bundle identifier was not provided in `Dioxus.toml`. Add it as: [bundle] identifier = "com.mycompany"
What it means
Validation guard in bundle_with_package_types: instead of failing silently when a bundled output requires an identifier, the code checks required Dioxus.toml fields and bails with an actionable snippet. This error means the `[bundle]` section of Dioxus.toml has no `identifier` key, which macOS app bundles (and other package formats) require — the input at fault is the project's bundle configuration.
Source
Thrown at packages/cli/src/cli/bundle.rs:170
let krate = &build;
let exe = build.main_exe();
_ = std::fs::remove_dir_all(krate.bundle_dir(build.bundle));
let mut name: PathBuf = krate.executable_name().into();
if build.triple.operating_system == OperatingSystem::Windows {
name.set_extension("exe");
}
std::fs::create_dir_all(krate.bundle_dir(build.bundle))
.context("Failed to create bundle directory")?;
std::fs::copy(&exe, krate.bundle_dir(build.bundle).join(&name)).with_context(
|| "Failed to copy the output executable into the bundle directory",
)?;
// Check if required fields are provided instead of failing silently.
if build.config.bundle.identifier.is_none() {
bail!(
"\n\nBundle identifier was not provided in `Dioxus.toml`. Add it as:\n\n[bundle]\nidentifier = \"com.mycompany\"\n\n"
);
}
if build.config.bundle.publisher.is_none() {
bail!(
"\n\nBundle publisher was not provided in `Dioxus.toml`. Add it as:\n\n[bundle]\npublisher = \"MyCompany\"\n\n"
);
}
}
let ctx = crate::bundler::BundleContext::new(build, package_types).await?;
tracing::debug!("Bundling project for {:?}", ctx.package_types());
let bundles = ctx.bundle_project().await.inspect_err(|err| {
tracing::error!("Failed to bundle project: {:#?}", err);
if cfg!(target_os = "macos") {
tracing::error!("Make sure you have automation enabled in your terminal (https://github.com/tauri-apps/tauri/issues/3055#issuecomment-1624389208) and full disk access enabled for your terminal (https://github.com/tauri-apps/tauri/issues/3055#issuecomment-1624389208)");View on GitHub (pinned to 24f6a829df)
Solutions
- Add the bundle identifier to Dioxus.toml: [bundle] identifier = 'com.mycompany'.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/cli/src/cli/bundle.rs:170 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23).
Data as JSON: /api/errors/a68bb86434bb5421.
Report an issue: GitHub.