FuelLabs/fuel-core · error · anyhow::Error

Tendermint RPC response uses unsupported JSON-RPC version {}

Error message

Tendermint RPC response uses unsupported JSON-RPC version {}

What it means

Strict response-validation guard in the shared-sequencer rpc() helper: the JSON body parsed fine, but its "jsonrpc" field does not equal the "2.0" value sent in the request. This means the endpoint replied with a different JSON-RPC dialect (or a non-RPC payload like an HTML error page that still parsed). It signals a protocol/version mismatch with whatever answered at api_url, not a network failure.

Source

Thrown at crates/services/shared-sequencer/src/http_api.rs:139

    let request = RpcRequest {
        jsonrpc: "2.0",
        id: 1,
        method,
        params,
    };
    let response = http.post(api_url).json(&request).send().await?;
    if response.status() != reqwest::StatusCode::OK {
        anyhow::bail!(
            "Tendermint RPC request failed with HTTP status {}",
            response.status()
        );
    }
    let text = response.text().await?;
    let response: api_types::RpcResponse<T> =
        serde_json::from_str(&text).with_context(|| format!("response text {text}"))?;

    if response.jsonrpc != request.jsonrpc {
        anyhow::bail!(
            "Tendermint RPC response uses unsupported JSON-RPC version {}",
            response.jsonrpc
        );
    }
    if response.id != request.id {
        anyhow::bail!(
            "Tendermint RPC response ID {} does not match request ID {}",
            response.id,
            request.id
        );
    }

    if let Some(error) = response.error {
        anyhow::bail!("Tendermint RPC error: {error}");
    }

    response
        .result

View on GitHub (pinned to add100d30d)

Solutions

  1. Confirm api_url actually points at a Tendermint/CometBFT JSON-RPC endpoint speaking JSON-RPC 2.0
  2. Capture the raw response text (the code attaches it via context on parse) to identify what really answered
  3. If the remote legitimately uses another JSON-RPC version, add an explicit allowlist rather than reusing the equality check against the request version
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/services/shared-sequencer/src/http_api.rs:139 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of FuelLabs/fuel-core@add100d30d (2026-09-05). Data as JSON: /api/errors/3db2a9bb7ba5fc2d. Report an issue: GitHub.