qishibo/AnotherRedisDesktopManager · warning

Zlib Brotli Parse Failed!

Error message

Zlib Brotli Parse Failed!

What it means

Placeholder string shown in the brotli viewer when decompression fails. formatStr calls $util.zippedToString(content, 'brotli') → zlib.brotliDecompressSync, which parses the brotli bitstream format (no fixed magic bytes, unlike gzip). Any throw or empty output makes formatStr false and newContent renders 'Zlib Brotli Parse Failed!', meaning the stored bytes are not a decodable brotli stream.

Source

Thrown at src/components/viewers/ViewerBrotli.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 Brotli Parse Failed!';
    },
    formatStr() {
      return this.$util.zippedToString(this.content, 'brotli');
    },
  },
  methods: {
    getContent() {
      const content = this.$refs.editor.getRawContent(true);
      return zlib.brotliCompressSync(content);
    },
    copyContent() {
      return this.formatStr;
    },
  },
};
</script>

View on GitHub (pinned to c149855106)

Solutions

  1. Verify the writer used zlib.brotliCompressSync (or standard brotli) and stored the raw output
  2. Hex-inspect for an outer encoding layer (hex/base64) left on the value
  3. Check for truncation — brotli streams have no easy header, so compare stored byte length with the writer's output length
  4. Switch viewer mode if the value is actually gzip/deflate

Example fix

// before
return 'Zlib Brotli Parse Failed!';

// after - propagate the zlib reason
try {
  return zlib.brotliDecompressSync(buf).toString();
} catch (e) {
  return `Zlib Brotli Parse Failed: ${e.message}`;
}
Defensive patterns

Strategy: type-guard

Validate before calling

const ok = typeof this.$util.zippedToString(buf, 'brotli') === 'string';
if (!ok) { /* fall back to hex viewer */ }

Type guard

// same predicate the app uses (src/util.js isBrotli)
const isBrotli = (buf) => typeof $util.zippedToString(buf, 'brotli') === 'string';

Prevention

When it happens

Trigger: Viewing a key labeled brotli whose bytes were compressed with another algorithm or corrupted — brotliDecompressSync throws ERR_UNEXPECTED_EOF or similar; truncated stream after partial write; brotli output produced with custom parameters is still fine, but random/encrypted data is not; empty decompressed output also maps to false.

Common situations: Brotli used for HTTP-origin cached bodies that were also chunk-framed or hex-encoded before storing; misdetected content type; values written by newer Brotli encoders that rely on custom dictionaries not available to Node's zlib.

Related errors


AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22). Data as JSON: /api/errors/536d7e14d39d864a. Report an issue: GitHub.