# Node red s7 uncaught error

**URL:** https://discourse.nodered.org/t/node-red-s7-uncaught-error/4018
**Category:** General
**Created:** [16 October 2018 05:25 UTC](https://discourse.nodered.org/t/node-red-s7-uncaught-error/4018 "2018-10-16T05:25:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kavi](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@kavi](https://discourse.nodered.org/u/kavi)
#### Post date: [16 October 2018 05:25 UTC](https://discourse.nodered.org/t/node-red-s7-uncaught-error/4018/1 "2018-10-16T05:25:42Z")

</div>

we are using 10 s7 nodes in node red. node red is crashed frequently due to the uncaught error with the below error message

""  
9 Oct 19:41:29 - [red] Uncaught Exception:  
9 Oct 19:41:29 - Error: write after end  
at writeAfterEnd (\_stream\_writable.js:195:12)  
at Socket.Writable.write (\_stream\_writable.js:242:5)  
at Socket.write (net.js:657:40)  
at NodeS7.onISOConnectReply (/usr/lib/node\_modules/node-red-contrib-s7/node\_modules/nodes7/nodeS7.js:306:17)  
at Socket. (/usr/lib/node\_modules/node-red-contrib-s7/node\_modules/nodes7/nodeS7.js:262:26)  
at emitOne (events.js:96:13)  
at Socket.emit (events.js:188:7)  
at readableAddChunk (\_stream\_readable.js:176:18)  
at Socket.Readable.push (\_stream\_readable.js:134:10)  
"""  
please help us to rectify that issue, thankyou

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [16 October 2018 06:04 UTC](https://discourse.nodered.org/t/node-red-s7-uncaught-error/4018/2 "2018-10-16T06:04:01Z")

</div>

Which version of node red and node.js? Also which OS?  
If using a recent version of node red and a recommended version of node.js then you should report an issue against that node. Assuming you have checked there is not one reported already.

---

<div class="post-metadata">

### Author: ![kavi](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@kavi](https://discourse.nodered.org/u/kavi)
#### Post date: [22 October 2018 07:09 UTC](https://discourse.nodered.org/t/node-red-s7-uncaught-error/4018/3 "2018-10-22T07:09:49Z")

</div>

hi colin,

i am using the node-red with version of v0.16.2 and using the node-js with version of v6.12.3. the os which i use is a linux i386

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [22 October 2018 07:37 UTC](https://discourse.nodered.org/t/node-red-s7-uncaught-error/4018/4 "2018-10-22T07:37:21Z")

</div>

Hi @kavi

As Colin suggested, this is an issue with the error handling in the node-red-contrib-s7 module.

You first need to check you have the latest version of that module. Then you should raise an issue against the node on GitHub so it's developers can help you.

> **[netsmarttech/node-red-contrib-s7](https://github.com/netsmarttech/node-red-contrib-s7)**
>
> A Node-RED node to interact with Siemens S7 PLCs. Contribute to netsmarttech/node-red-contrib-s7 development by creating an account on GitHub.

It's also worth noting you are on quite an old version of Node-RED - but that will be unrelated to the error handling in the s7 node.
