Giter VIP home page Giter VIP logo

Comments (6)

schmidt-sebastian avatar schmidt-sebastian commented on May 29, 2024 2

@agersoncgps In the error message that you are seeing, there should be a http link that allows you to add an index. Any query that you issue that uses more than one field needs a composite index, and you need to define these indices beforehand. Please take a look here: https://firebase.google.com/docs/firestore/query-data/indexing

Queries that only involve one field will work with a the built-in indices.

from nodejs-firestore.

jeremyfrancis avatar jeremyfrancis commented on May 29, 2024 1

The link appears if you run adb logcat if you are running on Android, but not in the Chrome error console, which is where I think it should be. Where would an iOS developer see it?

I just did console.log(JSON.stringify(error)) and clicked the link in Chrome. Added for me right away.

from nodejs-firestore.

schmidt-sebastian avatar schmidt-sebastian commented on May 29, 2024

This has been forwarded to our backend team.

from nodejs-firestore.

cawfree avatar cawfree commented on May 29, 2024

I'm getting the same exception thrown when attempting to orderBy on equality-driven where conditions. I attempted to work around this problem by ensuring that the field I'm using to orderBy also has a manual index (desc) assigned to it, but this didn't seem to have any effect.

from nodejs-firestore.

agerson avatar agerson commented on May 29, 2024

The link appears if you run adb logcat if you are running on Android, but not in the Chrome error console, which is where I think it should be. Where would an iOS developer see it?

from nodejs-firestore.

schmidt-sebastian avatar schmidt-sebastian commented on May 29, 2024

On Android and on iOS, these errors are returned as part of the error argument on the callback that you pass. In Objective-C, for example, this looks like:

[query getDocumentsWithCompletion:^(FIRQuerySnapshot *documentSet, NSError *error) {
   // 'error' contains the link in its message
 }];

It looks like you need to turn on debug logging for these errors to show up on the Web. They should instead result in a failed Promise and we should be returning these errors in the err argument of this failed Promise. This is currently not the case and I will file an issue to fix this.

Note that this repository is about the NodeJS server client for Firestore, which does return the error in the failed Promise. The GitHub repository for the Web client is https://github.com/firebase/firebase-js-sdk

from nodejs-firestore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.