{"record":{"id":"90e25aec71b5c1f9","repo":"jdx/mise","slug":"remote-cache-capability-protocol-is-incompatibl","errorCode":null,"errorMessage":"remote cache capability protocol {} is incompatible with client protocol {PROTOCOL_VERSION}","messagePattern":"remote cache capability protocol (.+?) is incompatible with client protocol (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/mise-cache-core/src/lib.rs","lineNumber":489,"sourceCode":"            .get_or_try_init(|| async {\n                let url = self.capabilities_endpoint()?;\n                let response = self\n                    .request(reqwest::Method::GET, url, \"application/json\")\n                    .await?\n                    .send()\n                    .await?;\n                if matches!(\n                    response.status(),\n                    StatusCode::NOT_FOUND\n                        | StatusCode::METHOD_NOT_ALLOWED\n                        | StatusCode::NOT_IMPLEMENTED\n                ) {\n                    return Ok(None);\n                }\n                let capabilities: RemoteCacheCapabilities =\n                    response.error_for_status()?.json().await?;\n                if capabilities.protocol.major != PROTOCOL_VERSION {\n                    bail!(\n                        \"remote cache capability protocol {} is incompatible with client protocol {PROTOCOL_VERSION}\",\n                        capabilities.protocol.major\n                    );\n                }\n                if !capabilities.features.blob_packs {\n                    return Ok(None);\n                }\n                let max_items = usize::try_from(capabilities.limits.max_batch_items)\n                    .ok()\n                    .filter(|limit| *limit > 0)\n                    .ok_or_else(|| {\n                        eyre!(\"remote cache blob packs require a positive max_batch_items limit\")\n                    })?;\n                if capabilities.limits.max_pack_bytes == 0 {\n                    bail!(\"remote cache blob packs require a positive max_pack_bytes limit\");\n                }\n                Ok(Some(BlobPackLimits {\n                    max_items: max_items.min(MAX_STAGED_BLOB_PACK_ITEMS),","sourceCodeStart":471,"sourceCodeEnd":507,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/crates/mise-cache-core/src/lib.rs#L471-L507","documentation":"When the client fetches the server's capability document for blob packs, it compares the server's protocol major version against PROTOCOL_VERSION and bails if they differ. The wire protocol is not compatible across major versions, so the client refuses to proceed rather than misinterpreting responses. This indicates a client/server version skew.","triggerScenarios":"Calling get_blob_pack (which triggers blob_pack_limits) against a remote cache server whose capabilities document reports a protocol.major different from the client's PROTOCOL_VERSION — typically after upgrading one side but not the other.","commonSituations":"Deploying a newer mise client against an older self-hosted cache server (or vice versa); pinning an old cache service image; a server admin bumping the protocol without notice.","solutions":["Upgrade the remote cache server to a version speaking the client's protocol major version, or vice versa (upgrade the client)","Check the server's deployed version and the client's PROTOCOL_VERSION to confirm the skew","If both sides are current, clear any stale capabilities cache and retry; if it persists, file an issue — a same-version mismatch is a bug"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Fetch capabilities first and compare majors yourself:\nlet caps: RemoteCacheCapabilities =\n    client.get(capabilities_url).send().await?.json().await?;\nif caps.protocol.major != PROTOCOL_VERSION { /* fail fast with a clear upgrade message */ }","typeGuard":null,"tryCatchPattern":"match client.get_blob_pack(&digests, staging).await {\n    Err(e) if e.to_string().contains(\"incompatible with client protocol\") => {\n        eprintln!(\"cache server protocol mismatch; upgrade server or client\");\n        // fall back to local cache\n    }\n    other => other?,\n}","preventionTips":["Deploy client and server upgrades together and keep PROTOCOL_VERSION in lockstep","Pin the cache server version in CI to one tested against your client","Monitor the server's capabilities endpoint as a deployment health check"],"tags":["remote-cache","protocol-version","compatibility"],"backgroundTag":"unexpected-api-response-shape","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}