You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start the emulator with gcloud emulators firestore start --host-port=127.0.0.1:10901 --database-mode=datastore-mode
Install the python deps: pip install google-cloud-datastore==2.19.0
Set the DATASTORE_EMULATOR_HOST and DATASTORE_PROJECT_ID env vars accordingly
Run the above python script
[REQUIRED] Expected behavior
Either "found!" or "not found!" is printed to console.
[REQUIRED] Actual behavior
An exception is raised:
Traceback (most recent call last):
File "XXX/dev/experiments/firestore-emulator/./test_firestore_in_datastore.py", line 153, in <module>
main()
File "XXX/dev/experiments/firestore-emulator/./test_firestore_in_datastore.py", line 146, in main
run_some_code()
File "XXX/dev/experiments/firestore-emulator/./test_firestore_in_datastore.py", line 106, in run_some_code
if len(list(res)) > 0:
^^^^^^^^^
File "XXX/.pyenv/versions/firestore-emulator/lib/python3.11/site-packages/google/api_core/page_iterator.py", line 208, in _items_iter
for page in self._page_iter(increment=False):
File "XXX/.pyenv/versions/firestore-emulator/lib/python3.11/site-packages/google/api_core/page_iterator.py", line 244, in _page_iter
page = self._next_page()
^^^^^^^^^^^^^^^^^
File "XXX/.pyenv/versions/firestore-emulator/lib/python3.11/site-packages/google/cloud/datastore/query.py", line 845, in _next_page
entity_pbs = self._process_query_results(response_pb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "XXX/.pyenv/versions/firestore-emulator/lib/python3.11/site-packages/google/cloud/datastore/query.py", line 766, in _process_query_results
raise ValueError("Unexpected value returned for `more_results`.")
ValueError: Unexpected value returned for `more_results`
Additional infos
For debugging purposes, I've inspected the returned response_pb and more_results is set to 0, equivalent to MORE_RESULTS_TYPE_UNSPECIFIED which, according to the spec, should never be provided.
The text was updated successfully, but these errors were encountered:
artoale
changed the title
[firestore-emulator] Query don't work in "datastore-mode"
[firestore-emulator] Queries don't work in "datastore-mode"
Feb 29, 2024
[REQUIRED] Environment info
firebase-tools: Using the gcloud cli version 465.0.0, firestore emulator: 1.19.1
Platform: macOS (intel)
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
gcloud emulators firestore start --host-port=127.0.0.1:10901 --database-mode=datastore-mode
pip install google-cloud-datastore==2.19.0
[REQUIRED] Expected behavior
Either "found!" or "not found!" is printed to console.
[REQUIRED] Actual behavior
An exception is raised:
Additional infos
For debugging purposes, I've inspected the returned
response_pb
andmore_results
is set to 0, equivalent toMORE_RESULTS_TYPE_UNSPECIFIED
which, according to the spec, should never be provided.The text was updated successfully, but these errors were encountered: