{"record":{"id":"4fcad7ebc22bcf65","repo":"qishibo/AnotherRedisDesktopManager","slug":"e-message-4fcad7","errorCode":null,"errorMessage":"e.message","messagePattern":"e\\.message","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/components/viewers/ViewerProtobuf.vue","lineNumber":141,"sourceCode":"    copyContent() {\n      return JSON.stringify(this.newContent);\n    },\n    selectProto() {\n      dialog.showOpenDialog({\n        securityScopedBookmarks: true,\n        properties: ['openFile', 'multiSelections'],\n        filters: [\n          {\n            name: '.proto',\n            extensions: ['proto'],\n          },\n        ],\n      }).then((result) => {\n        if (result.canceled) return;\n\n        this.loadProtoFiles(result.filePaths || [], result.bookmarks || [], true);\n      }).catch((e) => {\n        this.$message.error(e.message);\n      });\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) {","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/components/viewers/ViewerProtobuf.vue#L123-L159","documentation":"Element UI toast that displays the raw e.message from a rejected Electron dialog.showOpenDialog() promise in the protobuf viewer's selectProto(). showOpenDialog (via the remote/ipcRenderer bridge) rejects when the file picker cannot be created or the IPC round-trip fails — e.g. the parent window is closing, the dialog service is unavailable, or the renderer was reloading mid-call. The catch simply forwards whatever the rejection says, so the visible text is whatever Electron reported.","triggerScenarios":"Invoking the .proto file picker (selectProto button) and the underlying Electron dialog promise rejecting — commonly when the window is destroyed while the native dialog is open, or when securityScopedBookmarks:true is used on a non-macOS platform in an environment that errors on it.","commonSituations":"Closing the app window while the OS file dialog is open; running on Windows/Linux where 'securityScopedBookmarks' is not supported (normally ignored, but custom builds/older Electron versions can reject); dialog permission problems in sandboxed/Flatpak Linux packages.","solutions":["Dismiss and click the select-proto button again once the window is stable","Upgrade Electron — older versions had dialog promise rejections on window teardown","If it reproduces consistently, drop 'securityScopedBookmarks' from the options on non-macOS platforms (bookmarks are macOS-only)","Log the full error (e.message plus stack) via console/error monitoring to identify the actual cause"],"exampleFix":"// before\n}).catch((e) => {\n  this.$message.error(e.message);\n});\n\n// after - tolerate teardown, surface real errors with context\n}).catch((e) => {\n  if (!e || e.message === 'Object has been destroyed') return;\n  this.$message.error(`Open dialog failed: ${e.message}`);\n});","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"dialog.showOpenDialog({...}).then((result) => {\n  if (result.canceled) return;\n  this.loadProtoFiles(result.filePaths || [], result.bookmarks || [], true);\n}).catch((e) => {\n  // ignore teardown noise; surface actionable failures with context\n  if (!e || /Object has been destroyed/.test(e.message)) return;\n  this.$message.error(`Open dialog failed: ${e.message}`);\n});","preventionTips":["Check result.canceled before using filePaths (normal close path)","Do not call showOpenDialog during window teardown/navigation","Only request securityScopedBookmarks on macOS"],"tags":["electron","native-dialog","protobuf","ipc"],"backgroundTag":"electron-dialog-rejected","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}