【问题标题】:Polymerfire: No default bucket foundPolymerfire:未找到默认存储桶
【发布时间】:2016-10-24 15:59:45
【问题描述】:

我正在尝试将数据上传到我的应用的存储桶,但 var uploadRef = firebase.storage().ref(); 行导致以下错误:

Firebase Storage: No default bucket found. Did you set the 'storageBucket' property when initializing the app?

但是(我认为)我已经通过将聚合物 <firebase-app> 元素放在 index.html 的正文中来初始化应用程序,如下所示:

  <firebase-app
      api-key="<my-api-key>"
      auth-domain="<my-auth-domain>"
      database-url="<my-database-url>"
      storageBucket="<my-storageBucket-url>">
  </firebase-app>

我也在网上尝试了一些解决方案并检查了:

  • 我的 App Engine API 已启用
  • 我已启用 App Engine 应用
  • firebase-storage@system.gserviceaccount.com 是存储分区的所有者

到目前为止,我真的不知道还有什么可以尝试的,希望您能提供任何帮助!

【问题讨论】:

    标签: javascript firebase polymer


    【解决方案1】:

    原来 Google web-starter-kit 提供的 polymerfire-version 不是最新的。当我发现我已经使用了firebase主页上提供的firebase初始化sn-p,因此不再需要该元素。 现在一切正常。

    【讨论】:

    • 你把初始化sn-p放在哪里了?在正文中还是在 app.js 中?
    猜你喜欢
    • 2017-09-15
    • 2021-08-25
    • 2021-04-06
    • 1970-01-01
    • 1970-01-01
    • 2020-07-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多