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

Error when unlocking v2 #9

Open
YoNevelt opened this issue Sep 8, 2022 · 4 comments
Open

Error when unlocking v2 #9

YoNevelt opened this issue Sep 8, 2022 · 4 comments

Comments

@YoNevelt
Copy link

YoNevelt commented Sep 8, 2022

Hi again,
The issue #6 has come up again and I couldn't find a workaround it.
I have a clean install of all necessary files apart from the KeePassRFID.dll as it causes issues straight at the launch of KeePass (compatibility error). Without this DLL but with KeePassRFID.plgx, KeePass starts with no error.
But trying to use the plugin to unlock or set a master key, the "Initialising the type of LibLogicalAccess.liblogicalaccess_libraryPINVOKE caused exception." error comes up. I have a 64bit system installed and the latest KeePass is on the default path (c:\Program Files (x86)\KeePass Password Safe 2).
Updated liblogicalaccess-swig-bin files on environmental PATH:

  • c:\Program Files\Common Files\liblogicalaccess-swig-bin_x86_64
  • c:\Program Files (x86)\Common Files\liblogicalaccess-swig-bin_x86

Any idea where it could have gone wrong?

@Maxhy
Copy link
Member

Maxhy commented Sep 9, 2022

You should only add to PATH either x86 or x64 dlls depending of your runing environment for Keepass (probably x64), not both.
If this still fail please try to install VC++ runtime (https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170) and be sure the SmartCard service is properly running.

@YoNevelt
Copy link
Author

YoNevelt commented Sep 17, 2022

Thank you for reaching back. I've done the following steps:

  • installed the VC++ runtime (both x86 and x64, system restarted as requested by the installer)
  • only x86 lib on PATH (KeePass is installed in the "Program Files (x86)" folder by default)
  • KeePassRFID.dll and keepassrfid.plgx files in Plugins folder
  • making sure SCardSrv (it was running) and ScDeviceEnum (started manually if ever would be needed) services are running

And yet, the error message is the same, according to the message, the system can't find a file, a dependency is missing (mscorlib) which is a part of the .NET therefore I reinstalled all .NET packages. I had these installed already but just for the sake of mind I "repaired" all.

I was going to try to install the KeePass into the x64 folder but the setup doesn't allow me to change the destination folder as KeePass is already installed. Maybe I should reinstall it from scratch...

I did, and used the x64 path for the installation and the error is the same. I installed the KeePass on a laptop as well following the same steps, only 64bit on PATH, etc... exactly the same error. My main computer is running Win11 Pro, the laptop has Win10 Pro on. I even tried to put the liblogicalaccess-swig-bin files on a path without spaces (some is sensitive for that). No change.

According to the error message, the mscorlib wasn't found. I searched the file and I found like 92 copies of it in various paths including .NET installations, WinSxS, etc. I tried to copy many of these versions into the liblogicalaccess-swig-bin folder and also the Plugins folder... didn't make any difference. Using a regular text reader I checked the KeePassRFID.dll and found this: "mscorlib, Version=4.0.0.0" ... I assumend the DLL requires the v4 of the mscorlib so I was searching for that, too. No luck. So I just don't know where to go now.

@Maxhy
Copy link
Member

Maxhy commented Nov 7, 2022

@YoNevelt
Copy link
Author

YoNevelt commented Nov 9, 2022

Hi, I have installed both and nothing changed but some numbers in the previous error message:
new: "LibLogicalAccessNetCE, Version=2.4.2.0"
previous: 2.4.0.0
new: PublicKeyToken=0090401ae095f62c
previous: 7a82f2d3e51d7690

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

No branches or pull requests

2 participants