DioxusLabs/dioxus · error · anyhow::Error

Package type ' ' is not supported for bundle format ' '.

Error message

Package type '{invalid:?}' is not supported for bundle format '{bundle}'.

What it means

Compatibility guard in validate_package_types_for_bundle: the match arms map each BundleFormat (Windows, Android, iOS, etc.) to the set of PackageTypes it supports, and the requested package type does not appear in the set for the selected bundle format. The inputs at fault are the user-requested package type and bundle format combination, which is not a supported pairing.

Solutions

  1. Choose a package type that the selected bundle format supports.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/cli/src/cli/bundle.rs:257 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/c9a55fdcc0a8505f. Report an issue: GitHub.

Appendix: source

Thrown at packages/cli/src/cli/bundle.rs:257

                        | PackageType::AppImage
                        | PackageType::Updater
                ),
                BundleFormat::Windows => {
                    matches!(
                        package_type,
                        PackageType::WindowsMsi | PackageType::Nsis | PackageType::Updater
                    )
                }
                BundleFormat::Android => {
                    matches!(package_type, PackageType::Apk | PackageType::Aab)
                }
                BundleFormat::Ios => matches!(package_type, PackageType::IosApp | PackageType::Ipa),
                BundleFormat::Web | BundleFormat::Server => false,
            }
        };

        if let Some(invalid) = package_types.iter().find(|pt| !is_package_supported(pt)) {
            anyhow::bail!(
                "Package type '{invalid:?}' is not supported for bundle format '{bundle}'."
            );
        }

        Ok(())
    }
}

#[cfg(test)]
mod tests {
    use super::Bundle;
    use crate::{
        BuildArgs, BundleFormat, PackageType, Platform, cli::CommandWithPlatformOverrides,
    };

    #[test]
    fn bundle_formats_have_default_package_types() {
        assert_eq!(

View on GitHub (pinned to 24f6a829df)