Hypnos3/node-red-contrib-cast

Error

realjax opened this issue · 23 comments

Node-red throws this when trying to play an mp3 through cast:

(node:1669) UnhandledPromiseRejectionWarning: TypeError: node.error is not a function
at errorHandler (/home/pi/.node-red/node_modules/node-red-contrib-cast/cast-to-client.js:52:10)
at googletts.then.catch.err (/home/pi/.node-red/node_modules/node-red-contrib-cast/cast-to-client.js:191:9)
at
at process._tickCallback (internal/process/next_tick.js:189:7)
(node:1669) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1669) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I see this error too.

I need some time to fix this.

here are some extra info

  1. Sending mp3 to cast.
  2. mp3 plays fine on google device.
  3. some reason there is some error raised
  4. function errorHandler is called to generate message and set error.
  5. however value of 'node' is not set. (tested by commenting out node.error on line 52. now error appears on next line node.log).

so one main issue

  • file played fine on device. so not sure why error was detected in this node.

Secondary issue is, value of node is not set when errorHandler is invoked. but i suspect it could be related to main issue and once spurious error issue is resolved this issue will get resolved too.

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

is this issue fixed or won't be fixed ?

will need time for investigation

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

still open.

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

still open

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

still open.

any hope of this issue getting fixed ?

With node 14, this bug will crash whole node-red since unhandled exception behavior is changing. Can you please fix this ?

@qwertangel same issue here...

This has been crashing all of Node-RED on Node 14. Putting in some hacks (making 'node' a global variable and setting it in the main constructor) I get another crash where data2 is undefined . Fixing that, I've tracked it down in my case as being EHOSTUNREACH, which is my problem... my Google Home needed rebooting.

However, the more immediate problem here is the error handling itself is broken.

@tomgidden , since this issue was not fixed, I moved to node-red-contrib-castv2 . No more issues.

It was driving me nuts to see strange behaviour when the bell rang. I figured it must be some crash and that was indeed triggered by this cast node. I've now also switched to castv2, thanks for your info qwertangel.

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

oh2xx commented

I had this same issue and moved to node-red-contrib-castv2 . I hope it works better.

stale commented

This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.

I'm still having this issue. It crashes my nodered and causes it to restart.

Still not fixed. Have to remove from node red.