Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new NFC() hangs on windows 10 #84

Open
fatmatto opened this issue May 28, 2019 · 9 comments
Open

new NFC() hangs on windows 10 #84

fatmatto opened this issue May 28, 2019 · 9 comments
Labels
bug platform: Windows Windows specific issues

Comments

@fatmatto
Copy link

Hello,

I tried the example on the README file on a windows 10 tablet and it hangs on the line:

const nfc = new NFC(); 

Inspecting the code in the node_modules/nfc-pcsc/dist directory I found out that it blocks at the line following line in dist/NFC.js

this.pcsc = (0, _pcsclite.default)()

Which in turns blocks at the line

const p = new PCSCLite()

in @pokusew/pcsclite/lib/pcsclite.js

Is there anything that is required to make the library work on Windows 10?

The system configuration is

node v10.15.3
npm 6.4.1
Windows 10 Enterprise 
@pokusew
Copy link
Owner

pokusew commented May 28, 2019

Hi @fatmatto, it is known issue on Windows that can occur in some situations. See pokusew/node-pcsclite#21.

The example was run on a Windows 10 (Pro) machine that had never had a smart card device plugged in to it. The example seems to run fine on Win 10 machines that have seen a smart card device.

Smart Card Service on Windows is not running by default and is only started when a NFC reader is connected (I tried to change this behavior, but it does not seem to be possible). This had been causing pcsclite (nfc-pcsc) to crash. I (my friend on Windows, I use macOS) did some fixes (pokusew/node-pcsclite@9f871e9) that seemed to fix the issue. Apparently, now in some configurations (e.g. on a machine that had never had a smart card device plugged in to it), the issue you describing occurs.

There is already a PR pokusew/node-pcsclite#22 that is addressing this issue. Unfortunately, I haven't got enough time yet to examine it and eventually merge the fix.

Hope it helps. 🙂


As soon as I get some time (hopefully in a month or so), I try to look into this and merge the PR.

@pokusew pokusew added the bug label May 28, 2019
@fatmatto
Copy link
Author

fatmatto commented May 29, 2019

Hi @pokusew Thank you for the reply, since i already used the NFC reader on that device (with a Windows native app) I assumed it counted as a smart card device previously plugged in :)

While you handle the PR i'll take a look at it and try with a fork of the repo.

Thank you for the repo and for your time :)

@pokusew pokusew added the platform: Windows Windows specific issues label Jan 25, 2020
@cloudhx
Copy link

cloudhx commented Oct 28, 2020

Hello,

I have the same issue with windows 10, I tried to manually start the Smart Card service, but it didn't help.

Is this something that can be fixed?

Thank you very much!

@cloudhx
Copy link

cloudhx commented Dec 1, 2020

Hi,

Just tested the package on Windows 10 and it works well.

Thank you.

@kumarmboxuk
Copy link

Can you explain how did you fix this issue please? :)

@Fossil01
Copy link

Fossil01 commented Jun 23, 2021

I am running into the same issue and it's unclear to me how to fix this.

[EDIT]

I have made sure I am running the latest version of this package. Tried with Node 14, Node 16 and Node 13 and all have the same issue. The program just hangs there forever.

@cloudhx @kumarmboxuk how did you fix this?

@cloudhx
Copy link

cloudhx commented Jul 9, 2021

@Fossil01 @kumarmboxuk I'm using ACR122 reader and as I remembered you need to install the driver for it on Windows.

@esskar
Copy link

esskar commented Apr 26, 2024

The hanging also happens, when trying to run new NFC() while conneting via remote desktop

@adlanarifzr
Copy link

The hanging also happens, when trying to run new NFC() while conneting via remote desktop

You need to make sure the windows device connected to the reader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug platform: Windows Windows specific issues
Projects
None yet
Development

No branches or pull requests

7 participants