{"record":{"id":"a68bb86434bb5421","repo":"DioxusLabs/dioxus","slug":"bundle-identifier-was-not-provided-in-dioxus-to","errorCode":null,"errorMessage":"\n\nBundle identifier was not provided in `Dioxus.toml`. Add it as:\n\n[bundle]\nidentifier = \"com.mycompany\"\n\n","messagePattern":"\n\nBundle identifier was not provided in `Dioxus\\.toml`\\. Add it as:\n\n\\[bundle\\]\nidentifier = \"com\\.mycompany\"\n\n","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/cli/bundle.rs","lineNumber":170,"sourceCode":"            let krate = &build;\n            let exe = build.main_exe();\n\n            _ = std::fs::remove_dir_all(krate.bundle_dir(build.bundle));\n\n            let mut name: PathBuf = krate.executable_name().into();\n\n            if build.triple.operating_system == OperatingSystem::Windows {\n                name.set_extension(\"exe\");\n            }\n            std::fs::create_dir_all(krate.bundle_dir(build.bundle))\n                .context(\"Failed to create bundle directory\")?;\n            std::fs::copy(&exe, krate.bundle_dir(build.bundle).join(&name)).with_context(\n                || \"Failed to copy the output executable into the bundle directory\",\n            )?;\n\n            // Check if required fields are provided instead of failing silently.\n            if build.config.bundle.identifier.is_none() {\n                bail!(\n                    \"\\n\\nBundle identifier was not provided in `Dioxus.toml`. Add it as:\\n\\n[bundle]\\nidentifier = \\\"com.mycompany\\\"\\n\\n\"\n                );\n            }\n            if build.config.bundle.publisher.is_none() {\n                bail!(\n                    \"\\n\\nBundle publisher was not provided in `Dioxus.toml`. Add it as:\\n\\n[bundle]\\npublisher = \\\"MyCompany\\\"\\n\\n\"\n                );\n            }\n        }\n\n        let ctx = crate::bundler::BundleContext::new(build, package_types).await?;\n\n        tracing::debug!(\"Bundling project for {:?}\", ctx.package_types());\n\n        let bundles = ctx.bundle_project().await.inspect_err(|err| {\n            tracing::error!(\"Failed to bundle project: {:#?}\", err);\n            if cfg!(target_os = \"macos\") {\n                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)\");","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/cli/bundle.rs#L152-L188","documentation":"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.","triggerScenarios":"Thrown at packages/cli/src/cli/bundle.rs:170 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the bundle identifier to Dioxus.toml: [bundle] identifier = 'com.mycompany'."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}