-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can write but not read data with firebase-document #18
Comments
Hi @giubil , thanks for reporting. I will try to reproduce. |
Heya, @giubil, I have not been able to reproduce this issue. Here is an example application where I have this working: http://jsbin.com/fuhuqolida/1/edit?html,output N.B. My firebase database rules also allow for reading but no writing. A shot in the blue is that you might be having issues with your application observing on the object but not the properties inside the object. e.g. you have the binding
instead of: or using the See this link for more info on object path observation. |
Hey @e111077 , thanks for your feedback. Unfortunatly even when listening on My rules in my firebase DB allow for read and write from anyone, logged or not. So I am pretty sure that's not coming from there either. Edit: to help you reproduce it, I just took the note-app tutorial files and added in this code :
[...]
|
I can reproduce this issue. Code: <firebase-document id="user" path="/users/[[ uid ]]" data="{{ data }}"></firebase-document> What seems to happen:
It strangely works if I don't use a binding in the I guess: The |
Heya, guys, I've tried implementing your suggestions to replicate the issues with zero luck. Would it be possible to provide a jsbin or some equivalent where this fails? The jsbin in my earlier post should provide the polygit / jsbin boilerplate for polymerfire / firebase. Thanks! |
Hey, This is weird, I can't reproduce it basing on your jsbin and my code. However the bug is still present in my code. If you want to reproduce it, just grab the note-app demo and add those lines to the note-app.html in the base code
My guess is, could it have some problem with the Also to be noted, I don't use If you still can't reproduce the bug, I would happily send you my code, or a link to the firebase hosted site for you to play with. Thanks |
@giubil in your example can you change that final return statement from to does that seem to resolve any issues? Additionally, I assume that you created a |
Heya, @mraerino, I see that you had a PR open as a potential fix, and I would love to take another look at it, but I am still unable to reproduce the initial issue and confirm the fix. Would it be possible for you to send me your code that causes this failure? |
Thanks for the reply ☺ Unfortunately I haven't been able to reproduce this error outside my app yet. I'm going to try it soon though. It seems to happen with multiple I closed my PR because it didn't quite do the right things. The bug has been hard to debug but seems to boil down to the function I'm running my app with some adjustments to this function (not those from the PR) and everything is fine. |
I do see that there is an issue with I'll look into the multiple |
I also pointed to this in #32 because I'm pretty sure most of my fixing had to do with that bug. In |
Reading from Firebase through There are still some issues where I can't write changes to Firebase because |
Please do! And thanks a lot for the cooperation |
Description
When using a computed binding for the path property in
firebase-document
, such aspath="{{createPath(user)}}"
, thedata
is empty, although I can write to it and it's updating in the firebase database.Expected outcome
firebase-document
fill thedata
property with the content of the database.Actual outcome
data
is empty.Live Demo
N.A.
Steps to reproduce
firebase-document
withpath
equal to a computed binding, such as{{createPath(user)}}
createPath: function(user) {return "/users/" + user.uid;}
data
but you can write to itBrowsers Affected
The text was updated successfully, but these errors were encountered: