firebase / firebase/firebase-tools

Firestore security rule emulator - get and getAfter throwing an exception on non existant doc

Open
#2,067 27 comments 18 reactions 0 assignees View on GitHub
internal-bug-filed type: bug
Dominant language
TypeScript
Stars
4.5k
Forks
1.3k
Avg merge
1d 12h
Merged PRs (30d)
84

Description

### [REQUIRED] Environment info

**firebase-tools:**7.16.1

**Platform:**Windows

### [REQUIRED] Test case

Just write a rule using a get or getAfter on a non existant doc.
For instance:
allow update: if get(/databases/$(database)/documents/doc/doesnot/exist) == null;

### [REQUIRED] Steps to reproduce

See above

### [REQUIRED] Expected behavior

As per the doc get and getAfter should return null. this is what the online simulator does.

### [REQUIRED] Actual behavior

An exception is thrown
Service call error. Function: [get], Argument: [path_value {
...}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.