ipfs/kubo · error
%s (currently offline, perhaps retry without the offline fla
Error message
%s (currently offline, perhaps retry without the offline flag)
What it means
When the CAR export fails with `ipld.ErrNotFound` (a block in the DAG could not be found) and the user explicitly passed `--offline`, kubo appends this hint explaining that offline mode forbids network lookups, so missing blocks cannot be fetched. It is purely cosmetic wrapping of the underlying ErrNotFound to make the remedy obvious.
Source
Thrown at core/commands/dag/export.go:147
return
}
}()
res.SetEncodingType(cmds.OctetStream)
res.SetContentType("application/vnd.ipld.car")
if err := res.Emit(pipeR); err != nil {
pipeR.Close() // ignore the error if any
return err
}
err = <-errCh
// minimal user friendliness
if errors.Is(err, ipld.ErrNotFound{}) {
explicitOffline, _ := req.Options["offline"].(bool)
if explicitOffline {
err = fmt.Errorf("%s (currently offline, perhaps retry without the offline flag)", err)
} else {
node, envErr := cmdenv.GetNode(env)
if envErr == nil && !node.IsOnline {
err = fmt.Errorf("%s (currently offline, perhaps retry after attaching to the network)", err)
}
}
}
return err
}
// exportPartialCAR is the best-effort engine behind `dag export --local-only`.
// It walks the DAG rooted at root and writes the visited blocks to w as a
// CARv1 stream.
//
// The walker reads from the raw blockstore directly (not via the kubo
// CoreAPI or DAGService), so it is structurally incapable of triggering a
// network fetch. Any block missing or unreadable locally, plus its entireView on GitHub (pinned to 329838acdf)
Solutions
- Retry without `--offline` so the node can fetch missing blocks from the network.
- Bring the missing blocks into the blockstore first (`ipfs get`/`ipfs pin add` while online), then export offline.
- Check which blocks are missing with `ipfs dag stat --offline` or verify the pin is complete.
Example fix
// before ipfs dag export --offline bafy... > out.car // after ipfs dag export bafy... > out.car
Defensive patterns
Strategy: retry
Try / catch
err := exportCmd()
var nf ipld.ErrNotFound
if errors.As(err, &nf) && offlineRequested {
// retry online: run again without --offline
} Prevention
- Verify the full DAG is present locally (pin is complete) before exporting offline.
- Use `ipfs dag stat --offline` to confirm block availability.
- Avoid gc runs that could remove blocks of DAGs you plan to export offline.
When it happens
Trigger: Running `ipfs dag export --offline <cid>` (or `--local-only`, which implies offline) where part of the DAG is not in the local blockstore, so traversal hits `ipld.ErrNotFound{}`.
Common situations: Exporting a partial DAG after a partial pin/gc; exporting a CID whose deeper blocks were never fetched; running a node that is deliberately offline but was expected to hold all blocks.
Related errors
- %s (currently offline, perhaps retry after attaching to the
- --%s implies --offline and cannot be combined with --offline
- 'ipfs id' cannot query information on remote peers without a
- can't put while offline: pass `--allow-offline` to store loc
- cannot specify negative resolve cache size
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/bca34b93f2e3e519.
Report an issue: GitHub.