Comments (6)
@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.
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.
This has been forwarded to our backend team.
from nodejs-firestore.
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.
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.
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)
- Query class: can order by FieldPath.documentId() failed HOT 1
- Aggregation queries: "after each" hook for "no filter, explicit orderBy, document reference cursor" failed
- count queries: "after each" hook for "counts 1 document" failed
- Improve read performance by using stale reads HOT 8
- Setting Firestore databaseId HOT 2
- Client initialization: succeeds for DocumentReference.set() failed HOT 1
- count queries using aggregate api: "after each" hook for "counts with startAt, endAt and offset with DocumentReference cursor" failed
- count queries using aggregate api: "after each" hook for "counts multiple documents with filter" failed
- Aggregation queries: "after each" hook for "performs sum that is negative" failed
- Using document set function, got Error: 5 NOT_FOUND HOT 1
- Improve network latency of `runTransaction()` routine HOT 4
- Aggregation queries: "after each" hook for "performs sum only on numeric fields" failed
- FieldPath only escapes the first `\` and '`', resulting in INVALID_ARGUMENT response HOT 1
- [Firestore] `where` should use a "type safe" approach HOT 1
- Query class: can query by FieldPath.documentId() failed HOT 1
- Firestore Timestamp toMills() not working HOT 1
- Improve TS HOT 1
- When support for range and inequality filters on multiple fields in a single query and support for query explain will be added to the library? HOT 1
- Deprecation warning for servicePath can't be resolved in TypeScript. HOT 1
- Client initialization: succeeds for CollectionReference.get() failed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodejs-firestore.