React-native-firebase: [Firestore] Invalid query limit on iOS only

Created on 6 Nov 2017  路  2Comments  路  Source: invertase/react-native-firebase

Issue

Hi,
I want to make a chat using firestore, but when using query limit I have an error on iOS. This query runs nicely on android.

firestore query limit error

const _this = this;
this.unsibscribeChat = this.chatRef
    .orderBy('createdAt', 'desc')
    .limit(10)
    .onSnapshot(function(querySnapshot) {
                _this.messageList = [];

                querySnapshot.forEach(function(doc) {
                    // console.log(doc.id, " => ", doc.data());

                    const message = doc.data();
                    message.id = doc.id;
                    _this.messageList.push(message);
                });
            });

Environment

  1. Application Target Platform: iOS

  1. Development Operating System: Mac OS X El Capitan

  1. Build Tools: iOS 10.2 Simulator

  1. React Native version: 0.49.3

  1. RNFirebase Version: 3.0.6

  1. Firebase Module: Cloud Firestore
Firestore

Most helpful comment

@jokopurnomoa This should be fixed in v3.1.0 which will be released later today. I'll update this issue when it has been.

All 2 comments

@jokopurnomoa This should be fixed in v3.1.0 which will be released later today. I'll update this issue when it has been.

@jokopurnomoa v3.1.0 is out now with this fix. Thanks for the report

Was this page helpful?
0 / 5 - 0 ratings