firebase / firebase/firebase-tools
Cannot deploy large Firestore rules file
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [REQUIRED] Environment info
**firebase-tools:** 11.24.1
**Platform:** Ubuntu Linux (GitHub Actions `ubuntu-latest`)
### [REQUIRED] Test case
Create a `firestore.rules` file that is very long.
In our case we generate a `firestore.rules` file with [Fireward](https://github.com/bijoutrouvaille/fireward) that is 4538 lines long. (We have translated some data types from Shopify to Fireward.) The local emulator can read and use this rules file and all our security rules test that run against the emulator pass so I am confident the syntax of the generated rules file is valid.
### [REQUIRED] Steps to reproduce
Deploy the new rules file with `firebase deploy`.
### [REQUIRED] Expected behavior
Deploy succeeds.
### [REQUIRED] Actual behavior
Deploy fails with:
```
HTTP Error: 409, Requested entity already exists
```
or sometimes
```
HTTP Error: 503, The service is currently unavailable.
```
### Further info
Deploying a 793-line `firestore.rules` file succeeds.
It seems to me this is another instance of https://github.com/firebase/firebase-tools/issues/2127
Contributor guide
Assessment
This issue has not been assessed yet.