find-my-iphone icon indicating copy to clipboard operation
find-my-iphone copied to clipboard

Node hangs completly

Open lkovacs74 opened this issue 7 years ago • 4 comments

Dear Matt,

Installed this node to my node red. This is a clean and new installation on a Rasspberry Jessie. It reads the devices correctly, but hangs with this error message:

12 Mar 17:44:08 - [red] Uncaught Exception: 12 Mar 17:44:08 - TypeError: Cannot call method 'map' of undefined at /home/pi/.node-red/node_modules/node-red-contrib-find-my-iphone/find-my-i phone.js:31:28 at /home/pi/.node-red/node_modules/node-red-contrib-find-my-iphone/node_modu les/find-my-iphone/index.js:119:12 at /home/pi/.node-red/node_modules/node-red-contrib-find-my-iphone/node_modu les/find-my-iphone/index.js:40:14 at Request._callback (/home/pi/.node-red/node_modules/node-red-contrib-find- my-iphone/node_modules/find-my-iphone/index.js:67:12) at Request.self.callback (/home/pi/.node-red/node_modules/node-red-contrib-f ind-my-iphone/node_modules/find-my-iphone/node_modules/request/request.js:188:22 ) at Request.emit (events.js:98:17) at Request. (/home/pi/.node-red/node_modules/node-red-contrib-fin d-my-iphone/node_modules/find-my-iphone/node_modules/request/request.js:1171:10) at Request.emit (events.js:95:17) at IncomingMessage. (/home/pi/.node-red/node_modules/node-red-con trib-find-my-iphone/node_modules/find-my-iphone/node_modules/request/request.js: 1091:12) at IncomingMessage.g (events.js:180:16) at IncomingMessage.emit (events.js:117:20) at _stream_readable.js:929:16 at process._tickCallback (node.js:419:13)

Could you chek why hanging?

Thanks, L

lkovacs74 avatar Mar 12 '17 17:03 lkovacs74

What's your code?

FlorianWendelborn avatar Mar 12 '17 17:03 FlorianWendelborn

HI,

I can't have a code, I just put the F-M-I node on my node red and connect to a debug, which send the whole message to the debug window. That's all what I did.

Thakns, L

lkovacs74 avatar Mar 12 '17 17:03 lkovacs74

The thing is that the error you're encountering is thrown by node red, not by find-my-iphone. find-my-iphone doesn't have the .map() method in its source code.

FlorianWendelborn avatar Mar 12 '17 18:03 FlorianWendelborn

I created a MR that should fix the problem. Basically this error occurs if the HTTP request to the icloud api failed. I will add a check in the node-red plugin that prevents it from crashing, but as soon as above MR is merged, the error should not occur anymore.

omnibrain avatar May 10 '17 19:05 omnibrain