{"record":{"id":"e15c4ae180ac46ef","repo":"ipfs/kubo","slug":"error-loading-plugins-s","errorCode":null,"errorMessage":"error loading plugins: %s","messagePattern":"error loading plugins: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/ipfs/kubo/start.go","lineNumber":80,"sourceCode":"\t// for per-subsystem level control (e.g., `ipfs log level libp2p-swarm debug`).\n\tgologshim.SetDefaultHandler(logging.SlogHandler())\n}\n\n// declared as a var for testing purposes.\nvar dnsResolver = madns.DefaultResolver\n\nconst (\n\tEnvEnableProfiling = \"IPFS_PROF\"\n\tcpuProfile         = \"ipfs.cpuprof\"\n\theapProfile        = \"ipfs.memprof\"\n)\n\ntype PluginPreloader func(*loader.PluginLoader) error\n\nfunc loadPlugins(repoPath string, preload PluginPreloader) (*loader.PluginLoader, error) {\n\tplugins, err := loader.NewPluginLoader(repoPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error loading plugins: %s\", err)\n\t}\n\n\tif preload != nil {\n\t\tif err := preload(plugins); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error loading plugins (preload): %s\", err)\n\t\t}\n\t}\n\n\tif err := plugins.Initialize(); err != nil {\n\t\treturn nil, fmt.Errorf(\"error initializing plugins: %s\", err)\n\t}\n\n\tif err := plugins.Inject(); err != nil {\n\t\treturn nil, fmt.Errorf(\"error initializing plugins: %s\", err)\n\t}\n\treturn plugins, nil\n}\n","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/cmd/ipfs/kubo/start.go#L62-L98","documentation":"Thrown by loadPlugins when constructing the plugin loader (loader.NewPluginLoader) fails. This typically means the repo path's plugin directory cannot be scanned or the loader cannot determine the repo's plugin configuration, so the daemon cannot start. The message wraps the underlying error from the loader constructor.","triggerScenarios":"Starting the daemon (or a code path preloading plugins) where NewPluginLoader(repoPath) fails: repo path invalid, unreadable <repo>/plugins directory, or corrupted plugin-related repo metadata.","commonSituations":"IPFS_PATH pointing at a non-existent or half-removed repo when launching the daemon; wrong permissions on the plugins dir after copying a repo between users; container images where the repo volume failed to mount.","solutions":["Confirm IPFS_PATH is a valid, initialized repo: `ipfs repo version` or check that <IPFS_PATH>/config exists; run `ipfs init` if missing.","Fix permissions on <IPFS_PATH> and <IPFS_PATH>/plugins (`chown -R $(id -u):$(id -g) $IPFS_PATH`).","Read the wrapped underlying error in the message for the precise filesystem issue and address it.","If a broken plugin caused repo corruption, remove/reinstall the offending .so from the plugins dir or restore a clean repo."],"exampleFix":"// before\nIPFS_PATH=/nonexistent ipfs daemon  // loader cannot scan repo\n// after\nexport IPFS_PATH=$HOME/.ipfs && ipfs init && ipfs daemon","handlingStrategy":"validation","validationCode":"repo := os.Getenv(\"IPFS_PATH\")\nif repo == \"\" {\n\trepo = \"~/.ipfs\"\n}\nif _, err := os.Stat(filepath.Join(repo, \"config\")); err != nil {\n\tlog.Fatalf(\"%s is not an initialized kubo repo (missing config): run `ipfs init` first\", repo)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always init a repo before starting the daemon with a custom IPFS_PATH","Verify repo permissions when copying repos between users, machines, or containers","Keep the plugins directory readable by the daemon user"],"tags":["plugins","daemon","startup"],"backgroundTag":"plugin-load-failed","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"}