Skip to content

Emulated Firestore REST API not working with cloud-firestore-emulator-v1.19.1.jar... #6812

Closed

Description

@sarge1989

[REQUIRED] Environment info

firebase-tools: 13.3.1

Platform: all

[REQUIRED] Test case

Any type of query made via the firestore REST API

[REQUIRED] Steps to reproduce

  1. firebase init with emulator and firestore added.
  2. firebase.json as follows
  "firestore": {
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
  },
  "emulators": {
    "firestore": {
      "port": 8080
    },
    "ui": {
      "enabled": false
    },
    "singleProjectMode": true
  }
}
  1. run firebase emulators:start
  2. curl the following. Replace YOUR_PROJECT_NAME accordingly
curl --location 'http://localhost:8080/v1/projects/{{YOUR_PROJECT_NAME}}/databases/(default)/documents:runQuery' \
--header 'Authorization: Bearer owner' \
--header 'Content-Type: application/json' \
--data '{
    "structuredQuery": {
        "from": [{
            "collectionId": "anything",
            "allDescendants": true
        }],
        "where": {
            "fieldFilter": {
                "field": {
                    "fieldPath": "text"
                },
                "op": "EQUAL",
                "value": {
                    "stringValue": "hello world"
                }
            }
        }
    }
}'

[REQUIRED] Expected behavior

Should return something like

[
    {
        "readTime": "2024-02-24T08:09:46.192391Z",
        "done": true
    }
]

[REQUIRED] Actual behavior

Returns

{"error":{"code":500,"message":"Internal","status":"INTERNAL"}}

Activity

  1. joehan commented on Feb 27, 2024

    @joehan
    Member

    Just a quick update here, our team is currently investigating the cause of this issue. For now, I can only recommend downgrading to firebase-tools v13.3.0 as a workaround. Apologies for the inconvenience this may have caused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions