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.

Error evaluating 'query._query.canonicalId' when using useFirestoreCollectionData

See original GitHub issue

Version info

React: 16.13.0

Firebase: 7.10.0

ReactFire: 2.0.1

Other (e.g. Node, browser, operating system) (if applicable):

Test case

The sample in the reactfire codebase seems to throw this exception without any changes.

Steps to reproduce

Run the sample app included in this codebase.

Expected behavior

No crash

Actual behavior

TypeError: undefined is not an object (evaluating 'query._query.canonicalId')

getHashFromFirestoreQuery
node_modules/reactfire/firestore/index.js:33
  30 |     return useObservable(fromCollectionRef(query), queryId, checkStartWithValue(options));
  31 | }
  32 | function getHashFromFirestoreQuery(query) {
> 33 |     return query._query.canonicalId();
  34 | }
  35 | export function useFirestoreCollectionData(query, options) {
  36 |     var idField = checkIdField(options);

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
jamesdanielscommented, Mar 11, 2020

Fixed in 2.0.2

1reaction
jamesdanielscommented, Mar 11, 2020

After further discussions we found a solution that does not rely on a private API. We’ll have a fix out shortly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Possible Unhandled Promise Rejection when creating a feed ...
In my case, before the error line, just put console.log(snapshot); After that, I inspect the element and found out my query is My...
Read more >
Securely query data | Firestore - Firebase - Google
The following ruleset demonstrates how to write security rules that evaluate constraints placed on queries. This example expands the previous stories ruleset ...
Read more >
Getting data | Firestore - Google Cloud
Use a collection group query to retrieve results from a collection group instead of from a single collection. List subcollections of a document....
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