apache/druid · error · ParseException
Failed to decode protobuf message with the provided…
Error message
Failed to decode protobuf message with the provided descriptor [%s]
What it means
Decode-failure wrapper in DescriptorBasedProtobufBytesDecoder.parse: DynamicMessage.parseFrom threw while decoding the byte payload against the configured descriptor, so the bytes do not match the proto message schema (or are truncated/corrupt); the exception is rethrown as a Druid ParseException naming the descriptor.
Solutions
- Verify the payload actually matches the protoMessageType/schema in the descriptor.
- Check for truncation or compression (e.g. gzip-wrapped bytes) before the decoder.
- Confirm the descriptor file/protoMessageType correspond to the producer's schema version.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at extensions-core/protobuf-extensions/src/main/java/org/apache/druid/data/input/protobuf/DescriptorBasedProtobufBytesDecoder.java:100 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/7875f3b67e3fddf1.
Report an issue: GitHub.
Appendix: source
Thrown at extensions-core/protobuf-extensions/src/main/java/org/apache/druid/data/input/protobuf/DescriptorBasedProtobufBytesDecoder.java:100
this.descriptor = buildMessageDescriptor(descriptorSet);
}
}
/**
* Uses the generated descriptor to parse a message from the byte stream.
*/
@Override
public DynamicMessage parse(ByteBuffer bytes)
{
if (descriptor == null) {
throw new IAE("Descriptor needs to be initialized before parsing");
}
try {
return DynamicMessage.parseFrom(descriptor, ByteString.copyFrom(bytes));
}
catch (Exception e) {
throw new ParseException(
null,
e,
"Failed to decode protobuf message with the provided descriptor [%s]",
descriptor.getFullName()
);
}
}
/**
* Load the FileDescriptorSet containing protobuf schema definitions from the concrete implementation's source.
*/
protected abstract DescriptorProtos.FileDescriptorSet loadFileDescriptorSet();
/**
* Build a message descriptor from a FileDescriptorSet.
*/
protected Descriptors.Descriptor buildMessageDescriptor(
final DescriptorProtos.FileDescriptorSet descriptorSetView on GitHub (pinned to 9b90983fd2)