{"record":{"id":"dc13c65b30d9e075","repo":"apache/beam","slug":"unsupported-firestore-value-type-valuetypecase","errorCode":null,"errorMessage":"Unsupported Firestore value type: {valueTypeCase}","messagePattern":"Unsupported Firestore value type: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreUtils.java","lineNumber":150,"sourceCode":"        return value.getBytesValue().toByteArray();\n      case NULL_VALUE:\n        return null;\n      case ARRAY_VALUE:\n        List<@Nullable Object> values = new ArrayList<>();\n        for (Value element : value.getArrayValue().getValuesList()) {\n          values.add(valueToJava(element));\n        }\n        return values;\n      case MAP_VALUE:\n        Map<String, Object> map = new HashMap<>();\n        for (Map.Entry<String, Value> entry : value.getMapValue().getFieldsMap().entrySet()) {\n          map.put(entry.getKey(), valueToJava(entry.getValue()));\n        }\n        return map;\n      case VALUETYPE_NOT_SET:\n        return null;\n      default:\n        throw new IllegalArgumentException(\n            \"Unsupported Firestore value type: \" + value.getValueTypeCase());\n    }\n  }\n\n  private static Value javaToValue(Object value, FieldType fieldType) {\n    if (value == null) {\n      return Value.newBuilder().setNullValue(com.google.protobuf.NullValue.NULL_VALUE).build();\n    }\n    switch (fieldType.getTypeName()) {\n      case STRING:\n        return Value.newBuilder().setStringValue(value.toString()).build();\n      case INT64:\n        return Value.newBuilder().setIntegerValue(((Number) value).longValue()).build();\n      case DOUBLE:\n        return Value.newBuilder().setDoubleValue(((Number) value).doubleValue()).build();\n      case BOOLEAN:\n        return Value.newBuilder().setBooleanValue((Boolean) value).build();\n      case DATETIME:","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreUtils.java#L132-L168","documentation":"valueToJava converts a Firestore protocol Value proto into a Java object when reading documents into Rows. It throws IllegalArgumentException when the Value's oneof case (ValueTypeCase) is not one of the handled types — including VALUETYPE_NOT_SET being handled, so this fires for genuinely unknown/unhandled proto cases, typically from a newer Firestore proto feature this Beam version doesn't know.","triggerScenarios":"Reading a Firestore document containing a value type the converter has no case for — e.g. documents written with newer Firestore features (or server-injected value cases) while running an older Beam google-cloud-platform SDK; a corrupted or mis-decoded Value proto.","commonSituations":"Version mismatch: Firestore server or client library emits a value type the pinned Beam/proto version predates; documents containing unusual field types written by other clients; upgrading Firestore data model without upgrading the Beam connector.","solutions":["Upgrade org.apache.beam:beam-sdks-java-io-google-cloud-platform (and its google-cloud-firestore dependency) to the latest version","Inspect the offending document in the Firestore console and identify the exotic field type","Remove or normalize unsupported fields in the document, or read them via a raw Firestore client instead of the Beam connector","Pin a Firestore client version compatible with your Beam version to avoid proto mismatches"],"exampleFix":"// before (pom.xml)\n<dependency><groupId>org.apache.beam</groupId><artifactId>beam-sdks-java-io-google-cloud-platform</artifactId><version>2.40.0</version></dependency>\n// after\n<dependency><groupId>org.apache.beam</groupId><artifactId>beam-sdks-java-io-google-cloud-platform</artifactId><version>2.61.0</version></dependency>","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  Row row = FirestoreUtils.documentToRow(document, schema, documentIdField);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().startsWith(\"Unsupported Firestore value type\")) {\n    log.warn(\"Skipping document with unsupported value type: {}\", document.getName());\n  } else { throw e; }\n}","preventionTips":["Keep Beam and its Firestore client dependencies current","Avoid writing documents with exotic field types when they'll be read via the Beam connector","Test reads against representative production documents"],"tags":["java","apache-beam","firestore","unsupported-type"],"backgroundTag":"unsupported-enum-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}