java.util.concurrent.ExecutionException: com.google.api.gax.rpc.UnavailableException: io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:552)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:533)
at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:84)
at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:62)
This is the code I have -
WriteBatch batch = firestoreClient.batch();
CollectionReference collectionReference = firestoreClient.collection(collectionName);
int count = 0;
for (String key : values.keySet()) {
DocumentReference documentReference = collectionReference.document(key);
batch.set(documentReference, values.get(key));
count++;
if (count % 500 == 0) {
batch.commit().get();
batch = firestoreClient.batch();
}
}
batch.commit().get();
Can someone please help with this ?
Thanks,
Sam
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/21c71482-b7cf-418d-9a20-e994ec5bf74a%40googlegroups.com.