2017-12-15 15 views
0

Firebase Storageから画像を取り込む際に問題が発生しました。Firebase:ユーザーにこのオブジェクトへのアクセス権がありません

com.google.firebase.storage.StorageException:ユーザーにはこのオブジェクトにアクセスする権限がありません。

firebaseの権限を次のものに変更し、いずれも機能していません。

1.

service firebase.storage { 
    match /b/wics-application.appspot.com/o { 
    match /public/{allPaths=**} { 
     allow read, write: if request.auth == null; 
    } 
    match /user/{allPaths=**} { 
     allow read, write: if request.auth == null; 
    } 
    match /auth/{allPaths=**} { 
     allow read, write: if request.auth == null; 
    } 
    } 
} 

2.

service firebase.storage { 
    match /b/wics-application.appspot.com/o { 
    match /{allPaths=**} { 
     allow read, write; 
    } 
    } 
} 

私はこのメッセージを取得することができ、他の理由がありますか?

+1

は、ユーザ認証されていないかは、あなたのストレージを呼びますか?関連するコードを表示しますか? –

答えて

0

FirebaseUserのインスタンスを作成しましたか?

mAuth = FirebaseAuth.getInstance(); 
mUser = mAuth.getCurrentUser(); 

のonCreate更に上のonCreate

FirebaseAuth mAuth; 
FirebaseUser mUser; 

その後

関連する問題