question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Firestore] Cannot read property 'DEADLINE_EXCEEDED' of undefined while processing firestore query

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
kiptoommcommented, Sep 2, 2020

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

0reactions
ad34commented, May 19, 2020

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found