Setting up gatekeeper on a fresh instance throws a CardConnectionExpection. I assume this might happen because i have now usb card reader attached - still this should be handled gracefully.
Steps to reproduce:
git clone ...
cd gatekeeper
nix develop .
uv sync
uv run fastapi dev
The following error is logged during startup:
ERROR:app.services.scanner:Error in scan function: Service not available. (0x8010001D)
Traceback (most recent call last):
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 267, in _scan_loop
card_content = self._read_card()
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 283, in _read_card
cardservice = getCardService(3)
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 46, in getCardService
cardrequest = CardRequest(timeout=timeout, cardType=cardtype)
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/CardRequest.py", line 66, in __init__
self.pcsccardrequest = PCSCCardRequest(
~~~~~~~~~~~~~~~^
newcardonly, readers, cardType, cardServiceClass, timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/pcsc/PCSCCardRequest.py", line 107, in __init__
raise CardConnectionException(hresult=hresult)
smartcard.Exceptions.CardConnectionException: Service not available. (0x8010001D)
ERROR:app.services.scanner:Error in scan function: Service not available. (0x8010001D)
Traceback (most recent call last):
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 267, in _scan_loop
card_content = self._read_card()
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 283, in _read_card
cardservice = getCardService(3)
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 46, in getCardService
cardrequest = CardRequest(timeout=timeout, cardType=cardtype)
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/CardRequest.py", line 66, in __init__
self.pcsccardrequest = PCSCCardRequest(
~~~~~~~~~~~~~~~^
newcardonly, readers, cardType, cardServiceClass, timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/pcsc/PCSCCardRequest.py", line 107, in __init__
raise CardConnectionException(hresult=hresult)
smartcard.Exceptions.CardConnectionException: Service not available. (0x8010001D)
ERROR:app.services.scanner:Error in scan function: Service not available. (0x8010001D)
Traceback (most recent call last):
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 267, in _scan_loop
card_content = self._read_card()
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 283, in _read_card
cardservice = getCardService(3)
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 46, in getCardService
cardrequest = CardRequest(timeout=timeout, cardType=cardtype)
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/CardRequest.py", line 66, in __init__
self.pcsccardrequest = PCSCCardRequest(
~~~~~~~~~~~~~~~^
newcardonly, readers, cardType, cardServiceClass, timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/pcsc/PCSCCardRequest.py", line 107, in __init__
raise CardConnectionException(hresult=hresult)
smartcard.Exceptions.CardConnectionException: Service not available. (0x8010001D)
ERROR:app.services.scanner:Error in scan function: Service not available. (0x8010001D)
Traceback (most recent call last):
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 267, in _scan_loop
card_content = self._read_card()
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 283, in _read_card
cardservice = getCardService(3)
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 46, in getCardService
cardrequest = CardRequest(timeout=timeout, cardType=cardtype)
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/CardRequest.py", line 66, in __init__
self.pcsccardrequest = PCSCCardRequest(
~~~~~~~~~~~~~~~^
newcardonly, readers, cardType, cardServiceClass, timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/pcsc/PCSCCardRequest.py", line 107, in __init__
raise CardConnectionException(hresult=hresult)
smartcard.Exceptions.CardConnectionException: Service not available. (0x8010001D)
ERROR:app.services.scanner:Error in scan function: Service not available. (0x8010001D)
Traceback (most recent call last):
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 267, in _scan_loop
card_content = self._read_card()
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 283, in _read_card
cardservice = getCardService(3)
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 46, in getCardService
cardrequest = CardRequest(timeout=timeout, cardType=cardtype)
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/CardRequest.py", line 66, in __init__
self.pcsccardrequest = PCSCCardRequest(
~~~~~~~~~~~~~~~^
newcardonly, readers, cardType, cardServiceClass, timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/pcsc/PCSCCardRequest.py", line 107, in __init__
raise CardConnectionException(hresult=hresult)
smartcard.Exceptions.CardConnectionException: Service not available. (0x8010001D)
ERROR:app.services.scanner:Error in scan function: Service not available. (0x8010001D)
Traceback (most recent call last):
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 267, in _scan_loop
card_content = self._read_card()
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 283, in _read_card
cardservice = getCardService(3)
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 46, in getCardService
cardrequest = CardRequest(timeout=timeout, cardType=cardtype)
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/CardRequest.py", line 66, in __init__
self.pcsccardrequest = PCSCCardRequest(
~~~~~~~~~~~~~~~^
newcardonly, readers, cardType, cardServiceClass, timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/pcsc/PCSCCardRequest.py", line 107, in __init__
raise CardConnectionException(hresult=hresult)
smartcard.Exceptions.CardConnectionException: Service not available. (0x8010001D)
Before this is logged too:
CRITICAL:app.main:MIFARE APP MASTER KEY not found!
CRITICAL:app.main:Writing and reading cards is disabled!
Setting up gatekeeper on a fresh instance throws a CardConnectionExpection. I assume this might happen because i have now usb card reader attached - still this should be handled gracefully.
Steps to reproduce:
```bash
git clone ...
cd gatekeeper
nix develop .
uv sync
uv run fastapi dev
```
The following error is logged during startup:
```
ERROR:app.services.scanner:Error in scan function: Service not available. (0x8010001D)
Traceback (most recent call last):
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 267, in _scan_loop
card_content = self._read_card()
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 283, in _read_card
cardservice = getCardService(3)
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 46, in getCardService
cardrequest = CardRequest(timeout=timeout, cardType=cardtype)
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/CardRequest.py", line 66, in __init__
self.pcsccardrequest = PCSCCardRequest(
~~~~~~~~~~~~~~~^
newcardonly, readers, cardType, cardServiceClass, timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/pcsc/PCSCCardRequest.py", line 107, in __init__
raise CardConnectionException(hresult=hresult)
smartcard.Exceptions.CardConnectionException: Service not available. (0x8010001D)
ERROR:app.services.scanner:Error in scan function: Service not available. (0x8010001D)
Traceback (most recent call last):
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 267, in _scan_loop
card_content = self._read_card()
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 283, in _read_card
cardservice = getCardService(3)
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 46, in getCardService
cardrequest = CardRequest(timeout=timeout, cardType=cardtype)
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/CardRequest.py", line 66, in __init__
self.pcsccardrequest = PCSCCardRequest(
~~~~~~~~~~~~~~~^
newcardonly, readers, cardType, cardServiceClass, timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/pcsc/PCSCCardRequest.py", line 107, in __init__
raise CardConnectionException(hresult=hresult)
smartcard.Exceptions.CardConnectionException: Service not available. (0x8010001D)
ERROR:app.services.scanner:Error in scan function: Service not available. (0x8010001D)
Traceback (most recent call last):
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 267, in _scan_loop
card_content = self._read_card()
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 283, in _read_card
cardservice = getCardService(3)
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 46, in getCardService
cardrequest = CardRequest(timeout=timeout, cardType=cardtype)
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/CardRequest.py", line 66, in __init__
self.pcsccardrequest = PCSCCardRequest(
~~~~~~~~~~~~~~~^
newcardonly, readers, cardType, cardServiceClass, timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/pcsc/PCSCCardRequest.py", line 107, in __init__
raise CardConnectionException(hresult=hresult)
smartcard.Exceptions.CardConnectionException: Service not available. (0x8010001D)
ERROR:app.services.scanner:Error in scan function: Service not available. (0x8010001D)
Traceback (most recent call last):
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 267, in _scan_loop
card_content = self._read_card()
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 283, in _read_card
cardservice = getCardService(3)
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 46, in getCardService
cardrequest = CardRequest(timeout=timeout, cardType=cardtype)
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/CardRequest.py", line 66, in __init__
self.pcsccardrequest = PCSCCardRequest(
~~~~~~~~~~~~~~~^
newcardonly, readers, cardType, cardServiceClass, timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/pcsc/PCSCCardRequest.py", line 107, in __init__
raise CardConnectionException(hresult=hresult)
smartcard.Exceptions.CardConnectionException: Service not available. (0x8010001D)
ERROR:app.services.scanner:Error in scan function: Service not available. (0x8010001D)
Traceback (most recent call last):
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 267, in _scan_loop
card_content = self._read_card()
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 283, in _read_card
cardservice = getCardService(3)
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 46, in getCardService
cardrequest = CardRequest(timeout=timeout, cardType=cardtype)
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/CardRequest.py", line 66, in __init__
self.pcsccardrequest = PCSCCardRequest(
~~~~~~~~~~~~~~~^
newcardonly, readers, cardType, cardServiceClass, timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/pcsc/PCSCCardRequest.py", line 107, in __init__
raise CardConnectionException(hresult=hresult)
smartcard.Exceptions.CardConnectionException: Service not available. (0x8010001D)
ERROR:app.services.scanner:Error in scan function: Service not available. (0x8010001D)
Traceback (most recent call last):
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 267, in _scan_loop
card_content = self._read_card()
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 283, in _read_card
cardservice = getCardService(3)
File "/home/kalipso/proggn/malobeo/gatekeeper/app/services/scanner.py", line 46, in getCardService
cardrequest = CardRequest(timeout=timeout, cardType=cardtype)
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/CardRequest.py", line 66, in __init__
self.pcsccardrequest = PCSCCardRequest(
~~~~~~~~~~~~~~~^
newcardonly, readers, cardType, cardServiceClass, timeout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/home/kalipso/proggn/malobeo/gatekeeper/.venv/lib/python3.13/site-packages/smartcard/pcsc/PCSCCardRequest.py", line 107, in __init__
raise CardConnectionException(hresult=hresult)
smartcard.Exceptions.CardConnectionException: Service not available. (0x8010001D)
```
Before this is logged too:
```
CRITICAL:app.main:MIFARE APP MASTER KEY not found!
CRITICAL:app.main:Writing and reading cards is disabled!
```
ahtlon
was assigned by kalipso2026-06-12 11:46:57 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Setting up gatekeeper on a fresh instance throws a CardConnectionExpection. I assume this might happen because i have now usb card reader attached - still this should be handled gracefully.
Steps to reproduce:
The following error is logged during startup:
Before this is logged too:
The
CRITICAL:app.main:MIFARE APP MASTER KEY not found!is gone after i did acp .env.example .envStart the app with
DISABLE_CARDS=1 uv run fastapi devto disable the background scanner