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

Example wont run on Windows 10, stuck in while-loop? #21

Open
pwik opened this issue Mar 16, 2019 · 5 comments
Open

Example wont run on Windows 10, stuck in while-loop? #21

pwik opened this issue Mar 16, 2019 · 5 comments
Labels
platform: Windows Windows specific issues

Comments

@pwik
Copy link

pwik commented Mar 16, 2019

Operating system: Windows 10 Pro
Node version: 11.6.0

The example program does not seem to run on Windows 10. It starts and gets stuck right before calling the imported pcsclite() function.

Quickly looking over the source code I think there may be a problem when calling SCardEstablishContext in the while-loop (postServiceCheck) in the src/pcsclite.cpp file (line 68). It may be the case that the library cannot properly start the smart card resource manager service or that it cannot establish a context to it for some reason. The library then gets stuck in the while loop preventing the example from running. I haven't properly debugged it, but that seems like a likely place for it to get stuck.

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.

Is there a workaround for this issue?

@pwik
Copy link
Author

pwik commented Mar 25, 2019

Added pull request for a potential fix #22.

@petrzjunior
Copy link

Hi @pwik, yesterday version 0.6.0 was released containing all sorts of bugfixes for the newest versions of Node.js as well as fixing the provided example usage. Can you please try again running your code? The library is running flawlessly on my Windows 10 machine now. I'll be happy to help you!

@ChrisK2
Copy link

ChrisK2 commented Jun 15, 2020

I still have issues on 0.6.0 when I load the lib on devices that never had a Reader attached. I get the UAC-Prompt to change some windows service setting and then my application just hangs.

@ghost
Copy link

ghost commented Jun 23, 2021

My application still hangs as well. Referring: pokusew/nfc-pcsc#84

@ghost
Copy link

ghost commented Nov 30, 2021

Any updates on this? @petrzjunior @pokusew

[EDIT] I am running Node 17, but the same issue appears with Node 13.

[EDIT 2] I am working on a Mac, and was connected to a Windows 10 machine over RDP WITHOUT using smartcard redirection. The Windows 10 machine has it's own ACR122u directly connected to it via USB.

I decided to test locally without RDP and it works. So RDP is still doing something that's blocking PCSC from working properly.

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

No branches or pull requests

4 participants