{"record":{"id":"d84331472ba04fc3","repo":"apache/druid","slug":"descriptor-string-does-not-have-valid-base64-encod","errorCode":null,"errorMessage":"Descriptor string does not have valid Base64 encoding","messagePattern":"Descriptor string does not have valid Base64 encoding","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions-core/protobuf-extensions/src/main/java/org/apache/druid/data/input/protobuf/InlineDescriptorProtobufBytesDecoder.java","lineNumber":71,"sourceCode":"  {\n    return descriptorString;\n  }\n\n  @Override\n  protected DescriptorProtos.FileDescriptorSet loadFileDescriptorSet()\n  {\n    try {\n      byte[] decodedDesc = StringUtils.decodeBase64String(descriptorString);\n\n      final var descriptorSet = DescriptorProtos.FileDescriptorSet.parseFrom(decodedDesc);\n      if (descriptorSet.getFileCount() == 0) {\n        throw new ParseException(null, \"No file descriptors found in the descriptor set\");\n      }\n\n      return descriptorSet;\n    }\n    catch (IllegalArgumentException e) {\n      throw new IAE(\"Descriptor string does not have valid Base64 encoding\");\n    }\n    catch (IOException e) {\n      throw new ParseException(descriptorString, e, \"Failed to initialize descriptor\");\n    }\n  }\n\n  @Override\n  public boolean equals(Object o)\n  {\n    if (this == o) {\n      return true;\n    }\n    if (o == null || getClass() != o.getClass()) {\n      return false;\n    }\n    if (!super.equals(o)) {\n      return false;\n    }","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-core/protobuf-extensions/src/main/java/org/apache/druid/data/input/protobuf/InlineDescriptorProtobufBytesDecoder.java#L53-L89","documentation":"Encoding validation in InlineDescriptorProtobufBytesDecoder.loadFileDescriptorSet: the descriptor string could not be base64-decoded, so the inline descriptor spec contains characters outside the base64 alphabet or invalid padding, and no descriptor can be built.","triggerScenarios":"Thrown at extensions-core/protobuf-extensions/src/main/java/org/apache/druid/data/input/protobuf/InlineDescriptorProtobufBytesDecoder.java:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-encode the descriptor file with standard base64 (with padding) and paste the full string into descriptor.","Check for whitespace/newlines or truncation introduced when copying the spec."],"exampleFix":null,"handlingStrategy":"validation","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"}