FirestoreGoogleAppsScript icon indicating copy to clipboard operation
FirestoreGoogleAppsScript copied to clipboard

getDocuments has SyntaxError: Unexpected end of JSON input

Open kazutoshisugita opened this issue 3 years ago • 3 comments

Minimal code to reproduce the problem

var firestore = FirestoreApp.getFirestore(dateArray.client_email, dateArray.private_key, dateArray.project_id);
const documents = firestore.getDocuments("collection_name");

Expected Behavior

when i run this a month ago, this code was running collectlly but now its not

Library Version:

33

kazutoshisugita avatar Nov 25 '22 06:11 kazutoshisugita

Too much data in response? Sounds like #136

LaughDonor avatar Nov 25 '22 09:11 LaughDonor

thank you for your reply, what the maximum amount of data that is available to pull from firebase by FirestoreApp?

Too much data in response? Sounds like #136

kazutoshisugita avatar Nov 25 '22 11:11 kazutoshisugita

Not sure, but you can use the query functionally of this library to limit results and see what works for you. You can then drop the limit a little more and catch your results.

LaughDonor avatar Nov 25 '22 12:11 LaughDonor