title: Firebase Storage - User does not have permission
body: <p>I have added a portion of my app which the user can upload a profile image but for some reason i get a firebase error saying i/user doesnt have permission even though the rules show it is accessible for all to read and write  given the auth is not null. I want users that have logged in to be allowed to read/write.</p>
  
  <p><strong>My firebase storage rules</strong></p>
  
  <pre><code>service firebase.storage {
    match /b/{bucket}/o {
      match /{allPaths=**} {
        allow read, write: if request.auth != null;
      }
    }
  }
  </code></pre>
  
  <p><strong>stacktrace:</strong></p>
  
  <pre><code>03-21 11:46:26.851 13033-13033/com.dogboy60.photoblog E/StorageException: The server has terminated the upload session
                                                                        java.io.IOException: The server has terminated the upload session
                                                                            at com.google.firebase.storage.UploadTask.zzLb(Unknown Source:21)
                                                                            at com.google.firebase.storage.UploadTask.zzLa(Unknown Source:58)
                                                                            at com.google.firebase.storage.UploadTask.run(Unknown Source:259)
                                                                            at com.google.firebase.storage.zzr.run(Unknown Source:2)
                                                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
                                                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
                                                                            at java.lang.Thread.run(Thread.java:764)
  </code></pre>
  
  <p>03-21 11:46:26.865 13033-13033/com.dogboy60.photoblog E/Error here:: com.google.firebase.storage.StorageException: User does not have permission to access this object.</p>