qishibo/AnotherRedisDesktopManager · error
Select a correct .proto file
Error message
Select a correct .proto file
What it means
Element UI toast shown in the Protobuf key viewer when getContent() is called while this.protoRoot is falsy. protoRoot is only set after protobuf.load() successfully parses the selected .proto files (ViewerProtobuf.vue loadProtoFiles), so this message means 'no .proto file is currently loaded/bound for this key'. getContent() returning false aborts the save/encode pipeline in the parent viewer.
Source
Thrown at src/components/viewers/ViewerProtobuf.vue:94
},
buttonText() {
if (!this.proto.length) {
return 'Select Proto Files';
}
return this.proto.map(p => path.basename(p || '')).join(', ');
},
keyHex() {
return this.redisKey.toString('hex');
},
},
mounted() {
this.restoreBinding();
},
methods: {
getContent() {
if (!this.protoRoot) {
this.$message.error('Select a correct .proto file');
return false;
}
if (!this.selectedType || this.selectedType === 'Rawproto') {
this.$message.error('Select a correct Type to encode');
return false;
}
let content = this.$refs.editor.getRawContent();
const type = this.protoRoot.lookupType(this.selectedType);
try {
content = JSON.parse(content);
} catch (e) {
this.$message.error(this.$t('message.json_format_failed'));
return false;
}
View on GitHub (pinned to c149855106)
Solutions
- Click the select-proto button in the protobuf toolbar and choose a valid .proto file, then retry the operation
- If you just selected a file, check for errors — a failed protobuf.load clears the binding; fix the .proto syntax and reselect
- Verify the viewer is actually in Protobuf mode and not still showing raw bytes
Example fix
// Guard earlier: disable the save button until a proto root is loaded <el-button :disabled="!protoRoot" @click="save">Save</el-button>
Defensive patterns
Strategy: validation
Validate before calling
if (!this.protoRoot) {
this.$message.error('Select a correct .proto file');
return false; // existing guard; keep save button disabled instead
} Type guard
// UI-level narrowing const canEncode = (protoRoot, selectedType) => Boolean(protoRoot) && Boolean(selectedType) && selectedType !== 'Rawproto';
Prevention
- Disable the save button until protoRoot is set
- Bind a proto profile per key so protoRoot auto-loads on open
- After any proto load failure, prompt to reselect immediately instead of leaving a null root
When it happens
Trigger: Opening a protobuf-encoded Redis key and clicking save/edit-apply before selecting a .proto file via the 'select proto' button; after loadProtoFiles failed (missing file or parse error) leaving protoRoot null and then attempting to submit content; restoreBinding() found no persisted profile so no root was loaded automatically.
Common situations: First-time use of the protobuf viewer without a bound .proto; the persisted profile was cleared after a failed load (clearBinding on error) and the user edits again without reselecting; switching between viewer tabs resets state.
Related errors
- Select a correct Type to encode
- this.$t('message.group_name_required')
- this.$t('message.group_exists')
- this.$t('message.json_format_failed')
- Proto Verify Failed: ${err}
AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22).
Data as JSON: /api/errors/5b5549235bf578c8.
Report an issue: GitHub.