React-redux-firebase: bug(firestore): No results with React Native, firestoreConnect(), and orderBy

Created on 17 Jul 2019  路  7Comments  路  Source: prescottprue/react-redux-firebase

Do you want to request a feature or report a bug?

Report a bug.

What is the current behavior?

When I do not use orderBy everything is peachy. When I use orderBy it sometimes pulls the data, it sometimes does not. There is never an error in the React Native Debugger console. When it does work it does not update (reflect changes in Firestore data, deletes of documents, adds of documents, etc). Again with no error.

This does not appear to be an issue with the indexes. I have not created or modified the automatic indexes in any way.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox or similar.

https://codesandbox.io/s/damp-cloud-epyi7

What is the expected behavior?

That the data updates in real-time, sorted by orderBy.

Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?

"react-native": "0.59.5",
"react-native-firebase": "5.5.5",
"react-redux": "4.4.10",
"react-redux-firebase": "2.3.0",
"redux-firestore": "0.8.0",

This is my first attempt at creating such a thing so I do not know if or when this broke.

bug react-native

All 7 comments

I'm not sure if it's a problem with firebase-native only or not. I've created a new repro which works fine for me so far.

https://codesandbox.io/s/react-redux-firebase-issues729-2ly3z

I've created a new repro which works fine for me so far.

Keep playing with it to be sure. I have had whole hours where it works fine. Rarely that long, however.

That would be hard to diagnose if problem occurs randomly after long period of usage. I don't have an ability to create react-native app right now. Could you port my repro to native and test it again? And maybe fork my repro, plug in your project id and test?

I would love to except I also have limited ability right now. Really, I wish I could.

It is not an issue that occurs after a long period but the opposite. It is _well_ over half the time it simply does not function as intended.

I am just going to move forward without orderBy for now since the Firestore portions would be easy to rip out if the need arises. I will miss the automatic mounting/unmounting but whatever and can wrap this myself. I suppose just close the issue so it is not cluttering up the UI and I can always reopen it later if needed.

Thank you for your help! I would very much like to revisit this when it is feasible.

@nickwebha Something else that might be worth trying is adding storeAs to your query to see if that impacts things at all.

As you suggested, I'll close for now, and we can reopen later. Thanks for reporting!

I have the same issue with web (not native)

@Aparus Are you sure that have your indexs set to match the query? If you are still not seeing results please open a new issue with a codesandbox or similar where the issue can be reproduced. Thanks for reporting!

Was this page helpful?
0 / 5 - 0 ratings