ipfs/kubo · error

internal error listing

Error message

internal error listing %s

What it means

Internal-error wrapper in `ipfs ls`: an unexpected (non-ErrNotFound-style) failure occurred while listing the given path — typically the background listing goroutine failed to resolve or decode the UnixFS/IPLD node. The generic message deliberately hides the cause from the user; the real error is logged with log.Errorf, so daemon logs are the place to diagnose.

Solutions

  1. Check daemon logs (ipfs log tail) for the 'recovered from panic listing' or the underlying error line
  2. Retry if a block provider was temporarily unreachable
  3. Use ipfs dag get or ipfs cat on the path to isolate whether the block resolves
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at core/commands/ls.go:212 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at core/commands/ls.go:212

		defer cancel()

		for i, fpath := range paths {
			pth, err := cmdutils.PathOrCidPath(fpath)
			if err != nil {
				return err
			}

			results := make(chan iface.DirEntry)
			lsErr := make(chan error, 1)
			go func() {
				// Listing decodes blocks with whatever codec their CID names.
				// This goroutine is detached from the request, and a panic on it
				// would end the daemon rather than the command. Ls closes
				// results on its way out, so the reader below still terminates.
				defer func() {
					if rec := recover(); rec != nil {
						log.Errorf("recovered from panic listing %s: %v\n%s", pth, rec, debug.Stack())
						lsErr <- fmt.Errorf("internal error listing %s", pth)
					}
				}()
				lsErr <- api.Unixfs().Ls(lsCtx, pth, results,
					options.Unixfs.ResolveChildren(resolveSize || resolveType))
			}()

			processLink, dirDone = processDir()
			for link := range results {
				var ftype unixfs_pb.Data_DataType
				switch link.Type {
				case iface.TFile:
					ftype = unixfs.TFile
				case iface.TDirectory:
					ftype = unixfs.TDirectory
				case iface.TSymlink:
					ftype = unixfs.TSymlink
				}
				lsLink := LsLink{

View on GitHub (pinned to 329838acdf)