title: Firestore error limit_to_first, can't read firestore values
body: <p>I am trying to fetch the data from firestore, though it was working before but now it is stopped working and I am keep getting this error -</p>
  <blockquote>
  <p>[Firestore]: Listen for Query(target=Query(users/default/critical/home order by <strong>name</strong>);limitType=LIMIT_TO_FIRST) failed: Status{code=PERMISSION_DENIED, description=Missing or insufficient permissions., cause=null}</p>
  </blockquote>
  <p>And my database Rules are defined like this -</p>
  <pre><code>rules_version = '2';
  service cloud.firestore {
  match /databases/{database}/documents {
                  /*-----tile menus----------*/
          match /users/defaultmenuItems/{document=**} {
            allow read: if isOwner(userId); 
            allow write: if false;
          }
  
          match /users/{userId}/{document=**} {
            allow read,write,update: if isOwner(userId); 
          } 
  
          function isOwner(userId) {
            return request.auth.uid == userId;
          }
      } 
  }
  </code></pre>
  <p>Code performing the query in Android</p>
  <pre><code>public void readMenu(final String collection, final String path, final DataRead dataStatus) {
          firebaseFirestore.collection(collection)
                  .document(userId + path)
                  .get()
                  .addOnCompleteListener(new OnCompleteListener&lt;DocumentSnapshot&gt;() {
                      @Override
                      public void onComplete(@NonNull Task&lt;DocumentSnapshot&gt; task) {
                          if (task.isSuccessful()) {
                              DocumentSnapshot documentSnapshot = task.getResult();
                              if (documentSnapshot.exists()) {
                                  dataStatus.DataIsRead(documentSnapshot);
                              } else {
                                  getDeafaultItems(collection, path);
                              }
                          } else {
                              Log.d(TAG, &quot;Sorry ....&quot;);
                          }
                      }
                  });
      }
  
  private void getDeafaultItems(final String collection, final String path) {
          Log.d(&quot;MY_PATH&quot;,collection + &quot;/defaultmenuItems&quot;+path);
          firebaseFirestore.collection(collection)
                  .document(&quot;defaultmenuItems&quot; + path)
                  .get()
                  .addOnSuccessListener(new OnSuccessListener&lt;DocumentSnapshot&gt;() {
                      @Override
                      public void onSuccess(DocumentSnapshot documentSnapshot) {
                          if (documentSnapshot.exists()) {
                              copyFromDefaults(collection, documentSnapshot, path);
                          }
                      }
                  });
      }
  </code></pre>
  <p>And Query is like this -</p>
  <pre><code>users/defaultmenuItems/critical/home  
  </code></pre>
  <p>There was a mistake with <strong>default</strong> query which I have fixed with correct path as above. But the problem is still there.</p>