Error accessing Storage Firebase in Android Studio App

0

I have a problem while trying to set an image of storage in ImageView of Android Studio, this error in logcat appears:

  

User does not have permission to access this object.        Code: -13021 HttpResult: 403       {"error": {"code": 403, "message": "Permission denied. Could not perform this operation"}}       java.io.IOException: {"error": {"code": 403, "message": "Permission denied. Could not perform this operation"}}

The rules are released for everyone:

service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write: if request.auth == null;
    }
  }
}
    
asked by anonymous 10.10.2018 / 21:46

2 answers

0

I left the rule released for everyone service firebase.storage {    match / b / {bucket} / o {      match / {allPaths = **} {       allow read, write: if request.auth == null;     }   }  }

    
10.10.2018 / 21:55
0

Take a look at the rules, you can set whether the user must be logged in to access:

or configure public access:

// Anyone can read or write to the bucket, even non-users of your app.
// Because it is shared with Google App Engine, this will also make
// files uploaded via GAE public.
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write;
    }
  }
}
    
10.10.2018 / 21:52