qishibo/AnotherRedisDesktopManager · error
Fail to load proto: ${e.message}
Error message
Fail to load proto: ${e.message} What it means
Element UI toast shown when protobuf.load(paths) rejects while parsing the selected .proto file(s). protobufjs parses .proto grammar at runtime; it rejects with a tokenize/parse error (with filename, line, and column) for syntax errors, unresolved imports, or unreadable files. The catch also calls clearBinding(), so the failing key-to-proto profile is removed and must be reselected.
Source
Thrown at src/components/viewers/ViewerProtobuf.vue:196
this.selectedType = this.types.length > 1 ? this.types[1] : 'Rawproto';
// protobuf decode failed
if (this.selectedType === 'Rawproto' || this.newContent === DECODE_FAILED) {
// restore mode, clear binding
// if (!persist) {
// this.clearBinding();
// }
return false;
}
// protobuf decode success
if (persist) {
this.persistBinding();
}
return true;
}).catch((e) => {
this.$message.error(`Fail to load proto: ${e.message}`);
this.clearBinding();
return false;
}).finally(() => {
// release bookmarks if exists
release();
});
},
persistBinding() {
const redisKeyHex = this.keyHex;
if (!redisKeyHex || !this.proto.length) {
return;
}
storage.bindProtobufProfile(redisKeyHex, {
name: this.proto.map(p => path.basename(p)).join(', '),
paths: this.proto,
bookmarks: this.bookmarks,
});View on GitHub (pinned to c149855106)
Solutions
- Read e.message — protobufjs reports file:line:column of the parse failure; fix that spot
- Ensure imported .proto files are included in the multi-selection (the dialog allows multiSelections)
- Run `protoc --proto_path=<dir> <file>.proto` locally to confirm the file is valid before selecting it
- After fixing, reselect the files to rebuild the binding (it was cleared)
Example fix
// before
}).catch((e) => {
this.$message.error(`Fail to load proto: ${e.message}`);
this.clearBinding();
return false;
});
// after - longer duration so the file:line detail is readable
}).catch((e) => {
this.$message.error({ message: `Fail to load proto: ${e.message}`, duration: 10000 });
this.clearBinding();
return false;
}); Defensive patterns
Strategy: try-catch
Validate before calling
// validate the proto compiles before binding it // (run locally): protoc --proto_path=<dir> file.proto
Try / catch
protobuf.load(paths).then((root) => { ... })
.catch((e) => {
// e.message contains file:line:column of the syntax error
this.$message.error({ message: `Fail to load proto: ${e.message}`, duration: 10000 });
this.clearBinding();
return false;
}); Prevention
- Compile protos with protoc before selecting them in the viewer
- Include imported files in the picker's multi-selection
- Pin one proto syntax (proto2/proto3) per project and lint it in CI
When it happens
Trigger: Selecting a .proto with a syntax error (missing semicolon, bad proto2/proto3 declaration); a file that imports another .proto not present in the selected set or its include paths; selecting a file that is actually protobuf source trimmed/corrupted (truncated download); permission errors reading the file.
Common situations: Editing proto files in another tool and saving mid-edit; protos that compile only with protoc -I include paths, since protobuf.load here gets bare file paths with no import roots; CR/LF or BOM issues in hand-made files; switching proto versions where syntax changed.
Related errors
- Select a correct .proto file
- Select a correct Type to encode
- this.$t('message.json_format_failed')
- Proto Verify Failed: ${err}
- Proto file not found, please reselect: ${missing.map(p => pa
AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22).
Data as JSON: /api/errors/dd5c451db5990782.
Report an issue: GitHub.