I'm trying to deploy some firestore security rules, they seem to be working fine on my local emulator, at least the get() functions and all (need more testing but test cases at least passed).
Thing is that the Location in the PLAYGROUND (which is grayed out) is: /databases/null/documents. I can't quite remember but two weeks ago when I got started with it I could use get() functions and I think the location used to be /databases/(default)/documents. Also, resource always results null, like it's pointing to the wrong database location, an empty non-existent one.
I made the rules very tiny to troubleshoot, hence the error I'm getting is: Error running simulation — The path "/databases/null/documents/users/LPS539UITvNF7V6KjGVLEGlbQf93" is improperly formatted. Paths should start with "/databases/$(database)/documents/"
Already tried:
- Tried another rule and checked the resource, it's always null.
- Already made sure I'm trying to get the right doc, auth also exists, so this is not the cause.
- Made the rules as minimal as possible to troubleshoot.
- Contacted firebase support, told me it was an unusual problem, that I should wipe my entire database and see if it persists (not possible, app in production with clients using it)
- Found this guy (first one I find all over internet with null in location too) Firestore Security Rules: Error running simulation –An unknown error occurred with I think the same problem (resource = null)
- Created another firebase project and start the firestore database, same null at Location.
- Checked another firebase project that I haven't touched in over a year, same null at Location.
