caobo171 / node-zklib

This is a lightweight of node.js module to connect to biometrix attendance device for examples ZKTeco
70 stars 59 forks source link

Timeout Error #8

Open noandasan opened 4 years ago

noandasan commented 4 years ago

check text [314] TIMEOUT ERROR (node:7844) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'subarray' of null at C:\Users\it\Documents\GitHub\biometric\node_modules\node-zklib\zklibtcp.js:213:46 (node:7844) 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:7844) [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. check text [374] Error: TIMEOUT ERROR check attendances { data: [], err: 'Error: TIMEOUT ERROR' } check users { data: [], err: 'TIMEOUT ERROR' }

https://snipboard.io/LoQyDG.jpg

caobo171 commented 4 years ago

This log showed that you ran into TIMEOUT error ,and just that ... You need to provide more info about this situation like what 's your type of device , and make sure your ip is correct , your network is available and there's no other device connecting with this device ( because TCP connect doesn't allow concurrents connecting)

deepshrestha commented 1 year ago

How do we define the type of device as it only needs IP and port to connect to the device? The same problem happens again and again, and it gets resolved when I physically turn off the device. What is the permanent solution for this?

I am using this version "node-zklib": "^1.3.0"

thezeeshantariq commented 1 year ago

I am also facing this issue while using it with ZKTeco MB-360. I am running a CRON job, which reads attendance from the machine after every 5 minutes. It runs fine 3-4 times, but after that, it just shows this error.

Promise Rejected
TypeError: Cannot read properties of undefined (reading 'subarray')