firebase-tools
firebase-tools copied to clipboard
Emulated Firestore REST API not working with cloud-firestore-emulator-v1.19.1.jar...
[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
- firebase init with emulator and firestore added.
- firebase.json as follows
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"emulators": {
"firestore": {
"port": 8080
},
"ui": {
"enabled": false
},
"singleProjectMode": true
}
}
- run
firebase emulators:start
- 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"}}
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.