tauri-apps/tauri · error
app version patch number cannot be greater than 65535
Error message
app version patch number cannot be greater than 65535
What it means
Validation guard in validate_wix_version: the patch component of the app version exceeds 65535, which would overflow the MSI ProductVersion patch field during the WiX build. The version string is rejected before the installer is generated.
Solutions
- Lower the patch version component to 65535 or below in tauri.conf.json
- Change the CI versioning scheme to mod/rotate the build counter, or place large counters in the 4th build field only if ≤65535 too
- Use the msi upgrade-code strategy for increments instead of ever-growing patch numbers
Example fix
// before (tauri.conf.json) "version": "1.0.70000" // after "version": "1.0.65535"
Defensive patterns
Strategy: validation
Validate before calling
fn msi_patch_ok(v: &str) -> bool {
v.split('.').nth(2)
.and_then(|p| p.parse::<u64>().ok())
.map(|p| p <= 65535)
.unwrap_or(false)
} Try / catch
if let Err(e) = bundle_msi(cfg) {
eprintln!("msi version invalid: {e}");
} Prevention
- If patch = CI build number, wrap it: build_number % 65536
- Set an alert before the build counter hits 65535
- Verify version limits whenever changing the versioning scheme
When it happens
Trigger: Bundling an msi whose app version patch number is 65536 or greater — e.g. version "1.0.70000" in tauri.conf.json — during build_wix_app_installer.
Common situations: CI pipelines that use a global commit/build counter as the patch number (e.g. "1.0.{build_number}") once the counter passes 65535.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- app version build number cannot be greater than 65535
- app version major number cannot be greater than 255
- app version minor number cannot be greater than 255
- app wix version should be in the format…
- optional build metadata in app version must be numeric-only…
AI-assisted analysis of tauri-apps/tauri@460ec35447 (2026-09-18).
Data as JSON: /api/errors/d893ce4db296a139.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tauri-bundler/src/bundle/windows/msi/mod.rs:331
let components = version_str
.split('.')
.flat_map(|c| c.parse::<u64>().ok())
.collect::<Vec<_>>();
if components.len() < 3 {
crate::error::bail!(
"app wix version should be in the format major.minor.patch.build (build is optional)"
);
}
if components[0] > 255 {
crate::error::bail!("app version major number cannot be greater than 255");
}
if components[1] > 255 {
crate::error::bail!("app version minor number cannot be greater than 255");
}
if components[2] > 65535 {
crate::error::bail!("app version patch number cannot be greater than 65535");
}
if components.len() == 4 && components[3] > 65535 {
crate::error::bail!("app version build number cannot be greater than 65535");
}
Ok(())
}
// WiX requires versions to be numeric only in a `major.minor.patch.build` format
fn convert_version(version_str: &str) -> crate::Result<String> {
let version = semver::Version::parse(version_str)
.map_err(Into::into)
.context("invalid app version")?;
if !version.build.is_empty() {
let build = version.build.parse::<u64>();
if build.map(|b| b <= 65535).unwrap_or_default() {
return Ok(format!(View on GitHub (pinned to 460ec35447)