Raspel Raspel - 1 month ago 25
Javascript Question

Polymerfire: No default bucket found

I'm trying to upload data to the storage Bucket of my app but the line

var uploadRef = firebase.storage().ref();
causes the following error:

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


However (I think) I already initialized the app by placing the polymer
<firebase-app>
element in the body of my index.html like so:

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


I also tried some solutions on the web and have checked:


  • that my App Engine APIs are enabled

  • that I have the App Engine app enabled

  • that firebase-storage@system.gserviceaccount.com is an owner on the storage bucket



By now i don't really know what else to try and would appreciate any help you can offer!

Answer

Turns out the polymerfire-version provided by the Google web-starter-kit was not the latest one. By the time I found that out I already used the firebase initialization snippet provided on the firebase homepage and therefore don't need the element anymore. Now everything works fine.

Comments