title: How to limit get access for owners only in firebase storage?
body: <p>I'm testing new Firebase Storage local Emulator. For my rules, it gives me the following error:</p>
  <blockquote>
  <p>com.google.firebase.rules.runtime.common.EvaluationException: Error: {path/to/my/file/storage.rules} line [5], column [21]. Null value error.</p>
  </blockquote>
  <p>The rules:</p>
  <pre><code>rules_version = '2';
  service firebase.storage {
    match /b/{bucket}/o {
      match /item/{id}/file.txt {
        allow get: if request.auth.uid != null &amp;&amp; request.auth.uid == resource.metadata.owner; // Error line 5
        allow delete: if request.auth.uid != null &amp;&amp; request.auth.uid == resource.metadata.owner;
        // Only allow uploads of any image file that's less than 100MB
        allow write: if request.auth.uid != null &amp;&amp; request.auth.uid == request.resource.metadata.owner
          &amp;&amp; request.resource.size &lt; 100 * 1024 * 1024;
      }
    }
  }
  </code></pre>
  <p>It seems like the rules for GET are invalid. Maybe it's because of the resource.metadata.owner that doesn't exist? If it's true, then how can I limit the access for owners of the file only?</p>