{"record":{"id":"53b51a423fbb6d1e","repo":"qishibo/AnotherRedisDesktopManager","slug":"proto-file-not-found-please-reselect-missing-m","errorCode":null,"errorMessage":"Proto file not found, please reselect: ${missing.map(p => path.basename(p)).join(', ')}","messagePattern":"Proto file not found, please reselect: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/components/viewers/ViewerProtobuf.vue","lineNumber":160,"sourceCode":"      });\n    },\n    restoreBinding() {\n      const profile = storage.getProtobufProfileByRedisKey(this.keyHex);\n      if (!profile || !profile.paths) {\n        return;\n      }\n\n      this.loadProtoFiles(profile.paths, profile.bookmarks || [], false);\n    },\n    loadProtoFiles(paths, bookmarks = [], persist = false) {\n      if (!paths.length) {\n        return Promise.resolve(false);\n      }\n\n      // file not found\n      const missing = paths.filter(p => !fs.existsSync(p));\n      if (missing.length) {\n        this.$message.error(\n          \"Proto file not found, please reselect: \" +\n          `${missing.map(p => path.basename(p)).join(', ')}`\n        );\n        this.clearBinding();\n        return Promise.resolve(false);\n      }\n      // apply bookmark\n      const release = this.accessBookmarks(bookmarks);\n      // then read\n      return protobuf.load(paths).then((root) => {\n        this.proto = paths;\n        this.bookmarks = bookmarks || [];\n\n        this.protoRoot = root;\n        this.types = ['Rawproto'];\n        this.traverseTypes(root);\n        // default select the first real type\n        this.selectedType = this.types.length > 1 ? this.types[1] : 'Rawproto';","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/components/viewers/ViewerProtobuf.vue#L142-L178","documentation":"Element UI toast listing basenames of .proto files that no longer exist on disk. loadProtoFiles() runs fs.existsSync over every persisted path before loading; any missing path produces this message, then clearBinding() wipes the saved profile (the key-to-proto association) and loading aborts.","triggerScenarios":"A previously bound .proto lived on a USB drive, network share, or temp folder that is no longer mounted; files were renamed/moved/deleted since the binding was persisted; macOS sandbox container moved the file so the absolute path changed; paths saved from a different machine via synced config.","commonSituations":"Reopening the app after pulling a repo whose proto files moved directories; using security-scoped bookmarks that expired (macOS App Store sandbox); switching between two workstations with different home directory layouts.","solutions":["Reselect the .proto file(s) via the picker — the binding is re-persisted on success","If files moved permanently, update the binding once to the new location; keep proto files in a stable absolute path","On macOS, ensure the app retains access (the bookmark) or run a non-sandboxed build","Store paths relative to the project/workspace when possible and resolve at load time"],"exampleFix":"// before\nconst missing = paths.filter(p => !fs.existsSync(p));\nif (missing.length) {\n  this.$message.error(\"Proto file not found, please reselect: \" + ...);\n  this.clearBinding();\n}\n\n// after - offer to re-locate instead of silently dropping the binding\nconst missing = paths.filter(p => !fs.existsSync(p));\nif (missing.length) {\n  this.$message.warning(`Proto files moved: ${missing.map(p => path.basename(p)).join(', ')} — reselect them`);\n  // keep profile so the user only re-picks the missing files\n}","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nconst missing = paths.filter(p => !fs.existsSync(p));\nif (missing.length) {\n  // prompt reselect instead of proceeding to protobuf.load\n  this.$message.error('Proto file not found, please reselect: ' + missing.map(p => require('path').basename(p)).join(', '));\n  return false;\n}","typeGuard":"const allFilesExist = (paths) => paths.every(p => fs.existsSync(p));","tryCatchPattern":null,"preventionTips":["Keep .proto files at stable absolute paths (not removable media/temp dirs)","Re-verify persisted paths on app startup, not only when opening a key","On macOS keep the security-scoped bookmark fresh so file access survives restarts"],"tags":["protobuf","file-not-found","persistence","vue"],"backgroundTag":"missing-schema-file","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}