DioxusLabs/dioxus · error · anyhow::Error

.app bundle does not exist at expected path: {}

Error message

.app bundle does not exist at expected path: {}

What it means

bundle_macos_dmg resolved the first .app path but that directory does not exist on disk. The recorded path is stale or the build output was removed before DMG creation, so the bundler bails with the expected path.

Source

Thrown at packages/cli/src/bundler/macos.rs:285

            .unwrap_or(&product_name);

        let (app_paths, app_bundle_paths) = if let Some(app_bundle) = bundles
            .iter()
            .find(|b| b.package_type == PackageType::MacOsBundle)
        {
            (app_bundle.bundle_paths.clone(), Vec::new())
        } else {
            let paths = self.bundle_macos_app().await?;
            (paths.clone(), paths)
        };

        if app_paths.is_empty() {
            bail!("No .app bundle found to package into a DMG");
        }

        let app_path = &app_paths[0];
        if !app_path.exists() {
            bail!(
                ".app bundle does not exist at expected path: {}",
                app_path.display()
            );
        }

        let output_dir = self.project_out_directory().join("macos");
        fs::create_dir_all(&output_dir)?;

        let dmg_filename = format!(
            "{}_{}_{}",
            bundle_name,
            self.version_string(),
            self.binary_arch()
        );
        let dmg_path = output_dir.join(format!("{dmg_filename}.dmg"));

        tracing::info!("Creating DMG at {}", dmg_path.display());

View on GitHub (pinned to 24f6a829df)

Solutions

  1. The .app bundle is not at the expected path. Rebuild the macOS app and verify the output location.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/cli/src/bundler/macos.rs:285 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/2dc4b7d948064855. Report an issue: GitHub.