[Firestore] Cannot read property 'DEADLINE_EXCEEDED' of undefined while processing firestore query
See original GitHub issueDescribe your environment
- Operating System version: mac os mojave 10.14.6 (18G3020)
- Firebase SDK version: 8.11.0
- Firebase Product: Firestore
- Node.js version: v12.16.2
- NPM version: 6.14.4
[REQUIRED] Step 3: Describe the problem
While executing a query from server side, I get this error in the catch TypeError: Cannot read property ‘DEADLINE_EXCEEDED’ of undefined\n at /…/server/node_modules/@google-cloud/firestore/build/src/util.js:125:99\n at Array.map (<anonymous>)\n at Object.isPermanentRpcError (/…/server/node_modules/@google-cloud/firestore/build/src/util.js:125:63)\n at Firestore._retry (/…/server/node_modules/@google-cloud/firestore/build/src/index.js:828:28)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (internal/process/task_queues.js:97:5)
Relevant Code:
const r = firestore.collection('acollection');
r
.where('somefield', '=', somevalue)
.where('timestampfield', '>=', unixformattimestamp)
.get().catch()
my timestamp format is maybe incorrect, but the error reported is not appropriate I cannot reproduce the issue is I remove the second where condition
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Firestore VueJS: Cannot read properties of undefined ...
My objective is to create this document from a call of my browser extension (code on the left part), but I only succeed...
Read more >Get data with Cloud Firestore - Firebase
There are three ways to retrieve data stored in Cloud Firestore. Any of these methods can be used with documents, collections of documents,...
Read more >Querying and filtering data | Firestore - Google Cloud
A field exists when it's set to any value, including an empty string ( "" ), null , and NaN (not a number)....
Read more >cannot read properties of undefined (reading 'snapshot')
I'm new in Firebase(Javascript). I am trying to use Firebase Auth, and to get(users) data from Firebase Database. I want to keep login...
Read more >firebase/firestore
Since query results contain only existing documents, the exists property will always be true and data() will never return 'undefined'. QuerySnapshot, A ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I saw this error while trying to run the firebase emulator to test functions. Turns out I had used a mix of yarn and npm to install dependencies. Cleaning out
node_modules
, removing lock files, and then re-installing with only either yarn or npm helped@schmidt-sebastian thanks, you are right, forcing the dependency to 1.13 like this solved the issue
“resolutions”: { “**/google-gax”: “1.13.0” }
the message is clear now :
9 FAILED_PRECONDITION: The query requires an index. You can create it here: https://console.firebase.google.com/v1/r/project/xxxxx/firestore/indexes?create_comp