qishibo/AnotherRedisDesktopManager · error
Raw content is an object, but now parse object failed: ${e.m
Error message
Raw content is an object, but now parse object failed: ${e.message} What it means
Element UI toast (6s duration) shown when re-encoding an edited msgpack value: the raw content from the editor is expected to be JSON (because the original decoded value was an object, not a string), and JSONbig.parse(content) throws. JSONbig is used to preserve big integers exactly; a syntax error in the edited JSON text aborts before @msgpack/msgpack's encode() runs, and getContent() returns false to block the write.
Source
Thrown at src/components/viewers/ViewerMsgpack.vue:34
newContent() {
try {
return decode(this.content);
} catch (e) {
return this.$t('message.msgpack_format_failed');
}
},
},
methods: {
getContent() {
let content = this.$refs.editor.getRawContent();
// raw content is an object
if (typeof this.newContent !== 'string') {
try {
content = JSONbig.parse(content);
} catch (e) {
// object parse failed
this.$message.error({
message: `Raw content is an object, but now parse object failed: ${e.message}`,
duration: 6000,
});
return false;
}
}
// encode returns Uint8Array
return Buffer.from(encode(content));
},
copyContent() {
const content = decode(this.content);
return (typeof content === 'object') ? JSONbig.stringify(content) : content;
},
},
};
</script>View on GitHub (pinned to c149855106)
Solutions
- Correct the JSON syntax error and save again
- Run the editor's format/pretty-print action to pinpoint the syntax error location
- Validate externally (jq or a JSON linter) then paste back
- Improvement: include e.message (JSONbig reports position) in the toast to locate the error
Example fix
// before
this.$message.error({
message: `Raw content is an object, but now parse object failed: ${e.message}`,
duration: 6000,
});
// after
// surface position clearly
this.$message.error({
message: `Invalid JSON in editor: ${e.message}`,
duration: 6000,
}); Defensive patterns
Strategy: try-catch
Validate before calling
// validate before encode
try {
JSONbig.parse(this.$refs.editor.getRawContent());
} catch (e) {
this.$message.error(`Invalid JSON: ${e.message}`);
return;
} Type guard
const isParsableJSONbig = (s) => {
try { JSONbig.parse(s); return true; } catch { return false; }
}; Try / catch
try {\n content = JSONbig.parse(content);\n} catch (e) {\n this.$message.error({ message: `Raw content is an object, but now parse object failed: ${e.message}`, duration: 6000 });\n return false; // block the write, preserve editor contents\n} Prevention
- Pretty-print/format the JSON before editing to reduce bracket mistakes
- Debounce-validate JSON in the editor and mark errors inline
- Do not mix relaxed JSON syntax into the msgpack object editor
When it happens
Trigger: Opening a msgpack-encoded Redis key whose decoded value is an object, editing the JSON in the editor, introducing a syntax error (trailing comma, missing quote, unbalanced brace), then saving; pasting non-JSON text into the editor; truncating the JSON mid-edit and submitting.
Common situations: Hand-editing nested msgpack documents; values with very large int64 fields are fine (JSONbig keeps precision) but relaxed JSON (comments, single quotes) is not; collaborative edits pasted from notes apps that mangle quotes.
Related errors
- this.$t('message.json_format_failed')
- Raw content is an object, but now parse object failed: ${e.m
- Proto Verify Failed: ${err}
- this.$t('message.json_format_failed')
- this.$t('message.json_format_failed')
AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22).
Data as JSON: /api/errors/5aa4010bf775ae3b.
Report an issue: GitHub.