{"record":{"id":"7875f3b67e3fddf1","repo":"apache/druid","slug":"failed-to-decode-protobuf-message-with-the-provide","errorCode":null,"errorMessage":"Failed to decode protobuf message with the provided descriptor [%s]","messagePattern":"Failed to decode protobuf message with the provided descriptor \\[(.+?)\\]","errorType":"exception","errorClass":"ParseException","httpStatus":null,"severity":"error","filePath":"extensions-core/protobuf-extensions/src/main/java/org/apache/druid/data/input/protobuf/DescriptorBasedProtobufBytesDecoder.java","lineNumber":100,"sourceCode":"      this.descriptor = buildMessageDescriptor(descriptorSet);\n    }\n  }\n\n  /**\n   * Uses the generated descriptor to parse a message from the byte stream.\n   */\n  @Override\n  public DynamicMessage parse(ByteBuffer bytes)\n  {\n    if (descriptor == null) {\n      throw new IAE(\"Descriptor needs to be initialized before parsing\");\n    }\n\n    try {\n      return DynamicMessage.parseFrom(descriptor, ByteString.copyFrom(bytes));\n    }\n    catch (Exception e) {\n      throw new ParseException(\n          null,\n          e,\n          \"Failed to decode protobuf message with the provided descriptor [%s]\",\n          descriptor.getFullName()\n      );\n    }\n  }\n\n  /**\n   * Load the FileDescriptorSet containing protobuf schema definitions from the concrete implementation's source.\n   */\n  protected abstract DescriptorProtos.FileDescriptorSet loadFileDescriptorSet();\n\n  /**\n   * Build a message descriptor from a FileDescriptorSet.\n   */\n  protected Descriptors.Descriptor buildMessageDescriptor(\n      final DescriptorProtos.FileDescriptorSet descriptorSet","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-core/protobuf-extensions/src/main/java/org/apache/druid/data/input/protobuf/DescriptorBasedProtobufBytesDecoder.java#L82-L118","documentation":"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.","triggerScenarios":"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.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}