You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Firestore AggregateQuery is now broken when using the Firestore emulator with firebase-tools version 13.3.1 specifically on firebase-js-sdk #6808
import{initializeApp}from'firebase/app';import{getFirestore,collection,getCountFromServer,connectFirestoreEmulator,}from'firebase/firestore';varconfig={// USE YOUR OWN FIREBASE CONFIG};initializeApp(config);constdb=getFirestore();connectFirestoreEmulator(db,'localhost',8080);// UPDATE COLLECTION TO ONE OF YOUR CHOICE THAT HAS READ ACCESSconstcollectionRef='flutter-tests';asyncfunctioncallCount(){constcoll=collection(db,collectionRef);constsnapshot=awaitgetCountFromServer(coll);console.log('count: ',snapshot.data().count);}document.getElementById('button-id').addEventListener('click',()=>{callCount();});
[REQUIRED] Steps to reproduce
Insert the above script into a HTML file with necessary Firebase web setup.
Insert your own Firebase config from the Firebase console.
Update collection to one that has read access.
Fire up Firestore emulator using latest firebase-tools.
See an "internal" exception appear in the browser console.
[REQUIRED] Expected behavior
If you want to see the expected behaviour, you can roll back firebase-tools to the previous version 13.3.0 which successfully resolves the aggregate query count().
changed the title [-]Firestore AggregateQuery is now broken when using the Firestore emulator[/-][+]Firestore AggregateQuery is now broken when using the Firestore emulator with firebase-tools version `13.3.1`[/+]on Feb 23, 2024
changed the title [-]Firestore AggregateQuery is now broken when using the Firestore emulator with firebase-tools version `13.3.1`[/-][+]Firestore AggregateQuery is now broken when using the Firestore emulator with firebase-tools version `13.3.1` specifically on firebase-js-sdk[/+]on Feb 23, 2024
Hey @russellwheatley, thanks for raising this and for filing a detailed report. I was able to reproduce the issue mentioned. Let me raise this to our engineering team so that they can take a look and investigate the issue.
Just a quick update here, our team is currently investigating the cause of this issue. For now, I can only recommend downgrading to firebase-tools v13.3.0 as a workaround. Apologies for the inconvenience this may have caused.
Reacted by Russell Wheatley, Akseli Palmer, Francesco Fusco and keunwoo
Activity
[-]Firestore AggregateQuery is now broken when using the Firestore emulator[/-][+]Firestore AggregateQuery is now broken when using the Firestore emulator with firebase-tools version `13.3.1`[/+][-]Firestore AggregateQuery is now broken when using the Firestore emulator with firebase-tools version `13.3.1`[/-][+]Firestore AggregateQuery is now broken when using the Firestore emulator with firebase-tools version `13.3.1` specifically on firebase-js-sdk[/+]aalej commentedon Feb 23, 2024
Hey @russellwheatley, thanks for raising this and for filing a detailed report. I was able to reproduce the issue mentioned. Let me raise this to our engineering team so that they can take a look and investigate the issue.
aalej commentedon Feb 23, 2024
Just a quick update here, our team is currently investigating the cause of this issue. For now, I can only recommend downgrading to
firebase-toolsv13.3.0 as a workaround. Apologies for the inconvenience this may have caused.harshyyy21 commentedon Mar 11, 2024
Hi @russellwheatley, this should be fixed in the next release this week. Sorry for any inconveniences!