title: Firebase Storage Permission unknown error with React Native Image Upload
body: <p>Actual demo video: <a href="https://www.youtube.com/watch?v=bYGi71am_tU" rel="nofollow noreferrer">https://www.youtube.com/watch?v=bYGi71am_tU</a></p>
  
  <p>Firebase Storage RULES:</p>
  
  <pre><code>service firebase.storage {
    match /b/{bucket}/o {
      match /{allPaths=**} {
        allow write: if request.resource.size &lt; 5 * 1024 * 1024
                     &amp;&amp; request.resource.contentType.matches('image/.*');
      }
    }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/18ECx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/18ECx.png" alt="enter image description here"></a></p>
  
  <p>My blob image:</p>
  
  <pre><code>Blob {
     "_data": Object {
       "blobId": "c526586a-0481-48ce-a77b-cc589052a443",
       "lastModified": 0,
       "name": "bbf91dba-8597-43d9-82b7-7a81887c3e5c.jpg",
       "offset": 0,
       "size": 32653,
       "type": "image/jpeg",
     },
  }
  </code></pre>
  
  <p>Firebase Storage error :</p>
  
  <pre><code>FirebaseStorageError {
     "code_": "storage/unknown",
     "column": 31,
     "line": 17422,
     "message_": "Firebase Storage: An unknown error occurred, please check the error payload for server response.",
     "name_": "FirebaseError",
     "serverResponse_": "{
     \"error\": {
       \"code\": 400,
       \"message\": \"Permission denied. Could not access bucket crna-app-01.appspot.com. Please enable Firebase Storage for your bucket by visiting the Storage tab in the Firebase Console and ensure that you have sufficient permission to properly provision resources.\"
     }
   }",
     "sourceURL": "http://10.1.0.6:19001/node_modules/expo/AppEntry.bundle?platform=android&amp;dev=true&amp;minify=false&amp;hot=false&amp;assetPlugin=%2FUsers%2Fajinkyaborade%2Fprojects%2Fnative-apps%2Fmy-react-redux%2Fnode_modules%2Fexpo%2Ftools%2FhashAssetFiles",
   }
  </code></pre>
  
  <p>And this is the actual function from my Expo RN app file</p>
  
  <pre><code>async function uploadImageAsync(uri, uid, firebase) {
  
    const response = await fetch(uri);
  
    const blob = await response.blob();
  
    const ref = firebase
      .storage()
      .ref('users/' + uid)
      .child(uuid.v4());
  
    const snapshot = await ref.put(blob); // actual Firebase error comes here
    return snapshot.downloadURL;
  }
  </code></pre>
  
  <p>Any help is much appreciated :) </p>