denoland/deno · error · AnyError
vsock is not supported on this platform
Error message
vsock is not supported on this platform
What it means
Deno's OpenTelemetry OTLP connector can export telemetry over AF_VSOCK (guest-host sockets used in microVMs like Firecracker/gVisor) when `OTEL_DENO_VSOCK` is set. The vsock code is only compiled for android/linux/macos; on any other target — notably Windows — merely having the variable present makes the connector builder bail before telemetry starts.
Solutions
- Unset the variable on Windows: `Remove-Item Env:OTEL_DENO_VSOCK` (or remove it from the .env/CI matrix for Windows jobs).
- Use standard HTTP/gRPC OTLP export on Windows: set `OTEL_EXPORTER_OTLP_ENDPOINT` instead.
- Keep `OTEL_DENO_VSOCK` only in Linux/macOS/Android deploy targets that actually provide AF_VSOCK.
Example fix
# before (PowerShell on Windows) $env:OTEL_DENO_VSOCK = '3:4317' deno run --otel app.ts # error: vsock is not supported on this platform # after Remove-Item Env:OTEL_DENO_VSOCK $env:OTEL_EXPORTER_OTLP_ENDPOINT = 'http://localhost:4317' deno run --otel app.ts
Defensive patterns
Strategy: validation
Validate before calling
// TypeScript/Deno: scrub platform-specific env before spawning
if (Deno.build.os === "windows" && Deno.env.has("OTEL_DENO_VSOCK")) {
Deno.env.delete("OTEL_DENO_VSOCK");
} Prevention
- Scope OTEL_DENO_VSOCK to Linux/macOS/Android deploy targets only in CI matrices.
- Audit shared .env files for unix-only variables before reuse on Windows.
- Default Windows telemetry to OTEL_EXPORTER_OTLP_ENDPOINT (HTTP/gRPC).
When it happens
Trigger: Running Deno on Windows with `OTEL_DENO_VSOCK` present in the environment while telemetry is in use. The value does not matter on unsupported platforms; even an empty string triggers the bail (on supported platforms an empty string instead fails the cid:port parse).
Common situations: Environment blocks copied from Linux VM/microVM configs (e.g. `OTEL_DENO_VSOCK=3:4317` for a Firecracker guest) reused on a Windows dev box or CI runner; shared .env files applied across platforms.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- invalid vsock addr
- APPDATA not set
- ContextManager can not be constructed
- Counter can only be incremented
- Failed to extract with
AI-assisted analysis of denoland/deno@9ad36f7a2c (2026-08-20).
Data as JSON: /api/errors/63ecb30bb00fcf78.
Report an issue: GitHub.
Appendix: source
Thrown at ext/telemetry/lib.rs:807
inner: Client<Connector, Full<Bytes>>,
timeout: Duration,
}
impl HyperClient {
fn build_connector(
sys: &impl FsRead,
) -> deno_core::anyhow::Result<Connector> {
let connector = if let Some(tunnel) = get_tunnel() {
Connector::Tunnel(tunnel.clone())
} else if let Ok(addr) = std::env::var("OTEL_DENO_VSOCK") {
#[cfg(not(any(
target_os = "android",
target_os = "linux",
target_os = "macos"
)))]
{
let _ = addr;
deno_core::anyhow::bail!("vsock is not supported on this platform")
}
#[cfg(any(
target_os = "android",
target_os = "linux",
target_os = "macos"
))]
{
let Some((cid, port)) = addr.split_once(':') else {
deno_core::anyhow::bail!("invalid vsock addr");
};
let cid = if cid == "-1" { u32::MAX } else { cid.parse()? };
let port = port.parse()?;
let addr = VsockAddr::new(cid, port);
Connector::Vsock(addr)
}
} else {
let ca_certs = match std::env::var("OTEL_EXPORTER_OTLP_CERTIFICATE") {View on GitHub (pinned to 9ad36f7a2c)