hidglobal / digitalpersona-devices Goto Github PK
View Code? Open in Web Editor NEWDigitalPersona Security Devices support library
Home Page: https://hidglobal.github.io/digitalpersona-devices/index.html
License: MIT License
DigitalPersona Security Devices support library
Home Page: https://hidglobal.github.io/digitalpersona-devices/index.html
License: MIT License
Hey there!
Im sorry to bother to much, im doing a proyect right now.
My issue here is that everytime I minimize the browser, or click outside the page the acquisition pauses and wont get data from the fingerprint reader. It will work as usual if I click again in the page.
I was trying to find a way to solve this issue and reading the documentation I found the library uses websockets. So i would be happy if you can help me to understand better or if there is any workaround to my problem. my main goal is to keep the fingerprint capturing fingerprints in the background.
Thanks..
Hello! This is my first time using the dependency (and asking for help, in general) and I stumbled into some issues that I cannot resolve that well even when looking at the other issues from #4, #13, #27, and #33. I'm using React.js and most of the examples that were given used Angular, which for me a not-so-experienced dev, cannot find a way to fix the issues that pop-up.
My biometric device is a DigitalPersona U.are.U 4500 Fingerprint Reader and I downloaded the SDK along with the Local Agent from the tutorial page in the documentation. I followed the documentation yet I came up with these errors.
The things that popped up an error were:
WebSdk is not defined
ReferenceError: WebSdk is not defined
at new Channel (http://localhost:3000/static/js/bundle.js:26526:29)
at new FingerprintReader (http://localhost:3000/static/js/bundle.js:27010:23)
at FingerprintModal (http://localhost:3000/main.f679d5df578319e64c29.hot-update.js:43:29)
at renderWithHooks (http://localhost:3000/static/js/bundle.js:66757:22)
at mountIndeterminateComponent (http://localhost:3000/static/js/bundle.js:70043:17)
at beginWork (http://localhost:3000/static/js/bundle.js:71339:20)
at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:56349:18)
at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:56393:20)
at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:56450:35)
at beginWork$1 (http://localhost:3000/static/js/bundle.js:76324:11)
ERROR in ./node_modules/@digitalpersona/devices/dist/es5.bundles/index.umd.js 2:115-132
Module not found: Error: Can't resolve 'WebSdk' in 'E:\xampp\htdocs\project\frontend\node_modules\@digitalpersona\devices\dist\es5.bundles'
ERROR in [eslint]
src\modules\WebSdk\index.js
Line 28:23: Unexpected use of 'self' no-restricted-globals
Line 28:44: Unexpected use of 'self' no-restricted-globals
Line 28:58: Unexpected use of 'self' no-restricted-globals
Line 28:66: Unexpected use of 'self' no-restricted-globals
Line 2955:40: 'DV' is not defined no-undef
Line 4227:36: 'sha1' is not defined no-undef
Line 4227:42: 'sjcl' is not defined no-undef
Line 4227:48: 'BigInteger' is not defined no-undef
Line 4588:21: 'a' is not defined no-undef
Line 4591:21: 'two' is not defined no-undef
Line 4677:13: 'i' is not defined no-undef
Line 4678:13: 'ascii' is not defined no-undef
Line 4680:20: 'i' is not defined no-undef
Line 4681:17: 'ascii' is not defined no-undef
Line 4681:25: 'ascii' is not defined no-undef
Line 4682:41: 'i' is not defined no-undef
Line 4683:17: 'i' is not defined no-undef
Line 4686:20: 'ascii' is not defined no-undef
Line 5827:25: Unexpected use of 'self' no-restricted-globals
Line 5828:19: Unexpected use of 'self' no-restricted-globals
Line 6530:44: 'value' is not defined no-undef
Line 6568:65: 'async' is not defined no-undef
Line 6568:72: 'sjcl' is not defined no-undef
Line 6568:78: 'BigInteger' is not defined no-undef
Line 6568:90: 'SRPClient' is not defined no-undef
Line 6568:101: 'ES6Promise' is not defined no-undef
WARNING in ./src/modules/WebSdk/index.js 2445:15-32
Module not found: Error: Can't resolve 'crypto' in 'E:\xampp\htdocs\bjmp\frontend\src\modules\WebSdk'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "crypto": false }
WARNING in ./src/modules/WebSdk/index.js 4602:18-28
Module not found: Error: Can't resolve 'vertx' in 'E:\xampp\htdocs\bjmp\frontend\src\modules\WebSdk'
Again, I read most of the issues from other threads and tried doing them but to no avail. If anyone could help I'd appreciate it! Thanks.
Hello,
I am having troubles using npm library. I've made a question in stack overflow with all the information:
Thanks
In normal sdk is posible to get the name of the device like "U are U 4500 FingerPrint Reader" is it possible to add it in the websdk?
eny example video or in youtube.com abaut install and use??
I tried to start project with NuxtJs.
when I import @digitalpersona/devices,
import { FingerprintReader, SampleFormat } from "@digitalpersona/devices";
it shows error:
This dependency was not found:
* WebSdk in ./node_modules/@digitalpersona/devices/dist/es5.bundles/index.umd.js
Hello,
Is there a way to know the name or id of the driver this library is interacting with? i.e: WBF or RTE?
Hello.
I already implemented and captured samples from my U.are.U 4500 Fingerprint Reader on Angular 9 framework. Is there a way to convert the sample acquired to image format?
Thanks!
I have built a React app integrated with Digital Personal u are u 4500 using this library.
It works great on Windows machines.
I am aware that for this library to works, HID DigitalPersona Lite Client is essential, therefore I'm wondering does the lite client is available on Android? I wish to connect to the fingerprint reader via OTG so that our web app can listen to the fingerprint image captured on Android.
Thanks in advanced
I am trying to run Web Sample app I am using
When I open the web page then it does not show me the device and in the browser console, it shows:
POST https://127.0.0.1:9001/connect net::ERR_SSL_VERSION_OR_CIPHER_MISMATCH
if I go to https://127.0.0.1:52181/get_connection I see:
{"endpoint":"https://127.0.0.1:9001/?web_sdk_id=556e6cc7-19f7-40db-82d4-59ef33433cfc&web_sdk_minport=9001&web_sdk_port=9001&web_sdk_secure=true&web_sdk_username=LvRZWhIxZtU&web_sdk_password=F3AD340EDFB7E403&web_sdk_salt=C9EEB4BDEFEA6BBFBD0CCAFF323E88D4AEBB12EC830C6224A785883E547942BE"}
In firefox I am seeing error if I try to access address with port 9001:
An error occurred during a connection to 127.0.0.1:9001. Cannot communicate securely with peer: no common encryption algorithm(s).
Error code: SSL_ERROR_NO_CYPHER_OVERLAP
Here is the console window message in Firefox:
DpAgent.exe is running and listening to the 9001 port:
What can be the issue? The device is working fine in .Net application samples.
One more thing I have installed HID DigitalPersona Lite Client is not it comes in SDK? Or do I have to install it separately?
Hello! I've been having a hard time trying to solve this.
Is there any chance that after acquiring the samples (by starting to acquire data with the "SampleFormat.Intermediate" format), to transform/mutate/change the -intermediate sample- to a -PNG sample-, or the other way around ( PNG sample to Intermediate sample )
For now, I'm needing to send a request with both "SampleFormat" (PNG and Intermediate).
Or is there a way to use multiple formats in the "reader.startAcquisition" method to obtain same quantity of formats as samples.
I have trouble by trying to startAcquisition two times with both formats.
Thanks a lot for your time reading this!!!
Hello, can you please guys share the solution in the angular way?
I try the following
npm install @digitalpersona/devices
"scripts": [
"src/app/core/modules/WebSdk/index.js"
],
import {FingerprintReader} from "@digitalpersona/devices";
...
private reader: FingerprintReader;
constructor() {
this.reader = new FingerprintReader();
}
But in my console still getting errors
ERROR in node_modules/@digitalpersona/devices/dist/typings/devices/cards/reader.d.ts:1:23 - error TS2688: Cannot find type definition file for 'websdk'.
1 /// <reference types="WebSdk" />
~~~~~~
node_modules/@digitalpersona/devices/dist/typings/devices/fingerprints/reader.d.ts:1:23 - error TS2688: Cannot find type definition file for 'websdk'.
1 /// <reference types="WebSdk" />
~~~~~~
node_modules/@digitalpersona/devices/dist/typings/devices/iwa/device.d.ts:1:23 - error TS2688: Cannot find type definition file for 'websdk'.
1 /// <reference types="WebSdk" />
am I missing something?
Originally posted by @ArmandoPerdomo in #2 (comment)
good morning, I have a problem with fingerprint verification... I don't know digitalpersona/devices has a library to verify fingerprints
and if digital persona doesn't have this library I don't know how to make a function to buy two matrices
since the fingerprints are taken in different positions and it would be almost impossible for me to make a condition for that.
I just want a function that allows me to verify fingerprints
`import {
ChangeDetectorRef,
Input,
Component,
OnInit,
OnDestroy,
ViewChild,
} from '@angular/core';
import {
FingerprintReader,
SampleFormat,
DeviceConnected,
DeviceDisconnected,
SamplesAcquired,
AcquisitionStarted,
AcquisitionStopped,
} from '@digitalpersona/devices';
import './core/modules/WebSdk';
@component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
export class AppComponent implements OnInit, OnDestroy {
title = 'demo-fingerprint-reader';
ListaFingerprintReader: any;
InfoFingerprintReader: any;
ListaSamplesFingerPrints: any;
matches:any;
currentImageFinger: any;
ListaHuellas:String[]=[];
threshold:any;
currentImageFingerFixed:any;
resul:any;
private reader: FingerprintReader;
constructor() {
this.reader = new FingerprintReader();
}
private onDeviceConnected = (event: DeviceConnected) => {};
private onDeviceDisconnected = (event: DeviceDisconnected) => {};
private onAcquisitionStarted = (event: AcquisitionStarted) => {
console.log('En el evento:onAcquisitionStarted');
console.log(event);
};
private onAcquisitionStopped = (event: AcquisitionStopped) => {
console.log('En el evento:onAcquisitionStopped');
console.log(event);
};
private onSamplesAcquired = (event: SamplesAcquired) => {
console.log('en el evento:adquisicon de imagen');
console.log(event);
this.ListaSamplesFingerPrints = event;
};
ngOnInit() {
this.reader = new FingerprintReader();
this.reader.on('DeviceConnected', this.onDeviceConnected);
this.reader.on('DeviceDisconnected', this.onDeviceDisconnected);
this.reader.on('AcquisitionStarted', this.onAcquisitionStarted);
this.reader.on('AcquisitionStopped', this.onAcquisitionStopped);
this.reader.on('SamplesAcquired', this.onSamplesAcquired);
}
ngOnDestroy() {
this.reader.on('DeviceConnected', this.onDeviceConnected);
this.reader.on('DeviceDisconnected', this.onDeviceDisconnected);
this.reader.on('AcquisitionStarted', this.onAcquisitionStarted);
this.reader.on('AcquisitionStopped', this.onAcquisitionStopped);
this.reader.on('SamplesAcquired', this.onSamplesAcquired);
}
//Lista de dispositivos conectados
fn_ListaDispositivos() {
Promise.all([this.reader.enumerateDevices()])
.then((results) => {
this.ListaFingerprintReader = results[0];
console.log('Dato Dispositivos');
console.log('this.listaFingerprintReader');
})
.catch((error) => {
console.log(error);
});
}
//Obtener Informacion DE Dispositivo
fn_DeviceInfo() {
Promise.all([
this.reader.getDeviceInfo(this.ListaFingerprintReader[0]),
]).then((results) => {
this.InfoFingerprintReader = results[0];
console.log('Info FingerReader');
console.log('this.InfoFingerprintReader');
});
}
//Inicia Device para lectura
fn_StartCapturaFP() {
this.reader.startAcquisition(SampleFormat.PngImage , this.InfoFingerprintReader['DeviceID'])
.then((response) => {
console.log('Ud puede iniciar a capturar !!');
console.log(response);
console.log(this.currentImageFingerFixed );
})
.catch((error) => {
console.log(error);
});
}
//Detener Device para lectura
fn_EndCapturaFP() {
this.reader
.stopAcquisition(this.InfoFingerprintReader['DeviceID'])
.then((response) => {
console.log('Se paro de capturar !!');
console.log(response);
})
.catch((error) => {
console.log(error);
});
}
//Mostar Captura
fn_CapturaFP() {
var ListImages = this.ListaSamplesFingerPrints['samples'];
var lsize = Object.keys(ListImages).length;
if (ListImages != null && ListImages != undefined) {
if (lsize > 0) {
this.currentImageFinger = ListImages[0];
this.currentImageFingerFixed = this.fn_fixFormatImageBase64(this.currentImageFinger);
this.ListaHuellas.push(this.currentImageFingerFixed)
console.log('ES LA LISTA DE HUELLA',this.ListaHuellas);
this.fn_huellaigual();
}
}
}
//Corregir Formato Base64
fn_fixFormatImageBase64(prm_imagebase:any) {
var strImage = "";
strImage = prm_imagebase;
//Remplaza Caracteres no Validos 0
strImage = strImage.replace(/_/g, "/");
strImage = strImage.replace(/-/g, "+");
return strImage;
}
//verification
fn_huellaigual(){
if((this.ListaHuellas[0])==this.ListaHuellas[1]){
console.log('son iguales')
}
console.log(' NO son iguales')
I tried to follow the limited tutorial here,
reader.ts
/**
* @author Budi K
*
* @reference https://github.com/hidglobal
*/
import './modules/WebSdk';
import { CardsReader, Card, CardInserted, CardRemoved, CardType } from '@digitalpersona/devices';
interface ICardData<T = any> {
type: string | null
data: T
}
export default class CardsSigninControl
{
private reader: CardsReader | undefined;
private card: any;
private pin: string | undefined; // ini gk akan dipakai hrusnya
init() {
this.reader = new CardsReader();
this.reader.on("DeviceConnected", this.onDeviceConnected);
this.reader.on("DeviceDisconnected", this.onDeviceDisconnected);
this.reader.on<CardInserted>("CardInserted", this.onCardInserted);
this.reader.on<CardRemoved>("CardRemoved", this.onCardRemoved);
}
destroy() {
this.reader?.off();
delete this.reader;
}
// Event handlers.
private onDeviceConnected = (event: any) => {
console.log('Reader Connedted')
}
private onDeviceDisconnected = (event: any) => {
console.log('Reader disconnected')
}
private onCardInserted = async (event: any) => {
console.log('Card inserted into reader')
try {
// get card type and other info
const card = await this.reader?.getCardInfo(event.deviceId);
if (!card) return;
this.card = card;
let cardData: ICardData = { type: '', data: {} };
// detek tipe kartu
switch (card.Type) {
case CardType.Contact:
cardData.type = 'Contact';
break;
case CardType.Contactless:
cardData.type = 'Contactless';
break;
case CardType.Proximity:
cardData.type = 'Proximity';
break;
default:
cardData.type = 'Unknwown'
}
cardData.data = await this.reader?.getCardAuthData(card.Reader);
console.log(cardData);
return cardData;
} catch (err) {
console.log(err)
alert(err)
}
}
private onCardRemoved = (event: any) => {
console.log('Card removed from reader')
}
}
App.tsx
import React from 'react';
import logo from './logo.svg';
import './App.css';
import CardsSigninControl from './reader'
const BinusCardReader = new CardsSigninControl()
function App() {
React.useEffect(() => {
BinusCardReader.init()
return () => {
BinusCardReader.destroy()
}
}, [])
return (
<div className="App">
...
</div>
);
}
export default App;
public/index.html
<head>
<script src="../src/modules/WebSdk/index.js"></script>
</head>
<body>
<div id="roor"></div>
</body>
I have no idea why the @digitalpersona/devices
library try to load the WebSdk? because in the tutorial
https://hidglobal.github.io/digitalpersona-devices/tutorial.html
WebSdk should even be loaded directly in html
@a-bronx
Hi Team,
We are having a biometric finger print authentication into our Elector application, I have achieved the functionality with the help of node-fprint npm, My electron application running on node 12, and npm having max support for node 8. We tried all possible solutions to upgrade the npm but no success, Can you guys please help me with this? Please help us :(
Thanks,
Prakash
Good afternoon, could this library be implemented in pure Javascript and work in a cloud domain?
I keep getting a communication error when I try to connect DP 4500 to my web app. Below is a test file that reproduces the issue I'm facing. I already have DigitalPersona Lite Client and DIGITALPERSONA 4500 WBF DRIVER installed.
I bought a new device and it comes with a cd which is supposed to contain the drivers, the cd software is corrupt and we cannot install it, for this reason we cant use the library on the web, the url for download sent to me is bad too, after installing the software, the program installed doesn't open. Please this is really bad, It is really hard to come across a working driver or whatever software is used to detect the fingerprint device. This is really delaying a major project
Hi! I have this error on the provided index.js from the webSdk sample.
Uncaught TypeError: Cannot set properties of undefined (setting 'ifvisible')
at index.js:4906:29
at index.js:4908:5
at index.js:5198:4
```
getting error "Not Found - GET https://registry.npmjs.org/api-extractor - Not found"
hello, i cant use Fingerprint 5100 module on windows. Using 4600 4500 drivers not working. From where i can download drivers for Fingerprint 5100 module
I have Old DigitalPersona U.are.U 4500 Fingerprint Reader. How can i integrate in ASP.Net Core Web App? It can integrate or not?
Hi guys im trying to use the 4500 reader on a react application but i am getting this error
Failed to compile.
./node_modules/@digitalpersona/devices/dist/es5.bundles/index.umd.js
Module not found: Can't resolve 'WebSdk' in 'C:\Users\Ibrah\Desktop\virtual-dapp-client\node_modules\@digitalpersona\devices\dist\es5.bundles'```
saludos me puedes escribir al +57 314 775 4208
quiero migrarlo a phpcon mysql para control de personal. gracias
Dear HID,
First, I'm testing event of fingerprint reader, but I can not test the "failed" case.
In QualityReport, I alway receive data like this:
deviceId: "8C630117-B87E-6B47-8D2E-5AAF6EAACC9A"
quality: 0
type: "QualityReported"
.... even when I intentionally put my whole hand on chin on the device. Another cases can not test because no event's called.
So, how can I test the failed case and got correct quality (put whole the hand or chin on the device can not is a good quality case).
The second. I use this solution to convert Sample raw data to image src but seem like no luck, or have something wrong in my code.
This is my code:
In SampleAcquired event:
const { Data: rawData } = samples[0];
const sampleImageUrl = 'data:image/png;base64,' + btoa(Utf8.fromBase64Url(rawData));
this.imgString = sampleImageUrl;
In template: <img [src]="imgString" alt="" />
And the result like this:
Is there any mistake from me that make the code not work? :(
Hi,
I'm following the tutorial for the past few weeks and was successfully downloaded the HID DigitalPersona Lite Client on my machine. But now when I go to this download link it is not working anymore. Can anyone point me to the right link for this.
Hello,
I'm having issue implementing the library in Angular9. I created an instance of FingerprintReader
(like in this example), run the application using ng serve and it prompts me this error.
I also tried to implement your instruction here and it prompts another error regarding vertx
I hope you can help me in this matter. Thanks in advance.
sir @a-bronx it's possible to convert PNG Image to Intermediate sample format or Intermediate to Png Image Format?
digitalpersona-devices/@types/WebSdk/index.js
Lines 4677 to 4678 in fcbeaad
I got this error when trying to use it in my Nuxt3 project. I think those lines need var
declaration
I am using Digital Persona 4500 and trying to run it on a web browser. Everything runs smoothly, and the fingerprint can be read in the browser up to this point. However, after that, I encountered a bug. My fingerprint device keeps connected and disconnected or turning off and on within a few seconds, and it continues like that. I am using DigitalPersona Lite Client. Does anyone have a solution to my problem? Thank you.
Hi There, I am trying to implement fingerprint into the angular 7 application. I installed the library using npm and when I included the library into the typescript file then it gives me an error.
One of them is.
ERROR in ./node_modules/@digitalpersona/devices/dist/es5.bundles/index.umd.js
Module not found: Error: Can't resolve 'WebSdk' in '...\node_modules\@digitalpersona\devices\dist\es5.bundles'
The other errors I got is
ERROR in node_modules/@digitalpersona/devices/dist/typings/devices/cards/reader.d.ts(1,23): error TS2688: Cannot find type definition file for 'websdk'.
node_modules/@digitalpersona/devices/dist/typings/devices/fingerprints/reader.d.ts(1,23): error TS2688: Cannot find type definition file for 'websdk'.
node_modules/@digitalpersona/devices/dist/typings/devices/iwa/device.d.ts(1,23): error TS2688: Cannot find type definition file for 'websdk'.
Please let me know if the library is compatible with angular 2+ and what I need to do fix this problem.
Thanks in advance.
I am integrating the fingerprint reader into a Xamarin.Android project (Android 7.1). I used a bindings project with the jar and the .so files. It works for general scanning, but when I attempt to use the enrollment process when I call the readers Capture method I get the following error.
java.lang.UnsatisfiedLinkError: No implementation found for int com.digitalpersona.uareu.jni.Dpfpdd.DpfpddCaptureExt(
long, int, int, int, int, int, com.digitalpersona.uareu.jni.Dpfpdd$IntReference, com.digitalpersona.uareu.jni.Dpfpdd$IntReference, com.digitalpersona.uareu.jni.Dpfpdd$IntReference, com.digitalpersona.uareu.jni.Dpfpdd$IntReference, com.digitalpersona.uareu.dpfpdd.FidImpl)
(tried Java_com_digitalpersona_uareu_jni_Dpfpdd_DpfpddCaptureExt and Java_com_digitalpersona_uareu_jni_Dpfpdd_DpfpddCaptureExt__JIIIIILcom_digitalpersona_uareu_jni_Dpfpdd_00024IntReference_2Lcom_digitalpersona_uareu_jni_Dpfpdd_00024IntReference_2Lcom_digitalpersona_uareu_jni_Dpfpdd_00024IntReference_2Lcom_digitalpersona_uareu_jni_Dpfpdd_00024IntReference_2Lcom_digitalpersona_uareu_dpfpdd_FidImpl_2)
at com.digitalpersona.uareu.jni.Dpfpdd.DpfpddCaptureExt(Native Method)
at com.digitalpersona.uareu.jni.Dpfpdd.capture(Dpfpdd.java:183)
at com.digitalpersona.uareu.dpfpdd.ReaderCollectionImpl$ReaderImpl.Capture(ReaderCollectionImpl.java:167)
at crc64696f8426591dd164.FingerService.n_GetFmd(Native Method)
at crc64696f8426591dd164.FingerService.GetFmd(FingerService.java:31)
at com.digitalpersona.uareu.dpfj.EngineImpl.CreateEnrollmentFmd(EngineImpl.java:58)
Can you provide any insight into what I am missing? I attempted using the Metadata.xml to transform the method, but am new to that so may have had it wrong if that is what is required (would need a specific example of what to put in there). Thanks!
H, Please take a look at the following. I have read the issues specifically #4 but not sure how it can be resolved in react app
./node_modules/@digitalpersona/devices/dist/es5.bundles/index.umd.js Module not found: Can't resolve 'WebSdk' in 'E:\digitalpersona-react-sample\node_modules\@digitalpersona\devices\dist\es5.bundles'
I am experiencing the above issue on a react sample provided here
My Setup
https://127.0.0.1:52181/get_connection ----->>> {"endpoint":"https://127.0.0.1:9001/?web_sdk_id=5e5a1211-0b1d-4f3a-8b18-ee057f7a6127&web_sdk_minport=9001&web_sdk_port=9001&web_sdk_secure=true&web_sdk_username=kY_fyw4wmJ4&web_sdk_password=8D2E5C87BDBE072F&web_sdk_salt=ACDCB7545A8C39CB3BB93613FEA54C9377A3A62C6ED6B9F545C49DF014DA13D3"}
This react app is rendering Client Side. So any kind of library included runs on the browser.
Index.html contains the websdk.client.min.js
file.
Other Libraries are included inside App.js
import {BioSample} from "@digitalpersona/core";
import {FingerprintsAuth} from '@digitalpersona/authentication';
import {IAuthService} from '@digitalpersona/services';
import {FingerprintReader, SampleFormat} from '@digitalpersona/devices';
Hi everyone, I got a problem with the WebSdk module using the library @DigitalPersona/devices in next.js.
My problem is the following:
error node_modules@digitalpersona\devices\dist\es5.bundles\index.umd.js (211:38) @ WebSdk
error ReferenceError: WebSdk is not defined
I installed the library via "npm", and added the WebSdk Manually to the project. copying the files and creating a folder, to solve module not found I used the webpack configuration to add the module WebSdk to the list. as the following:
module.exports = {
webpack: (config, { isServer }) => {
config.resolve.alias['WebSdk'] = path.resolve(__dirname, './public/modules/WebSdk');
return config;
},
async rewrites() {
return [
{
source: '/modules/WebSdk/:path*',
destination: '/public/modules/WebSdk/:path*',
},
];
},
};
, Also I load the module to the browser
<Script src='/modules/WebSdk/index.js'></Script>
If I go to the node_modules@digitalpersona\devices\dist\es5.bundles\index.umd.js and check the line where the proble is suppose to be the problem seems to be here:
function Channel(channelName, options) {
this.pending = [];
this.webChannel = new WebSdk.WebChannelClient(channelName, options);
this.webChannel.onConnectionSucceed = this.onConnectionSucceed.bind(this);
this.webChannel.onConnectionFailed = this.onConnectionFailed.bind(this);
this.webChannel.onDataReceivedTxt = this.onDataReceivedTxt.bind(this);
}
When creates a new Web Channel, however if I ctrl click the WebSdk, it sends me to the module, so its loaded not undefined.
If anyone could help me with this issue, I've been strugglin for a few days :(
Hi! I followed the tutorial Tutorial. And I get this error.
I am using vue3 with vite.
Console error: "Uncaught (in promise) TypeError: Failed to resolve module specifier "WebSdk". Relative references must start with either "/", "./", or "../".
Hi,
When I create a variable and an instance of "FingerprintReader", the result is:
./node_modules/@digitalpersona/devices/dist/es6/devices/websdk/channel.js:3:0-16 - Error: Module not found: Error: Can't resolve 'WebSdk' in '...\node_modules@digitalpersona\devices\dist\es6\devices\websdk'
I already have the index.js file in the script tags as mentioned.
I need to use the SDK and I can find the documentation. Does somebody have the documentation or the link to download it?
Also, what is the default format in which Digital persona 4500 saves the fingerprint image? I have tried to convert from base64 to file and I have not been able to see the image in any way
Hello,
Why always the sampleQuality
returns Good
in the onQualityReported
event ? I tried capture a lot of wrong finger placements but always quality was good.
And another problem, when capturing a fingerprint sample with a bad finger placement, the onSamplesAcquired
returns a corrupted fingerprint sample (using it in img
shows corrupted image). Is there a possibility to avoid acquiring these samples?
FYI: Using the lib in Angular 11 app.
Hello, all of a sudden I started getting an error from javascript and device does not get detected. Few days ago the code was working fine.
I tried running the sample from digitalpersona repo but still got same error(sample used to work when I first ran it two months ago).
I tried https://127.0.0.1:52181/get_connection and got expected response. What could be the problem?
I tried the following sdk versions: 2.2.3 and 3.2.0 and I also tried the client lite version
import React, { useEffect, useState } from 'react';
import Head from 'next/head';
import dynamic from 'next/dynamic';
import { Box, Button, Grid, TextField, Typography } from '@mui/material';
// Dynamically import FingerprintReader with SSR turned off
const FingerprintReader = dynamic(
() => import('@digitalpersona/devices').then((mod) => mod.FingerprintReader),
{ ssr: false } // This disables server-side rendering for this module
);
const index = () => {
const [reader, setReader] = useState(null);
// Initialize the reader once the component has mounted
useEffect(() => {
setReader(new FingerprintReader());
}, []);
const handleButtonClick = async () => {
console.log(reader)
};
I modified in '@digitalpersona/devices/dist/es5.bundles/index.umd.js'
Is the import this for the WebSdk in reactjs with nextjs typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@digitalpersona/core'), require('../../../../../public/modules/websdk')) :
and with this I had no more problems with the import of the WebSdk and in my code I set the import FingerprintReader to have SSR disabled so that it runs on the browser side but I get this error 'FingerprintReader is not a constructor', what could be causing this?
Uncaught Error: Cannot find module 'WebSdk'
I have gone through all the issues and I have tried to implement everything.
I included Websdk to index.html and still same issues. How hard is it to include one module and everyone keeps getting this issue
Dear @a-bronx,
I hope this message finds you well. I am writing to bring to your attention an issue regarding the compatibility of the @digitalpersona/devices library with the DPUruNet library, specifically within a React environment utilizing the WebSdk.
Recently, I have been working with the @digitalpersona/devices library within a React application to capture fingerprints using the WebSdk. However, I have encountered a compatibility issue when attempting to compare fingerprints obtained using the @digitalpersona/devices library with those stored in another system that utilizes the DPUruNet library.
Upon further investigation, it seems that the base64 representation of the fingerprints obtained from the @digitalpersona/devices library in React is not compatible with the fingerprints stored in the system using the DPUruNet library. As a result, I am unable to perform accurate comparisons or operations involving these fingerprints.
Given that there are numerous fingerprints stored over the years in the system using the DPUruNet library, it is imperative to find a solution to this compatibility issue. Therefore, I would like to inquire if there is a recommended method or utility provided by @digitalpersona/devices to convert fingerprints obtained from the WebSdk in React to a format compatible with those stored in systems using the DPUruNet library.
If there is no existing solution available, I would greatly appreciate any guidance or assistance you can provide in resolving this compatibility issue. Ensuring interoperability between these libraries within a React environment would greatly benefit users like myself who rely on fingerprint data across different systems.
Thank you for your attention to this matter. I look forward to your response and assistance in addressing this compatibility issue.
Best regards,
Omar Hernandez
after having the data in base64 or base64url format with the sampleData. I want to be able to save the data to a database and be able to compare the fingerprint of the people again. I use an api to send the data to my server but I can't compare the users.
Can I use any digital persona fingerprint scanner device to integrate with?
If not, it would be great to mention the list of supported devices in the docs.
[ ] Review module distribution types (UMD/ES5/ES6). Probably ES5 can be deprecated already.
[ ] Review package.json
fields ("module/browser/es2015"). Probably "main" should be removed, as it applicable only to Node modules.. It was reported that bundlers like Vite may be confused.
Hello I already get the data from the reader but I have been looking for how I can enroll and verify the sample but I have not found a way to assert it on a local server can you help me pls!
hello again.
Im trying to get a unique id from my fingerprint reader, but anytime i disconnect and connect my device on any pc and try to get it to log into the console thru getDeviceInfo(deviceId) method, is never the same.
Is it like this on purpose or is something else happening?
I have tried to solve with the suggestions that they show in that issue, and none of them gives me the solution.
I am currently working on an app that integrates React and Electron with Javascript
I have this error in the execution the script in index.html
Blocked script execution in 'data:text/html' ...(path index.html)...
because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.