ipfs/kubo · error
method name %q is not a supported method on Routing.Methods
Error message
method name %q is not a supported method on Routing.Methods config param
What it means
Methods.Check also rejects unknown keys: any method name in Routing.Methods that is not present in MethodNameList produces this error. Only a fixed, versioned set of routing method names is supported, preventing typos or stale names from silently being ignored.
Source
Thrown at config/routing.go:88
func (m Methods) Check() error {
// Check supported methods
for _, mn := range MethodNameList {
_, ok := m[mn]
if !ok {
return fmt.Errorf("method name %q is missing from Routing.Methods config param", mn)
}
}
// Check unsupported methods
for k := range m {
seen := slices.Contains(MethodNameList, k)
if seen {
continue
}
return fmt.Errorf("method name %q is not a supported method on Routing.Methods config param", k)
}
return nil
}
type RouterParser struct {
Router
}
func (r *RouterParser) UnmarshalJSON(b []byte) error {
out := Router{}
out.Parameters = &json.RawMessage{}
if err := json.Unmarshal(b, &out); err != nil {
return err
}
raw := out.Parameters.(*json.RawMessage)
var p anyView on GitHub (pinned to 329838acdf)
Solutions
- Remove or rename the offending key in Routing.Methods so it matches a supported name from MethodNameList exactly.
- Check the exact supported names for your kubo version (docs/config.md, Routing.Methods section).
- Regenerate the config section with `ipfs config --json Routing.Methods '...'` instead of manual JSON editing to catch typos.
Example fix
// before (config.json)
"Routing": { "Methods": { "findprovider": "dht" } }
// after
"Routing": { "Methods": { "find-providers": "dht" } } Defensive patterns
Strategy: validation
Validate before calling
for k := range methods {
if !slices.Contains(config.MethodNameList, k) {
return fmt.Errorf("unsupported Routing.Methods key: %q", k)
}
} Try / catch
if err := methods.Check(); err != nil { return fmt.Errorf("routing config invalid: %w", err) } Prevention
- Copy method names exactly from docs/config.md for your kubo version
- Use `ipfs config --json Routing.Methods '...'` to avoid JSON typos
- Diff Routing.Methods keys against MethodNameList after upgrades
When it happens
Trigger: Including a key in Routing.Methods that is not in MethodNameList, e.g. a misspelled "findprovider" or a method name removed in a newer kubo version; Check runs during Parse/TestMethods of the routing config.
Common situations: Typos when hand-editing config.json, copying method names from blog posts about older kubo versions, or renaming methods after a kubo upgrade so old keys become unsupported.
Related errors
- method name %q is missing from Routing.Methods config param
- private network does not work with Routing.Type=auto. Update
- Routing.Type=delegated does not support content providing. S
- Provide.DHT.KeystoreBatchSize must be positive, got %d
- Provide.DHT.OfflineDelay must be non-negative, got %v
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/c411ce8fb7d2aceb.
Report an issue: GitHub.