{"record":{"id":"0b00dd073d5cf240","repo":"ipfs/kubo","slug":"mountfuse-getconfig-failed-s","errorCode":null,"errorMessage":"mountFuse: GetConfig() failed: %s","messagePattern":"mountFuse: GetConfig\\(\\) failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/ipfs/kubo/daemon.go","lineNumber":1239,"sourceCode":"\n\terrc := make(chan error, 1)\n\tgo func() {\n\t\terrc <- h.Serve()\n\t\tclose(errc)\n\t}()\n\n\tcontext.AfterFunc(node.Context(), func() {\n\t\th.Close()\n\t})\n\n\treturn errc, nil\n}\n\n// collects options and opens the fuse mountpoint.\nfunc mountFuse(req *cmds.Request, cctx *oldcmds.Context) error {\n\tcfg, err := cctx.GetConfig()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"mountFuse: GetConfig() failed: %s\", err)\n\t}\n\n\tfsdir, found := req.Options[ipfsMountKwd].(string)\n\tif !found {\n\t\tfsdir = cfg.Mounts.IPFS\n\t}\n\tif err := checkFusePath(\"Mounts.IPFS\", fsdir); err != nil {\n\t\treturn err\n\t}\n\n\tnsdir, found := req.Options[ipnsMountKwd].(string)\n\tif !found {\n\t\tnsdir = cfg.Mounts.IPNS\n\t}\n\tif err := checkFusePath(\"Mounts.IPNS\", nsdir); err != nil {\n\t\treturn err\n\t}\n","sourceCodeStart":1221,"sourceCodeEnd":1257,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/cmd/ipfs/kubo/daemon.go#L1221-L1257","documentation":"mountFuse reads the node configuration via cctx.GetConfig() before performing FUSE mounts (/ipfs, /ipns, MFS). If the config cannot be loaded — unreadable repo, corrupt config file, missing $IPFS_PATH — the error is wrapped as \"mountFuse: GetConfig() failed\". It is a pre-mount config access failure, not a FUSE problem itself.","triggerScenarios":"Running `ipfs daemon --mount` (or `ipfs mount`) when the repo config is unreadable: IPFS_PATH points to a non-existent/uninitialized repo, config file permissions deny access, or the config JSON is corrupt.","commonSituations":"Wrong IPFS_PATH environment variable; repo not initialized (`ipfs init` never run); config file truncated by a failed edit; running as a different user than the repo owner so permissions fail.","solutions":["Check IPFS_PATH and confirm the repo exists and is initialized: run `ipfs init` if missing","Validate the config parses: `ipfs config show` and fix any JSON corruption or remove the bad key","Fix file permissions on $IPFS_PATH/config so the daemon user can read it","Confirm Mounts.IPFS/Mounts.IPNS/Mounts.MFS values are valid paths in the config"],"exampleFix":"// before\nIPFS_PATH=/wrong/path ipfs daemon --mount\n// after\nexport IPFS_PATH=~/.ipfs\nipfs init   # if repo missing\nipfs daemon --mount","handlingStrategy":"validation","validationCode":"if _, err := cctx.GetConfig(); err != nil {\n\t// resolve repo/config before invoking daemon --mount\n\treturn fmt.Errorf(\"config unreadable: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := mountFuse(req, cctx); err != nil {\n\tvar wrapped string = err.Error()\n\tif strings.Contains(wrapped, \"GetConfig() failed\") {\n\t\t// check IPFS_PATH, run ipfs init, fix config permissions\n\t}\n\treturn err\n}","preventionTips":["Always set IPFS_PATH explicitly in scripts and CI","Run `ipfs init` before any daemon/mount operation on a fresh machine","Validate config with `ipfs config show` after manual edits","Keep repo ownership consistent with the user running the daemon"],"tags":["go","daemon","config","fuse","mount"],"backgroundTag":"config-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"}