I'm trying to return all document IDs in a specific collection. I'm writing this in Javascript for a web application. I made this function, and call it where it is needed.
function getUserList() {
var rootRef = firebase.database().ref();
var db = firebase.firestore();
//var docRef = db.collection("Users");//.doc(getUserID()).collection("userControl").doc("UserStatus") //EXAMPLE: /Users/UUID/userControl/UserStatus
db.collection('Users')
.get().then(function(querySnapshot) {
size = querySnapshot.size // will return the collection size
console.log(size);
querySnapshot.forEach(function(doc) {
console.log(doc.id);
});
});
}
However when I check the console log for the data, I only ever see 6 out of 8 documents. There are 8 documents total, but the count and log of doc.id only shows 6. can be seen in screenshot (blanked one ID out for reasons).
If I specify one of the missing documents .get.collection('Users').doc('UUID HERE')...
it reads that document without issue.
Most of these documents are uploaded from an IOS app, with the exception of mine (blurred out), the UID template. If I manually edit the document, ie add an extra field, etc the document appears in the search, but for documents straight from the IOS app, they aren't appearing unless speficifed.
I'm not sure how to go about fixing this, or why this issue is occuring.