Hi there,
I am getting an error when using "where & orderBy " in firestore collection query.
I am using firestore db in react native app.
below is My function:
getCurrentUser = async () => {
var ptyid = this.props.navigation.state.params.PartyId;
const ref = await firebase
.firestore()
.collection('Transaction')
.orderBy('EntryDate', 'desc')
.where('PartyId', '==', ptyid);
};
Error is :
Error : firestore operation was rejected because the system is not in a state required for the operation's execution.(firestore/failed-precondition).)
can you please guide me