GoogleCloudPlatform / node-red-contrib-google-cloud

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

Problem with PubSub node #78

Closed MahrWe closed 4 years ago

MahrWe commented 4 years ago

A configured PubSub node in my flow led to a crash of my node-red container and left it unable to restart.

Apperently there is a ReferenceError in line 83 of PubSub.js where the undefined method OnError is used.

Here is the log: 0|node-red | ReferenceError: OnError is not defined 0|node-red | at Subscription.OnClose (/home/matthias/.node-red/node_modules/node-red-contrib-iot-in-gcp/pubsub.js:83:54) 0|node-red | at Subscription.emit (events.js:198:13) 0|node-red | at Subscriber.Subscription._subscriber.on.err (/home/matthias/.node-red/node_modules/@google-cloud/pubsub/build/src/subscription.js:197:38) 0|node-red | at Subscriber.emit (events.js:198:13) 0|node-red | at MessageStream._stream.on.err (/home/matthias/.node-red/node_modules/@google-cloud/pubsub/build/src/subscriber.js:320:38) 0|node-red | at MessageStream.emit (events.js:198:13) 0|node-red | at emitErrorNT (internal/streams/destroy.js:91:8) 0|node-red | at process._tickCallback (internal/process/next_tick.js:63:19)

kolban-google commented 4 years ago

:-)

This is a good one ... MANY THANKS for raising the defect ... unfortunately ... you are NOT using my Node plugin ... you are using this one:

https://flows.nodered.org/node/node-red-contrib-iot-in-gcp

which has a github page here ... which is where you need to raise the issue:

https://github.com/jorgeeecm/node-red-contrib-iot-in-gcp

The Nodes in THIS project are described here:

https://flows.nodered.org/node/node-red-contrib-google-cloud

You are welcome to switch to use these nodes should you desire.

Unfortunately, there is nothing further I can do to assist with your problem ... please raise an issue on the Nodes of the other project.

MahrWe commented 4 years ago

Wow, good catch.. I will post it to the correct Github. I checked and found this probably applies to pubsub-in.js (line 110) I cannot provide any logs though.