{"record":{"id":"dc543526f4448c19","repo":"moonD4rk/HackBrowserData","slug":"data-dir-q-does-not-exist","errorCode":null,"errorMessage":"data dir %q does not exist","messagePattern":"data dir %q does not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"browser/keydump.go","lineNumber":86,"sourceCode":"func BuildFromDump(dump masterkey.Dump, dataDir, filter string) ([]Browser, error) {\n\tfilter = strings.ToLower(filter)\n\tif filter == \"all\" {\n\t\tfilter = \"\"\n\t}\n\n\tvar selected []masterkey.Vault\n\tfor _, v := range dump.Vaults {\n\t\tif filter != \"\" && !strings.EqualFold(v.Browser, filter) {\n\t\t\tcontinue\n\t\t}\n\t\tselected = append(selected, v)\n\t}\n\tif filter != \"\" && len(selected) == 0 {\n\t\treturn nil, fmt.Errorf(\"no vault for browser %q in keys (have: %s)\", filter, vaultKeys(dump))\n\t}\n\n\tif !dirExists(dataDir) {\n\t\treturn nil, fmt.Errorf(\"data dir %q does not exist\", dataDir)\n\t}\n\n\tarchiveLayout := isArchiveLayout(dataDir, selected)\n\tif !archiveLayout && len(selected) > 1 {\n\t\treturn nil, fmt.Errorf(\"--data-dir %q has no per-browser subdir but keys has %d browsers; \"+\n\t\t\t\"point it at the archive root, or use -b <browser> for one browser's User Data (have: %s)\",\n\t\t\tdataDir, len(selected), vaultKeys(dump))\n\t}\n\n\tvar browsers []Browser\n\tfor _, v := range selected {\n\t\troot := dataDir\n\t\tif archiveLayout {\n\t\t\troot = filepath.Join(dataDir, strings.ToLower(v.Browser))\n\t\t\tif !dirExists(root) {\n\t\t\t\tlog.Warnf(\"restore: %s has no data under %s, skipping\", v.Browser, root)\n\t\t\t\tcontinue\n\t\t\t}","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/moonD4rk/HackBrowserData/blob/0503d04d7a8d0379d060268a74f1b149e5a0aad5/browser/keydump.go#L68-L104","documentation":"BuildFromDump rejects the caller-supplied data directory because dirExists() reported it missing on disk. The keys dump may be valid, but extraction needs the browser profile files under dataDir, so the function aborts before inspecting archive layout. It fires when the -d/--data-dir path is typo'd, points to an unmounted volume, or names a directory that was deleted after the keys were captured.","triggerScenarios":"Thrown at browser/keydump.go:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the path exists and is spelled correctly: ls <data-dir>","Re-mount the volume or re-attach the drive holding the browser data if it was moved","Point --data-dir at the archive root containing per-browser subdirectories rather than a nonexistent child","Re-copy the data directory from the source machine if it was never transferred"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0503d04d7a8d0379d060268a74f1b149e5a0aad5","analyzedAt":"2026-09-06T13:38:28.707Z","contentChangedAt":"2026-09-06T13:38:28.707Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}