firebase - 获取 W/NetworkRequest:使用 Firebase 存储时发送网络请求 POST 时出错
问题描述
问题是什么时候
I try to upload an image to firebase storage sometimes it successfully uploads the image but most of the time it keep saying
*****/com.example.firebasestoragedemo W/NetworkRequest: error sending network request POST https://firebasestorage.googleapis.com/*myproject_name/some_more_extension.
when I enter to this link I found
{
"error": {
"code": 403,
"message": "Permission denied. Could not perform this operation"
}
}
but I have enabled signInWithEmailAndPassword in my onStart(){...} function and my security rule is here
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow read, write : if request.auth != null;
}
}
}*****
我得到这两个例外..
java.net.ConnectException:无法连接到 firebasestorage.googleapis.com/....
我的代码确实是最新的,否则有时无法正常工作。我认为问题可能出在 Firebase 的其他地方。
请帮帮我。如果您尝试提供帮助,将非常高兴。谢谢
解决方案
当我尝试通过移动数据访问“Firebase Storage”时遇到同样的问题。(来自孟加拉国)。然后我通过宽带互联网连接进行了尝试,一切正常。
推荐阅读
- c# - 返回对列表元素的引用以便能够为其赋值
- electron - (如何)我可以在 Microsoft Teams 桌面客户端中打开开发工具吗?
- scala - 谁能解释这段代码片段中 @ _* 的含义?
- java - Java中的回历日期选择器
- sml - 自然数上的通用序列
- ruby-on-rails - ActionController::InvalidAuthenticityToken in PostsController#create
- vue.js - Vuejs:根据窗口中的剩余空间自动调整div
- c# - For循环等待直到其他任务完成
- c++ - MFC的OnInit()函数中的return true和return false有什么区别
- ios - -canOpenURL:URL 失败:“file:///var/containers/Bundle/Application/{path}” - 错误:“操作