-
Notifications
You must be signed in to change notification settings - Fork 933
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
Firestore emulator v1.14.1 regression: Unknown error returned on transaction.GetAll with an empty list of refs #4473
Comments
@yuchenshi I think you aren;t the right person for this but probably know who is. Could you pass this along to the firestore team? |
I am also seeing similar regressions dealing with transactions. firebase-tools 10.4.2 / emulator v1.13.1 is the latest version I can use for now. FWIW here's one of the test runs where some tests fail due to "Transaction is invalid or closed." related errors:
Here's some firestore-debug.log outputs for a stacktrace one of those tests.
I ran into this earlier when firebase-tools 10.5.0 / emulator v1.14.1 was released and figured out it was probably more related to the emulator rather than firebase-tools. Emulator v1.14.1 had more transactional timeout related issues in my tests. |
This is probably enough for a separate report, but: I'm guessing the way the emulator communicated via grpc changed which caused some timings in promises to change. I fixed most of the tests, but there's still one that seems to have a weird race condition left related to terminating a '@google-cloud/firestore' Firestore instance after the tests end. It causes this relatively simple test to "sometimes" fail:
The following setup/teardown code is also executed before/after the test:
Here is the error that is popping up and sometimes causing the tests to fail:
However, this happens inconsistently. Sometimes the tests passes without this occurring, other times it fails.
Removing the teardown code helps the transaction test above, but other issues seem to pop up. These issues don't occur in It seems like there are promises internally that are resolving too early or resolving inconsistently, potentially as a result of transaction changes in the emulator. EDIT I ran across a random post somewhere saying you have to perform a read and a write for a transaction. In retrospect that makes sense. After updating those effected tests they pass properly now. dereekb/dbx-components@2d448c5 Ignore my post, unless you hand similar issues, in which case I'd tell you to double check that you're using transactions/write batches correctly. |
[REQUIRED] Environment info
firebase-tools:
firebase-tools 10.7.1 / emulator v1.14.3 fails
firebase-tools 10.5.0 / emulator v1.14.1 fails
firebase-tools 10.4.2 / emulator v1.13.1 passes
Platform:
Verified on both macOS and Debian Linux
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
Under firestore emulator v1.13.1 calling
GetAll
with an empty slice of refs returns anil
error and an empty list of documents, same behavior as the production firestore.[REQUIRED] Actual behavior
Under firestore emulator v1.14.1 and v1.14.3 (bundled with the latest firebase-tools release) we now get an Unknown RPC error code:
With full debug info:
The text was updated successfully, but these errors were encountered: