useFirestoreCollection crash straight away on usage
See original GitHub issueVersion info
React: 0.0.0-experimental-ea6ed3dbb
Firebase: 7.9
ReactFire: v2.0.0-rc.1
Other (e.g. Node, browser, operating system) (if applicable): Node 10.15.1
Test case
I want to load and then listen to changes to a collection in Firestore.
import React from 'react';
import { useFirestore, useFirestoreCollection } from 'reactfire';
function SimpleTest() {
const firestore = useFirestore;
const ref = firestore().collection('productionTemplates');
const productionTemplates = useFirestoreCollection(ref);
return <h1>Hello World</h1>;
}
Steps to reproduce
Add code above to any project
Expected behavior
Expect to get a list from my selected collection back (no output in code above, but console logging it to inspect. Doesnt matter since it crashes)
Actual behavior
Crash, pointing to missing canonicalId() on undefined. Reactfire seems to expect _query to exist on the firestore query object, but it does not on inspection. In my environment it did have an object called “EP” that had the canonicalId function on it, tried to rebuild the npm package, switching from _query to EP and it loaded without error now.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:14 (1 by maintainers)
Top Results From Across the Web
Crash due to low free RAM availabl… | Apple Developer Forums
In our app, we use AWS s3 services to upload videos. I found out that while performing this action of upload, some of...
Read more >How to use the reactfire.useFirestoreCollection function in ...
To help you get started, we've selected a few reactfire.useFirestoreCollection examples, based on popular ways it is used in public projects.
Read more >Crashlytics troubleshooting and FAQ - Firebase
This page provides troubleshooting help and answers to frequently-asked questions about using Crashlytics. If you can't find what you're looking for or need ......
Read more >ReactFire - BestofReactjs
Convenient components for common use cases - Only want to render a component if a user is signed in? ... useFirestoreCollection crash straight...
Read more >App crashing right away after deploy from Github Actions
As Bertrand said, there was something wrong with the mongodb connection, so I just found that the variable MONGODB_URL was not set, ...
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 FreeTop 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
Top GitHub Comments
Looks like this was fixed in 7.9.1
StackBlitz that shows it working now: https://stackblitz.com/fork/reactfire-issue-216
Cool, thanks for confirming. I’m going to close this - if someone else runs into a similar error on 2.0.2+, please open a new issue.