Saving database rules creates a new database on the emulator and applies the rules to it
See original GitHub issue[REQUIRED] Environment info
firebase-tools: 8.4.2
Platform: Windows
[REQUIRED] Test case
https://github.com/filipesilva/firebase-rtdb-loglevel
[REQUIRED] Steps to reproduce
git clone https://github.com/filipesilva/firebase-rtdb-loglevel
cd firebase-rtdb-loglevel
npm i
npm run emulators
- open http://localhost:4000/database, see the
emulator-test-1
database - save
database.rules.json
once - in the emulator logs in the console, see the following lines:
i database: Change detected, updating rules for undefined...
+ database: Rules updated.
- open http://localhost:4000/database, see the
undefined
database
[REQUIRED] Expected behavior
The rules should be applied to emulator-test-1
and no new database should be created.
[REQUIRED] Actual behavior
The rules are applied to a new database named undefined
.
You can also change the code in public/index.html
if you want to verify if the rules are applied to the correct database, but I was using the same reproduction for both this and https://github.com/firebase/firebase-js-sdk/issues/3211 and since this repro doesn’t actually need to run any database code, I left it as is.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Understand Firebase Realtime Database Security Rules
The Firebase Realtime Database is schemaless. This makes it easy to change things as you develop, but once your app is ready to...
Read more >Save data using SQLite - Android Developers
val db = dbHelper.writableDatabase // Create a new map of values, where column names are the keys val values = ContentValues().apply {
Read more >Realtime database emulator ignores database.rules.json
i database: Change detected, updating rules for undefined... Apparently, doing this causes the emulator to create a new database called ...
Read more >Unit testing security rules with the Firebase Emulator Suite
And there's no better subject to unit test than security rules, the main line of defense between your database and all of those ......
Read more >Create Azure Cosmos DB resources from the Azure portal
Container IDs have the same character requirements as database names. Partition key, /category, The sample described in this article uses / ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@karlmarxlopez no this will be included in the next release.
@filipesilva thanks for the super-clear reproduction! I am working on this now.