astrid-runtime/astrid · error
unsupported provider protocol
Error message
unsupported provider protocol {} What it means
After decoding the stdin JSON into a StorageProviderRequestV1, run() checks protocol_version against STORAGE_PROVIDER_PROTOCOL_V1. A request stamped with any other version is rejected, since the v1 wire semantics are the only ones this provider implements.
Solutions
- Set protocol_version to STORAGE_PROVIDER_PROTOCOL_V1 in the request.
- Upgrade the provider binary to match the host's protocol version (or vice versa) so both agree on v1.
- Read the actual version printed in the error message and compare against the host SDK's constant.
- Update launch scripts/tests that hardcode the protocol version number.
Example fix
// before
let request = StorageProviderRequestV1 { protocol_version: 2, .. };
// after
let request = StorageProviderRequestV1 { protocol_version: STORAGE_PROVIDER_PROTOCOL_V1, .. }; Defensive patterns
Strategy: type-guard
Validate before calling
// Before sending:
if request.protocol_version != STORAGE_PROVIDER_PROTOCOL_V1 {
return Err(anyhow!("host speaks protocol {}, provider requires v1", request.protocol_version));
} Type guard
// Rust
fn is_provider_v1(r: &StorageProviderRequestV1) -> bool {
r.protocol_version == STORAGE_PROVIDER_PROTOCOL_V1
} Try / catch
// Host side
match run_provider(request).await {
Err(e) if e.to_string().starts_with("unsupported provider protocol") => {
// upgrade the provider binary or downgrade the request version, then retry
}
other => other?,
} Prevention
- Always build requests with the STORAGE_PROVIDER_PROTOCOL_V1 constant, not literals
- Upgrade host and provider packages together
- Read the reported version in the error to diagnose version drift quickly
When it happens
Trigger: A host sends a StorageProviderRequestV1 whose protocol_version field is not STORAGE_PROVIDER_PROTOCOL_V1 — a newer host against an older provider, an old host against a provider that dropped legacy versions, or a handcrafted test request with the wrong constant.
Common situations: Partial upgrade: host package updated to a v2 protocol while the provider binary on the machine is still v1; vendored providers built from different branches; scripts with a hardcoded wrong version number.
Related errors
- FUSE callback probe protocol mismatch
- provider request exceeds limit
- this executable is an Astrid WinFsp provider, not an…
- WinFsp callback probe protocol mismatch
- build WinFsp callback filesystem
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/337b8a8fb81c9b3e.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-storage-provider-winfsp/src/main.rs:102
async fn run() -> Result<StorageProviderResponseV1> {
let arguments = std::env::args_os().skip(1).collect::<Vec<_>>();
if arguments.as_slice() != [std::ffi::OsStr::new("--astrid-provider-stdio-v1")] {
bail!("this executable is an Astrid WinFsp provider, not an interactive command");
}
let mut bytes = Vec::new();
std::io::stdin()
.lock()
.take(MAX_REQUEST_BYTES + 1)
.read_to_end(&mut bytes)
.context("read provider request")?;
if bytes.len() as u64 > MAX_REQUEST_BYTES {
bail!("provider request exceeds limit");
}
let request: StorageProviderRequestV1 =
serde_json::from_slice(&bytes).context("decode provider request")?;
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: error.to_string().chars().take(4096).collect(),
}),
};
Ok(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)