ERR_OUT_OF_RANGE on the readAllItems() function
See original GitHub issueso… this is the case:
itemGroup.addItems(["DB1,X0.0", "DB2,X0.1"]);
itemGroup.readAllItems()
.then(result => {
console.log('result: ', result);
})
.catch(err => {
console.log('ERRORS: ', err);
});
in this oportunity, I have (DB1,X0.0 - NOT defined area) and… (DB2,X0.1 - well defined and readable area)
The error that comes here, its just more like a “lower level” error. here is the trace:
internal/buffer.js:76
throw new ERR_OUT_OF_RANGE(type || 'offset',
^
RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 22. Received 23
at boundsError (internal/buffer.js:76:9)
at Buffer.readUInt8 (internal/buffer.js:242:5)
at S7Parser._parseResponseData (C:\Users\ACER\Documents\NODE PROJECTS\tot-bend\node_modules\nodes7\src\s7protocol\s7parser.js:308:47)
at S7Parser._transform (C:\Users\ACER\Documents\NODE PROJECTS\tot-bend\node_modules\nodes7\src\s7protocol\s7parser.js:465:37)
at S7Parser.Transform._read (_stream_transform.js:191:10)
at S7Parser.Transform._write (_stream_transform.js:179:12)
at doWrite (_stream_writable.js:441:12)
at writeOrBuffer (_stream_writable.js:425:5)
at S7Parser.Writable.write (_stream_writable.js:316:11)
at ISOOnTCPClient.ondata (_stream_readable.js:714:22)
at ISOOnTCPClient.emit (events.js:311:20)
at ISOOnTCPClient.EventEmitter.emit (domain.js:482:12)
at addChunk (_stream_readable.js:294:12)
at readableAddChunk (_stream_readable.js:275:11)
at ISOOnTCPClient.Readable.push (_stream_readable.js:209:10)
at ISOOnTCPClient._incomingData (C:\Users\ACER\Documents\NODE PROJECTS\tot-bend\node_modules\iso-on-tcp\src\client.js:199:26)
at ISOOnTCPParser.<anonymous> (C:\Users\ACER\Documents\NODE PROJECTS\tot-bend\node_modules\iso-on-tcp\src\client.js:81:43)
at ISOOnTCPParser.emit (events.js:311:20)
at ISOOnTCPParser.EventEmitter.emit (domain.js:482:12)
at addChunk (_stream_readable.js:294:12)
at readableAddChunk (_stream_readable.js:275:11)
at ISOOnTCPParser.Readable.push (_stream_readable.js:209:10) {
code: 'ERR_OUT_OF_RANGE'
}
It has to be with the iso-on-tcp module… I think is basicly the same… we can manage that as mentioned on #105
This error i think is mandatory to fix or to handle by us ( the users of nodeS7) because in this case, this error just ends the nodejs process
Issue Analytics
- State:
- Created 3 years ago
- Comments:14
Top Results From Across the Web
CosmosDB SQL API Java SDK v.4 ReadAllItems method does ...
I've tested in my side and found some interesting things. readAllItems is a function which achieved by SqlQuery, so when I debug your ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have to say I’d really like to be able to just ignore the invalid items, even for the Node-RED node use case. But I haven’t been able to come up with a good solution for this except for reading all items individually before adding them into the reading list (and I think I’ll do like this in the future there)
The main issue of this topic is closed, so we can focus on the above mentioned one for the error codes. Thanks for the great discussion!
Before updating the firmware, let me try fixing it without breaking anything else… there may be PLCs in the wild where we may not be able to update its firmware, so being able to handle it properly would be very good