firebase emulator initialization failure on database.rules

147 Views Asked by At

When I upgraded to Firebase 8.12.1, the local database emulator gets a Java/JavaScript error parsing the database rules. I trimmed the original rules down to the smallest thing that breaks. Here's what database-debug.log shows, including the JSON input. Bug or did Firebase change some syntax? JSONLint says the JSON itself is OK.

ERROR com.firebase.core.namespace.NamespaceActor - Unexpected error caught in NamespaceActor(...) for AdminEnvelope(SecurityClaims(Some(GCloudToken(owner,GCloudOwner,1602893571,None)),None),UpdateRules({
  "rules": {
    ".read": true,
    "tickets": {
      "$offering_id": {
        "tickets": {
            "blocks": {
              "$block_id": {
                ".validate": "newData.hasChildren(['timestamp', 'text']"
            }
          }
        }
      }
    }
  }
}
,false))
java.lang.ExceptionInInitializerError: null
    at org.mozilla.javascript.Context.getCurrentContext(Context.java:346)
0

There are 0 best solutions below