Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Possible error in tutorial? (more likely me...) #8

Open
delanthear opened this issue Apr 20, 2017 · 6 comments
Open

Possible error in tutorial? (more likely me...) #8

delanthear opened this issue Apr 20, 2017 · 6 comments

Comments

@delanthear
Copy link

delanthear commented Apr 20, 2017

Running the tutorial and getting to this stage:
https://codelabs.developers.google.com/codelabs/polymer-firebase-pwa/index.html?index=..%2F..%2Findex#24

where you check to see you are saving data. I'm getting nothing, apart from this error in the console:

na-behavior.html:80 Uncaught TypeError: this.$.document.save is not a function
at HTMLElement.save (na-behavior.html:80)
at HTMLElement.commitChange (na-behavior.html:59)
at HTMLElement.handler (polymer.html:507)
at HTMLElement.fire (polymer.html:1284)
at HTMLElement.close (na-editor.html:139)
at HTMLElement.save (na-editor.html:126)
at HTMLElement.handler (polymer.html:507)
at HTMLElement.fire (polymer.html:1284)
at Object.fire (polymer.html:856)
at Object.forward (polymer.html:1153)

I dipped into the code in na-behaviour but couldn't see anything odd. Looking at the database in firebase just shows me the root element (?) which matches the project id.

I'm stuck! I've repeated the tutorial twice and had the same problem. If I copy the completed note-app.html file from here (after correcting the paths) I get the exact same issue. Misconfiguration in firebase?

@delanthear
Copy link
Author

delanthear commented Apr 21, 2017

Just found this. Turns out the tutorial code needs an update:
https://stackoverflow.com/questions/43449313/issues-in-saving-document-using-polymerfire

To fix, find bower_components/note-app-elements/na-behaviour.html and change:
return this.$.document.save(this.notesPath).then(function() {

to

return this.$.document.saveValue(this.notesPath).then(function() {

@bobtista
Copy link

Also note that after you fix document.save to document.saveValue you need to disable caching and reload the page. I spent a while scratching my head, noticing that the file on disk had the change, but the file in devtools->sources hadn't updated yet, even after doing devtools->application->clearStorage

@bobtista
Copy link

I made a branch to fix this but when I tried to do git push origin quickfix I got permission denied :( Someone please accept my branch and pull request :)

@terchris
Copy link

Looks great on youtube, but it does not work. This is my first impression of the Polymer-project.
I have spent my day reading about this exciting project. Then tried to do the firebase tutorial https://codelabs.developers.google.com/codelabs/polymer-firebase-pwa It just does not work.

In the tutorial there is a link to the github version of the tutorial. This code is not the same as the tutorial. So I have a hard time figuring out how to get the tutorial working based on this code.
I was thinking that I could just get the github version of the code. But there is no doc on how to get it working.

Seriously guys. The project looks great. And you have spent a lot of time and effort making it.
Please spend some time documenting it so that people can get it working.

@FluorescentHallucinogen

@FluorescentHallucinogen

This issue is fixed in googlearchive/note-app-elements@4992c5f.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants