ipfs/kubo · warning · ErrNotSupported
operation not supported
Error message
operation not supported
What it means
`iface.ErrNotSupported` is the generic sentinel for operations the current CoreAPI implementation cannot perform. In kubo it is returned when a command encounters a node kind it cannot handle (e.g. cat on a non-file, non-directory node) and when optional capability methods are stubs — for example the HTTP content router's ProvideBitswap always returns routing.ErrNotSupported because the public HTTP Routing API does not implement Bitswap write-provide.
Source
Thrown at core/coreiface/errors.go:9
package iface
import "errors"
var (
ErrIsDir = errors.New("this dag node is a directory")
ErrNotFile = errors.New("this dag node is not a regular file")
ErrOffline = errors.New("this action must be run in online mode, try running 'ipfs daemon' first")
ErrNotSupported = errors.New("operation not supported")
)
View on GitHub (pinned to 329838acdf)
Solutions
- For the routing API case, use a provide mechanism the node actually supports (Bitswap provide via the local node, or a delegated routing provider that implements the operation) instead of the HTTP content router's ProvideBitswap.
- For `cat` errors, inspect the node type (`ipfs dag get <cid>`) and use the right reader (dag export/ls) for that node kind.
- In code, match with `errors.Is(err, iface.ErrNotSupported)` and fall back to an alternative implementation or surface a 'not supported by this node' message.
Example fix
// before
d, err := router.ProvideBitswap(ctx, req) // always ErrNotSupported on HTTP router
// after
if err != nil && errors.Is(err, routing.ErrNotSupported) {
d, err = fallbackProvider.Provide(ctx, c, true)
} Defensive patterns
Strategy: fallback
Validate before calling
// Check capability before calling: // - for routing: confirm the endpoint implements provide (kubo's HTTP contentRouter does not) // - for cat: confirm node kind is files.File or files.Directory before reading
Type guard
func isSupported(node files.Node) bool {
switch node.(type) {
case files.File, files.Directory:
return true
default:
return false
}
} Try / catch
d, err := router.ProvideBitswap(ctx, req)
if err != nil && errors.Is(err, routing.ErrNotSupported) {
d, err = localNode.Provider.Provide(ctx, c, true) // alternate provide path
} Prevention
- Do not call ProvideBitswap on the HTTP routing client; use local or delegated providers
- Handle ErrNotSupported explicitly so stub methods fail gracefully
- Check node types before choosing reader APIs (file vs dag readers)
- Consult docs for which CoreAPI methods are optional per implementation
When it happens
Trigger: `ipfs cat` on a node that is neither files.File nor files.Directory (core/commands/cat.go default case); calling `ProvideBitswap` on the HTTP routing client (`core/corehttp/routing.go` contentRouter), which is a hardcoded unsupported stub; calling optional CoreAPI methods (GetIPNS/PutIPNS variants) against implementations that do not support them.
Common situations: Tooling calling the deprecated/limited HTTP routing API's provide path and getting ErrNotSupported back; CLI users hitting `ipfs cat` on exotic DAG node types (raw leaves handled elsewhere, but unsupported types fall into the default branch); embedding CoreAPI and invoking capability methods absent from the chosen implementation.
Related errors
- this dag node is a directory
- this dag node is not a regular file
- this action must be run in online mode, try running 'ipfs da
- supernode routing was never fully implemented and has been r
- Routing.AcceleratedDHTClient option is set even tho Routing.
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/433f00e9acd74314.
Report an issue: GitHub.