GoogleCloudPlatform / node-red-contrib-google-cloud

Node-RED nodes for Google Cloud Platform
Apache License 2.0
90 stars 57 forks source link

Firestore probrem mode:set, update, delete, get #57

Closed maskoba closed 4 years ago

maskoba commented 4 years ago

I have installed Firestore in Node-RED. But except mode:query, unsuccessfully.

The path to the document see below. msg.payload.path = /collection/document

ex if (mode == 'set' || mode == 'update' || mode == 'delete' || mode == 'get') { const document = firestore.doc(msg.payload.path); }

Help would be much appreciated. Thanks

kolban-google commented 4 years ago

Hello my friend. Would you be able to share with me an example flow that is failing? What exact errors or symptoms are you seeing? My plan is to try and recreate. If there are associated logs showing error symptoms, those would be great to see too.

maskoba commented 4 years ago

Hi, kolban

mode:get

スクリーンショット 2020-03-02 18 02 31

debug screen No Errors

スクリーンショット 2020-03-02 18 24 33

property Get-Inject

スクリーンショット 2020-03-02 18 24 57

property Get-ChangeNode

スクリーンショット 2020-03-02 18 25 36

Thanks

kolban-google commented 4 years ago

Thank you my friend. I have all the information I need to start investigation. I will start looking in depth now and will report back with updates as and when I come to them.

kolban-google commented 4 years ago

Wow ... gosh. I found at least two major errors. Thankfully they were easily cured. At this point, I can refresh the build but what I'd really like to do is give you a patch and have you test it for me. I am not sure how familiar you are with Node-RED nor how you are running your Node-RED environment. When you install the node-red-contrib-google-cloud package, it installs a bunch of Node.js files. One of those files is called "firestore.js". Here is a link to a paste of a patched version:

https://pastebin.com/AWXxtbQg

In an ideal world, I would like to ask you to find your existing firestore.js from the package and replace the content with the paste above and then re-test and see if that fixes the issue. If it does then I will publish the patch and refresh the Node-RED repository.

I realize I am asking you to do work here and if you don't know how or you simply choose not to, that will be fine. Just post back and let me know and I'll refresh the Node-RED repository immediately. My desire is to have you test and once YOU are satisfied, then I would republish for all. If you test and you are not satisfied, then we haven't caused others to refresh too soon.

maskoba commented 4 years ago

I'm using GCP container-image to run Node-RED, so please release an update. Thanks

kolban-google commented 4 years ago

Howdy my friend. I have committed and pushed a refresh which contains the changes. This should be available as the package at 0.0.14 or above. Please refresh and test and post back when you can. Hopefully this is the fix but if ANYTHING is still amiss, I'll be delighted to assist.

maskoba commented 4 years ago

Confirmed all the following features of Firestore set, get, update, delete, query Please close this issue Thank you

kolban-google commented 4 years ago

That is great news and THANK YOU for reporting and giving feedback. Apologies for the problem in the first place. If ever you have new issues, PLEASE feel very welcome to raise them here and we will get to them as quickly as you can. Thank you for using GCP functions.