lucasfelipecdm / uareu-node

MIT License
15 stars 9 forks source link

no such file or directory, open 'bin/dpfpdd.so' #14

Closed prakashnarkhede91 closed 3 years ago

prakashnarkhede91 commented 3 years ago

Hi @lucasfelipecdm i am trying to integrate the biometric Digital Persona 4500 Fingerprint Reader in node js when I use uareu-node package to integrate then I have an error

Error: ENOENT: no such file or directory, open 'bin/dpfpdd.so'

I am using the Linux os

please help on this

prakashnarkhede91 commented 3 years ago

@lucasfelipecdm can you please help us on this issue

lucasfelipecdm commented 3 years ago

Hi @prakashnarkhede91, how are you? You need to put the dpfpdd.so and dpfj.so inside a bin folder on the root of the project. This files are provided by the Crossmatch, you can download it in: http://devportal.digitalpersona.com/sdk_downloads.php

prakashnarkhede91 commented 3 years ago

Hi @lucasfelipecdm i'm fine and how are you ?

Actually, i tried after adding this file in bin folder in my project root const init = async () => { return await uareu.loadLibs('./bin/dpfpdd.so', './bin/dpfj.so') .then(() => uareu.dpfpddInit()) .then(() => uareu.dpfpddQueryDevices()) .then((res) => uareu.dpfpddOpen(res.devicesList[0])) .then((res) => { if (res) reader = res }) .catch((err) => { console.log("hey i am here ",err); throw err; }); }; and accessing that way but below error occure

prakash@meet:~/winjit_project/uru$ node index.js Error: ENOENT: no such file or directory, open './bin/dpfpdd.so' at Object.openSync (fs.js:462:3) at readFileSync (fs.js:364:35) at new DynamicLibrary (/home/prakash/winjit_project/uru/node_modules/ffi-napi/lib/dynamic_library.js:68:23) at Object.Library (/home/prakash/winjit_project/uru/node_modules/ffi-napi/lib/library.js:47:10) at /home/prakash/winjit_project/uru/node_modules/uareu-node/dist/modules/handlers/dll/dll.handler.js:10:29 at new Promise () at DllHandler.loadDpfppdFrom (/home/prakash/winjit_project/uru/node_modules/uareu-node/dist/modules/handlers/dll/dll.handler.js:8:56) at UareU. (/home/prakash/winjit_project/uru/node_modules/uareu-node/dist/modules/index.js:60:57) at step (/home/prakash/winjit_project/uru/node_modules/uareu-node/dist/modules/index.js:33:23) at Object.next (/home/prakash/winjit_project/uru/node_modules/uareu-node/dist/modules/index.js:14:53) { errno: -2, syscall: 'open', code: 'ENOENT', path: './bin/dpfpdd.so' }

Please help me on it

prakashnarkhede91 commented 3 years ago

Hi @lucasfelipecdm, when I tried the npm run on terminal it gives the below error

Please check the below error

prakash@meet:~/winjit_project/uru$ node index.js node: symbol lookup error: /home/prakash/winjit_project/uru/node_modules/ffi-napi/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node: undefined symbol: napi_add_finalizer

Please help us

lucasfelipecdm commented 3 years ago

Hi @lucasfelipecdm i'm fine and how are you ?

Actually, i tried after adding this file in bin folder in my project root const init = async () => { return await uareu.loadLibs('./bin/dpfpdd.so', './bin/dpfj.so') .then(() => uareu.dpfpddInit()) .then(() => uareu.dpfpddQueryDevices()) .then((res) => uareu.dpfpddOpen(res.devicesList[0])) .then((res) => { if (res) reader = res }) .catch((err) => { console.log("hey i am here ",err); throw err; }); }; and accessing that way but below error occure

prakash@meet:~/winjit_project/uru$ node index.js Error: ENOENT: no such file or directory, open './bin/dpfpdd.so' at Object.openSync (fs.js:462:3) at readFileSync (fs.js:364:35) at new DynamicLibrary (/home/prakash/winjit_project/uru/node_modules/ffi-napi/lib/dynamic_library.js:68:23) at Object.Library (/home/prakash/winjit_project/uru/node_modules/ffi-napi/lib/library.js:47:10) at /home/prakash/winjit_project/uru/node_modules/uareu-node/dist/modules/handlers/dll/dll.handler.js:10:29 at new Promise () at DllHandler.loadDpfppdFrom (/home/prakash/winjit_project/uru/node_modules/uareu-node/dist/modules/handlers/dll/dll.handler.js:8:56) at UareU. (/home/prakash/winjit_project/uru/node_modules/uareu-node/dist/modules/index.js:60:57) at step (/home/prakash/winjit_project/uru/node_modules/uareu-node/dist/modules/index.js:33:23) at Object.next (/home/prakash/winjit_project/uru/node_modules/uareu-node/dist/modules/index.js:14:53) { errno: -2, syscall: 'open', code: 'ENOENT', path: './bin/dpfpdd.so' }

Please help me on it

I'm good too. If you'll use the bin folder on root, you do not need to pass the path as parameter of loadLibs functions. Can you try without it please?

lucasfelipecdm commented 3 years ago

Hi @lucasfelipecdm, when I tried the npm run on terminal it gives the below error

Please check the below error

prakash@meet:~/winjit_project/uru$ node index.js node: symbol lookup error: /home/prakash/winjit_project/uru/node_modules/ffi-napi/node_modules/ref-napi/prebuilds/linux-x64/node.napi.node: undefined symbol: napi_add_finalizer

Please help us

Have you run npm install before? The lib was updated 30/07 to version 1.0.5.

prakashnarkhede91 commented 3 years ago

Hi @lucasfelipecdm , i update the NPM package it works but return the empty device list console out put is res====== { callbackRet: 0, readableRet: 'Information about connected readers obtained.', devicesNumber: 0, devicesList: [] }

But digital persona 4500 device is connected to my machine
any other setting is needed and one thing I'm using node 12 version

lucasfelipecdm commented 3 years ago

Hi @prakashnarkhede91, Are you using Linux right? So try run a sample of CrossMatch, go to opt/Crossmatch/urusdk-linux/Linux/Samples. I think the easy one is the java sample, but you can try anyone you prefer. Verify if it sample is finding your device please.

prakashnarkhede91 commented 3 years ago

yes i have linux os , and java sample application is running well and return the device id

prakashnarkhede91 commented 3 years ago

for Linux machine any other setting is required because I tried everything but no result can you help us

prakashnarkhede91 commented 3 years ago

Hi @lucasfelipecdm
Can you please help on this? It's become a showstopper for us

lucasfelipecdm commented 3 years ago

Are you running Node x64 or x32? Verify if dpfpdd.so and dpfj.so are x64 or x32 too. I really don't know why its not finding the device, if you can try to run in another computer.

prakashnarkhede91 commented 3 years ago

thanks, man finally it working, you are a saviour for us