I\'m following a Polymer + Firebase tutorial video using the Polymer App Tool Kit (initiated with the polymer CLI).
When I try to push data to a Firebase collection,
First, I recommend comparing your code to the Polycast #58 source in GitHub, which might reveal the problem more clearly to you.
this.$.query.ref () refers to the ref property of Polymer.FirebaseDatabaseBehavior, which is computed with:
__computeRef: function(db, path) {
if (db == null ||
path == null ||
!this.__pathReady(path) ||
this.disabled) {
return null;
}
return db.ref(path);
},
Note that db.ref(path) never returns null, so ref being null must be a result of the if statement. Evaluating each condition might uncover the issue:
db == null
app.database() (never returns null), or is set to null when app is not defined (by ). Have you declared with the proper app-name before importing the element that uses ?path == null
!this.__pathReady(path)
/users/[[user.uid]]/models), it's possible that user is not yet defined (user is not yet logged in), which results in an empty string in that path component (/users//models).this.disabled