qishibo/AnotherRedisDesktopManager · warning
Zlib Gzip Parse Failed!
Error message
Zlib Gzip Parse Failed!
What it means
Placeholder string shown in the gzip viewer's decoded-content pane when decompression fails. formatStr calls $util.zippedToString(content, 'gzip') (src/util.js:164), which runs zlib.gunzipSync and returns the decoded UTF-8 string — or false on any throw or empty result. newContent falls back to 'Zlib Gzip Parse Failed!' whenever formatStr is not a string, so the message means: the stored bytes are not a valid gzip stream.
Source
Thrown at src/components/viewers/ViewerGzip.vue:26
const zlib = require('zlib');
export default {
components: { JsonEditor },
props: ['content'],
computed: {
newContent() {
const { formatStr } = this;
if (typeof formatStr === 'string') {
if (this.$util.isJson(formatStr)) {
return JSONbig.parse(formatStr);
}
return formatStr;
}
return 'Zlib Gzip Parse Failed!';
},
formatStr() {
return this.$util.zippedToString(this.content, 'gzip');
},
},
methods: {
getContent() {
const content = this.$refs.editor.getRawContent(true);
return zlib.gzipSync(content);
},
copyContent() {
return this.formatStr;
},
},
};
</script>
View on GitHub (pinned to c149855106)
Solutions
- Check the value is really gzip: first bytes should be 1f 8b (hex view)
- If it is raw deflate, deflateRaw, or brotli, switch the viewer mode accordingly
- Inspect in the binary/hex viewer for truncation or an encryption layer
- If you control the writer, verify it flushes complete gzip streams (e.g. gzipSync vs streaming Gzip without .end())
Example fix
// before
return 'Zlib Gzip Parse Failed!';
// after - surface the zlib reason
// in util.js, return the error for display
try {
return zlib.gunzipSync(buf).toString();
} catch (e) {
return `Zlib Gzip Parse Failed: ${e.message}`;
} Defensive patterns
Strategy: type-guard
Validate before calling
const ok = typeof this.$util.zippedToString(buf, 'gzip') === 'string';
if (!ok) { /* do not render gzip viewer; fall back to hex */ } Type guard
// same predicate the app itself uses (src/util.js isGzip) const isGzip = (buf) => typeof $util.zippedToString(buf, 'gzip') === 'string';
Prevention
- Producers: write complete gzipSync output (no unterminated streaming Gzip)
- Consumers: switch viewer by detection (isGzip/isDeflate/isBrotli in util.js) instead of hardcoding the mode
- Hex-check the 1f 8b magic when detection disagrees with expectation
When it happens
Trigger: Viewing a key whose type is detected/labeled gzip but whose bytes lack the gzip magic (1f 8b) or are truncated; double-gzip data; zlib.gunzipSync throwing 'incorrect header check' or 'unexpected end of file'; decompressed length 0 also maps to false.
Common situations: Values compressed with raw deflate instead of gzip; payload encrypted before compression; partial writes/corruption; content type misdetected because a previous key in the session was gzip.
Related errors
- Zlib Deflate Parse Failed!
- Zlib DeflateRaw Parse Failed!
- Zlib Brotli Parse Failed!
- Select a correct .proto file
- Pickle is readonly now!
AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22).
Data as JSON: /api/errors/6c133baa572d0a34.
Report an issue: GitHub.