-
Notifications
You must be signed in to change notification settings - Fork 893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught Error in snapshot listener: {"code":"failed-precondition","name":"FirebaseError"} #6613
Comments
Im getting the same error after deleting my |
@IvoBiaus, can you update your emulator and let me know if that helps you? A security update was released in 3.5.0 which changed how the SDK authenticates to the back end. This is likely the source of your issue. @MubashirWaheed, your issue looks different, but it would be worth updating the emulator if you are seeing this issue when using the emulator and also on Firestore 3.5.0 / Firebase 9.10.0. Just a thought, do you get any additional error info in the network trace of the browser console? |
@MarkDuckworth I updated the firebase in my react project to |
@MubashirWaheed, thanks for checking on that. I was getting the same error and then I configured this index
Putting the fields indexed in a different order did not work for me. |
@MarkDuckworth so do you think it's a firebase sdk bug? |
Looks like there is an issue when it is not logging a link to create the index. I will confirm with the team. Did you get your index to work? |
A manually created composite index is also not working for me |
Execute |
On 9.9.4 and 9.10 I'm not getting the link. Had to rollback to 9.8.4 to get it again. Quite a showstopper this. |
Just for the record, I didn't try 9.9.0 - 9.9.3, so can't confirm if they give the link or not. |
Thanks for the continued updates. We're looking to get this fixed. In the meantime if this is affecting you pass your query to |
Sorry for the delayed response but I have the indexes working. As you suggested I used |
I'm having exactly the same issue. on React-Native Expo. I think it has nothing to do with Expo or react. Its mostly based on Firestore indexing ! When I removed the orderBy it started working. If I remove the where() it also works. But together ! They dont work !.
This shows an Error {"code":"failed-precondition","name":"FirebaseError"} But remove either the 'where( ... )' or the 'orderBy(...)' then there is no error. ! I hope someone solve this, I need to move on with my code and live without indexing by date ..untill I figure it out tomorrow. |
|
Hi @MubashirWaheed. An error handler should be able to help with this problem: https://firebase.google.com/docs/firestore/query-data/listen#handle_listen_errors Could you please try this code and see if we can get the expected error message with a link to generate the index. Once the composite index is generated, the error should go away.
Meanwhile, we will be keep looking into default error handling to improve customer experience. |
FIY, the bug fix has been merged, and will be included in the next release. |
The bug fix was released in 9.14.0 released November 10, 2022: https://firebase.google.com/support/release-notes/js#version_9140_-_november_10_2022 |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Steps to reproduce:
I am not getting the link to add an index for the compound queries in my console. and instead, I am getting this error in the console
[2022-09-18T05:53:50.590Z] @firebase/firestore: Firestore (9.9.4): Uncaught Error in snapshot listener: {"code":"failed-precondition","name":"FirebaseError"}
After going through stackoverfollow I manually created the composite indexes in the firebase console under the firestore> indexes.
for both indexes
posts
collection
enabled
When I remove the orderBy there is no error.
Relevant Code:
following
is an array with string values and theindex
field has number as its valueps: I am using react.
The text was updated successfully, but these errors were encountered: