astrid-runtime/astrid · error
unsupported provider protocol
Error message
unsupported provider protocol {} What it means
This error means the provider received a valid JSON `StorageProviderRequestV1` from stdin whose `protocol_version` field does not equal `STORAGE_PROVIDER_PROTOCOL_V1`. The provider speaks exactly one protocol version and rejects anything else rather than guessing semantics. It is thrown in main.rs:166 immediately after deserialization.
Solutions
- Rebuild/redeploy the host and provider from the same crate version so protocol versions match.
- Set request.protocol_version to the STORAGE_PROVIDER_PROTOCOL_V1 constant imported from the crate, not a literal.
- Inspect the provider's constant (e.g. via its version output or source) and align the caller.
- If multiple versions must coexist, route to the matching provider binary per version.
Example fix
// before
let req = StorageProviderRequestV1 { protocol_version: 2, .. };
// after
let req = StorageProviderRequestV1 { protocol_version: STORAGE_PROVIDER_PROTOCOL_V1, .. }; Defensive patterns
Strategy: validation
Validate before calling
if request.protocol_version != STORAGE_PROVIDER_PROTOCOL_V1 {
return Err(anyhow!("version mismatch: {}", request.protocol_version));
} Try / catch
match run_provider(&bytes) {
Err(e) if e.to_string().starts_with("unsupported provider protocol") => {
// rebuild/redeploy caller and provider from same version
}
r => r?,
} Prevention
- Always set protocol_version from the crate constant, never a literal
- Build host and provider binaries from the same revision
- Add a startup version handshake check before sending requests
When it happens
Trigger: Sending a request with protocol_version set to 0, 2, a string, or any value other than the crate's STORAGE_PROVIDER_PROTOCOL_V1 constant into the provider's stdin.
Common situations: Host process and provider binary built from different crate versions (one upgraded, one stale); hand-written test requests with a placeholder version; a serialization format change that altered the version constant type or value.
Understand the failure class
Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.
Related errors
- FSKit callback probe protocol mismatch
- daemon closed the response stream before the final marker
- daemon rejected status request
- daemon returned an unexpected status response
- detached FUSE service exceeded the startup response size
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/ba060c366022d7f4.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-storage-provider-fuse/src/main.rs:166
if let Err(error) = result {
eprintln!("{PROVIDER_NAME}: {error:#}");
return ExitCode::from(2);
}
ExitCode::SUCCESS
}
async fn run_stdio() -> Result<()> {
let mut bytes = Vec::new();
std::io::stdin()
.lock()
.take(MAX_REQUEST_BYTES + 1)
.read_to_end(&mut bytes)?;
if bytes.len() as u64 > MAX_REQUEST_BYTES {
bail!("provider request exceeds limit");
}
let request: StorageProviderRequestV1 = serde_json::from_slice(&bytes)?;
if request.protocol_version != STORAGE_PROVIDER_PROTOCOL_V1 {
bail!("unsupported provider protocol {}", request.protocol_version);
}
let request_id = request.request_id;
let outcome = match execute(request).await {
Ok(success) => StorageProviderOutcomeV1::Success(success),
Err(error) => StorageProviderOutcomeV1::Failure(StorageProviderFailureV1 {
code: "provider-operation".to_owned(),
message: bounded_failure_message(&error.to_string()),
}),
};
let response = StorageProviderResponseV1 {
protocol_version: STORAGE_PROVIDER_PROTOCOL_V1,
request_id,
provider: StorageProviderIdentityV1 {
name: PROVIDER_NAME.to_owned(),
version: env!("CARGO_PKG_VERSION").to_owned(),
capabilities: vec![
StorageProviderCapabilityV1::PrincipalView,
StorageProviderCapabilityV1::FleetView,View on GitHub (pinned to affd8760f4)