{"record":{"id":"6d3dc569588ea895","repo":"ipfs/kubo","slug":"getting-repo-config-w","errorCode":null,"errorMessage":"getting repo config: %w","messagePattern":"getting repo config: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/node/provider.go","lineNumber":621,"sourceCode":"\t// noScheduleMode is true when the user disabled the periodic reprovide\n\t// schedule (Provide.DHT.Interval=0). In this mode the keystore is\n\t// inert: kad-dht's burst-only path (ProvideOnce, StartProviding) does\n\t// not Put or Delete keys, and no reprovide loop runs to read them.\n\tnoScheduleMode := reprovideInterval == 0\n\ttype providerInput struct {\n\t\tfx.In\n\t\tDHT  routing.Routing `name:\"dhtc\"`\n\t\tRepo repo.Repo\n\t\tLc   fx.Lifecycle\n\t}\n\tsweepingReprovider := fx.Provide(func(in providerInput) (DHTProvider, *keystore.ResettableKeystore, error) {\n\t\tds := namespace.Wrap(in.Repo.Datastore(), providerDatastoreKey)\n\n\t\t// Get repo path and config to determine datastore type\n\t\trepoPath := in.Repo.Path()\n\t\trepoCfg, err := in.Repo.Config()\n\t\tif err != nil {\n\t\t\treturn nil, nil, fmt.Errorf(\"getting repo config: %w\", err)\n\t\t}\n\n\t\t// Find the root datastore type (levelds, pebbleds, etc.)\n\t\trootSpec := findRootDatastoreSpec(repoCfg.Datastore.Spec)\n\n\t\t// Keystore datastores live at <repo>/{KeystoreDatastorePath}/<suffix>\n\t\tkeystoreBasePath := filepath.Join(repoPath, KeystoreDatastorePath)\n\n\t\tcreateDs := func(suffix string) (datastore.Batching, error) {\n\t\t\tif err := validateKeystoreSuffix(suffix); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\t// In-memory datastore in no-schedule mode (keystore is inert)\n\t\t\t// or when no datastore spec is configured (test/mock repos).\n\t\t\tif noScheduleMode || rootSpec == nil {\n\t\t\t\treturn datastore.NewMapDatastore(), nil\n\t\t\t}\n\t\t\tif err := os.MkdirAll(keystoreBasePath, 0o755); err != nil {","sourceCodeStart":603,"sourceCodeEnd":639,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/node/provider.go#L603-L639","documentation":"Fired during fx wiring of the sweeping DHT provider when reading the repo configuration (in.Repo.Config()) fails. The config is needed to determine the reprovide interval and datastore spec for the resettable keystore; a failure here aborts node construction with the wrapped error.","triggerScenarios":"Thrown at core/node/provider.go:621 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the error chain for the underlying cause","Verify $IPFS_PATH/config exists and is valid JSON","Fix permissions on the repo directory or re-init the repo if it is beyond repair"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}