{"record":{"id":"761a99a48a185cdc","repo":"moonD4rk/HackBrowserData","slug":"no-process-has-file-open-s","errorCode":null,"errorMessage":"no process has file open: %s","messagePattern":"no process has file open: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"filemanager/copy_windows.go","lineNumber":103,"sourceCode":"\t\tif winapi.GetFileType(dupHandle) != winapi.FileTypeDisk {\n\t\t\t_ = windows.CloseHandle(dupHandle)\n\t\t\tcontinue\n\t\t}\n\n\t\t// Get the file path and check if it matches our target\n\t\tname, err := winapi.GetFinalPathName(dupHandle)\n\t\tif err != nil {\n\t\t\t_ = windows.CloseHandle(dupHandle)\n\t\t\tcontinue\n\t\t}\n\n\t\tif strings.HasSuffix(strings.ToLower(name), targetSuffix) {\n\t\t\treturn dupHandle, nil\n\t\t}\n\t\t_ = windows.CloseHandle(dupHandle)\n\t}\n\n\treturn 0, fmt.Errorf(\"no process has file open: %s\", targetPath)\n}\n\n// readFileContent reads file content from a duplicated handle.\n// It uses FileMapping first (CreateFileMapping + MapViewOfFile), which reads\n// from the OS kernel's file cache — this includes WAL data that Chrome has\n// written but not yet checkpointed to the main file. Falls back to ReadFile\n// if FileMapping fails.\nfunc readFileContent(handle windows.Handle) ([]byte, error) {\n\tfileSize, err := winapi.GetFileSizeEx(handle)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif fileSize == 0 {\n\t\treturn nil, fmt.Errorf(\"file is empty\")\n\t}\n\n\tsize := int(fileSize)\n","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/moonD4rk/HackBrowserData/blob/0503d04d7a8d0379d060268a74f1b149e5a0aad5/filemanager/copy_windows.go#L85-L121","documentation":"findFileHandle exhausted every duplicatable system handle without one whose final path suffix-matches the target file, so no process appears to hold the requested file open. In the context of copyLocked it means the 'locked file' premise failed — the lock is gone or was never exclusive — and the caller should fall back to an ordinary copy instead of the handle-duplication path.","triggerScenarios":"Thrown at filemanager/copy_windows.go:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fall back to a normal file copy since no process holds the file","Verify the file path casing/spelling used for suffix matching","Re-check that the browser process holding the lock is still alive","Retry the copy after restarting the target browser"],"exampleFix":null,"handlingStrategy":"fallback","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-14T05:17:10.506Z"}