ipfs/kubo · error

method name is missing from Routing.Methods config param

Error message

method name %q is missing from Routing.Methods config param

What it means

Methods.Check in config/routing.go verifies that the Routing.Methods map contains an entry for every method name in MethodNameList. If any known method (e.g. provide, find-providers, get-ipns, put-ipns) is absent, this error is returned. The map is required to be exhaustive so routing behavior is always fully defined.

Solutions

  1. Add the missing method key named in the error to Routing.Methods with a valid router value (e.g. "none", "dht", "delegated", or a custom router name).
  2. Run `ipfs config --json Routing.Methods '{...complete map...}'` with every entry from MethodNameList.
  3. If unsure, delete Routing.Methods and use Routing.Type defaults instead.

Example fix

// before (config.json)
"Routing": { "Methods": { "provide": "delegated" } }
// after
"Routing": { "Methods": { "provide": "delegated", "find-providers": "dht", "get-ipns": "dht", "put-ipns": "dht" } }
Defensive patterns

Strategy: validation

Validate before calling

m, err := config.ParseMethods("...") // or build the map
if err := methods.Check(); err != nil {
    return fmt.Errorf("Routing.Methods incomplete: %w", err)
}

Try / catch

if err := methods.Check(); err != nil { return fmt.Errorf("routing config invalid: %w", err) }

Prevention

When it happens

Trigger: Loading a config where Routing.Methods is present but missing one of the required method keys, e.g. setting only {"provide":"custom"} and omitting the others; Check is called by TestMethods and Parse during config parsing/validation.

Common situations: Partially migrating Routing.Type to a delegating router and hand-writing only the methods you think you need; older configs from a previous kubo version missing newly added method names after an upgrade.

Related errors


AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03). Data as JSON: /api/errors/3c49fd6720190914. Report an issue: GitHub.

Appendix: source

Thrown at config/routing.go:76

	// Router type ID. See RouterType for more info.
	Type RouterType

	// Parameters are extra configuration that this router might need.
	// A common one for HTTP router is "Endpoint".
	Parameters any
}

type (
	Routers map[string]RouterParser
	Methods map[MethodName]Method
)

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 {

View on GitHub (pinned to 329838acdf)