LoginSignup
2
2

More than 1 year has passed since last update.

[firebase_storage/unknown] An unknown error occurred, please check the server response. の時に確認すること

Posted at

はじめに

FlutterでCloud Storageに画像を保存しようとしたら、👇のようなエラーが。。。
スクリーンショット 2022-03-29 23.15.19.png

初めてCloud Storageを使うのだが、、ソースコードの問題ではなさそう:expressionless:
「please check the server response」と言うけど、responseをどうやって確認するねん・・・と言う状態です。。。

、、、どうしたらいいのやら???

と思ったが、意外と簡単に解決しました!

ルールの問題だった

スクリーンショット 2022-03-29 23.19.26.png

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write: if true;
    }
  }
}

このようにすれば解決しました。
認証がなくても、誰でも読み書きができるようにしました。

参考

2
2
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2