{"record":{"id":"d860e718e20e6e96","repo":"ipfs/kubo","slug":"could-not-perform-version-check-due-to-missing-or","errorCode":null,"errorMessage":"could not perform version check due to missing or incompatible DHT configuration","messagePattern":"could not perform version check due to missing or incompatible DHT configuration","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/version.go","lineNumber":261,"sourceCode":"\t\tif peerVersion.GreaterThan(greatestVersionSeen) {\n\t\t\tgreatestVersionSeen = peerVersion\n\t\t}\n\t}\n\n\tprocessPeerstoreEntry := func(id peer.ID) {\n\t\tif v, err := nd.Peerstore.Get(id, \"AgentVersion\"); err == nil {\n\t\t\trecordPeerVersion(v.(string))\n\t\t} else if errors.Is(err, pstore.ErrNotFound) { // ignore noop\n\t\t} else { // a bug, usually.\n\t\t\tlog.Errorw(\"failed to get agent version from peerstore\", \"error\", err)\n\t\t}\n\t}\n\n\t// Amino DHT client keeps information about previously seen peers\n\tif nd.HasActiveDHTClient() && nd.DHTClient != nd.DHT {\n\t\tclient, ok := nd.DHTClient.(*fullrt.FullRT)\n\t\tif !ok {\n\t\t\treturn VersionCheckOutput{}, errors.New(\"could not perform version check due to missing or incompatible DHT configuration\")\n\t\t}\n\t\tfor _, p := range client.Stat() {\n\t\t\tprocessPeerstoreEntry(p)\n\t\t}\n\t} else if nd.DHT != nil && nd.DHT.WAN != nil {\n\t\tfor _, pi := range nd.DHT.WAN.RoutingTable().GetPeerInfos() {\n\t\t\tprocessPeerstoreEntry(pi.Id)\n\t\t}\n\t} else if nd.DHT != nil && nd.DHT.LAN != nil {\n\t\tfor _, pi := range nd.DHT.LAN.RoutingTable().GetPeerInfos() {\n\t\t\tprocessPeerstoreEntry(pi.Id)\n\t\t}\n\t} else {\n\t\treturn VersionCheckOutput{}, errors.New(\"could not perform version check due to missing or incompatible DHT configuration\")\n\t}\n\n\tif minPercent < 1 || minPercent > 100 {\n\t\tif minPercent == 0 {","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/version.go#L243-L279","documentation":"DetectNewKuboVersion relies on the Amino DHT client (FullRT) retaining peer information about previously seen swarm peers. When the node claims to have an active DHT client (nd.HasActiveDHTClient()) but nd.DHTClient is not a *fullrt.FullRT, the code cannot enumerate seen peers and returns this error. It signals an unexpected/incompatible DHT implementation at runtime.","triggerScenarios":"'ipfs version check' or the daemon's periodic swarm version check on a node where DHTClient is set but is not a FullRT instance — e.g. a custom or mocked DHT client, or an internal build where the client type changed.","commonSituations":"Running with experimental/custom routing configurations that swap the DHT implementation; plugin or fork code replacing the DHT client; version skew between kubo and its go-libp2p-kad-dht dependency after a hand-rolled dependency bump.","solutions":["Run stock Kubo routing configuration (no custom DHT replacement) when using 'ipfs version check'","Update to a matching official kubo release so nd.DHTClient is the standard FullRT client","If you maintain a fork/plugin that swaps the DHT, either provide a FullRT-compatible client or skip the swarm version check","Check config for experimental routing flags that alter DHT setup and reset them to defaults"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"if nd.HasActiveDHTClient() {\n    if _, ok := nd.DHTClient.(*fullrt.FullRT); !ok {\n        return errors.New(\"swarm version check requires the standard FullRT DHT client\")\n    }\n}","typeGuard":"func isFullRT(v interface{}) bool {\n    _, ok := v.(*fullrt.FullRT)\n    return ok\n}","tryCatchPattern":"out, err := DetectNewKuboVersion(nd, pct)\nif err != nil && strings.Contains(err.Error(), \"missing or incompatible DHT configuration\") {\n    log.Warnf(\"swarm version check unavailable: %v\", err)\n    return VersionCheckOutput{}, nil\n}\nreturn out, err","preventionTips":["Run stock routing configuration when using swarm version checks","Don't swap nd.DHTClient with custom implementations in forks","Keep kubo and go-libp2p-kad-dht versions aligned via official releases"],"tags":["dht","version-check","configuration"],"backgroundTag":"incompatible-dht-configuration","analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}