Closed DenisJuan closed 2 years ago
In the "opcua-iiot-listener.js" file, I searched for every removeAllListeners occurences and add a NULL checking of parent (I'm novice in js / bianco syntax, so hope these following modifications are OK especially the third one). In my case, Node-red doesn't crash anymore.
I have checked "removeAllListeners" occurences in other js files and most of them are protected against NULL pointer.
Best regards,
Dear sir,
Information
Current behaviour Connecting a read and a listen node to UAAnciCServer and restarting quickly the server, node red crashes with following error: _TypeError:` Cannot read property 'removeAllListeners' of null at C:\Users....node-red\node_modules\node-red-contrib-iiot-opcua\opcuaIIoT\maps\opcua-iiot-listener.js:660:46 at Immediate. (C:\Users....node-red\node_modules\node-opcua-client\src\clientsubscription.js:341:9)
at processImmediate (internal/timers.js:439:21)
Expected behaviour No crash.
Minimal reproduction of the problem with instructions
Reproduction: 100%
Your Environment
Please tell us about your environment:
I'm using node-red with node-red-contrib-iiot-opcua (3.12.0) and node-opcua installed automaticall with it (0.7.4)
Device :
Windows: 10 (1803)
Description of the connecting OPC UA system:
Node-RED version: Node red stable V1.0.4
node-red-contrib-iiot-opcua version: `` v 3.12.0
Node: (min. 8.x)
node --version
=