{"record":{"id":"c9a55fdcc0a8505f","repo":"DioxusLabs/dioxus","slug":"package-type-invalid-is-not-supported-for-bu","errorCode":null,"errorMessage":"Package type '{invalid:?}' is not supported for bundle format '{bundle}'.","messagePattern":"Package type '(.+?)' is not supported for bundle format '(.+?)'\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/cli/bundle.rs","lineNumber":257,"sourceCode":"                        | PackageType::AppImage\n                        | PackageType::Updater\n                ),\n                BundleFormat::Windows => {\n                    matches!(\n                        package_type,\n                        PackageType::WindowsMsi | PackageType::Nsis | PackageType::Updater\n                    )\n                }\n                BundleFormat::Android => {\n                    matches!(package_type, PackageType::Apk | PackageType::Aab)\n                }\n                BundleFormat::Ios => matches!(package_type, PackageType::IosApp | PackageType::Ipa),\n                BundleFormat::Web | BundleFormat::Server => false,\n            }\n        };\n\n        if let Some(invalid) = package_types.iter().find(|pt| !is_package_supported(pt)) {\n            anyhow::bail!(\n                \"Package type '{invalid:?}' is not supported for bundle format '{bundle}'.\"\n            );\n        }\n\n        Ok(())\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::Bundle;\n    use crate::{\n        BuildArgs, BundleFormat, PackageType, Platform, cli::CommandWithPlatformOverrides,\n    };\n\n    #[test]\n    fn bundle_formats_have_default_package_types() {\n        assert_eq!(","sourceCodeStart":239,"sourceCodeEnd":275,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/393d190a801ccb441d41923e232289b4f8a5c669/packages/cli/src/cli/bundle.rs#L239-L275","documentation":"Before bundling, dx bundle validates every requested package type against the chosen bundle format. The supported table is: MacOS -> MacOsBundle/Dmg/Updater, Linux -> Deb/Rpm/AppImage/Updater, Windows -> WindowsMsi/Nsis/Updater, Android -> Apk/Aab, Ios -> IosApp/Ipa, and Web/Server -> none at all. The first mismatching package type bails with this message.","triggerScenarios":"Passing --package-type values that do not belong to the selected bundle format, e.g. apk with a macOS bundle, or any package type with format web or server, for which the match arms return false unconditionally.","commonSituations":"Copying a CI bundle command from another platform's docs; mixing package types from multiple platforms in one command; assuming web bundles accept a package type.","solutions":["Use only matching pairs: macos -> app/dmg/updater, linux -> deb/rpm/appimage/updater, windows -> msi/nsis/updater, android -> apk/aab, ios -> ios-app/ipa","Omit --package-type entirely and let default_package_types pick the format's defaults (e.g. Ios -> Ipa, Android -> Aab)","For Web or Server bundles, drop --package-type completely; no package type is supported","Run dx bundle once per target platform instead of combining types across platforms"],"exampleFix":"# before (mismatched pair)\ndx bundle --format ios --package-type apk\n\n# after (matching pair)\ndx bundle --format android --package-type apk","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\n# Reject invalid format/package pairs before invoking dx bundle\ncase \"$FORMAT/$PKG\" in\n  macos/app|macos/dmg|macos/updater|linux/deb|linux/rpm|linux/appimage|linux/updater|windows/msi|windows/nsis|windows/updater|android/apk|android/aab|ios/ios-app|ios/ipa) ;;\n  *) echo \"unsupported pair: $FORMAT/$PKG\"; exit 1 ;;\nesac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Memorize the allowed table: macos app/dmg/updater, linux deb/rpm/appimage/updater, windows msi/nsis/updater, android apk/aab, ios ios-app/ipa, web/server none","Omit --package-type to use each format's safe defaults","One bundle format per CI invocation; do not mix platforms in a single command"],"tags":["cli","bundle","package-type","validation"],"backgroundTag":null,"analyzedSha":"393d190a801ccb441d41923e232289b4f8a5c669","analyzedAt":"2026-08-16T11:27:45.815Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}