HIBPOfflineCheck icon indicating copy to clipboard operation
HIBPOfflineCheck copied to clipboard

KeePass warns HIBPOfflineCheck.dll is incompatible with the current KeePass version

Open gusbrown opened this issue 5 years ago • 7 comments

KeePass version: 2.41 HIBPOfflineCheck version: 1.5.0.0

I'm able dismiss the warning three times and am then able to open KeePass and use the HIBP plugin as expected.

Here is the full message: Keepass

The following plugin is incompatible with the current Keepass version: C:\Users*myprofile*\AppData\Local\KeePass\HIPBOfflineCheck.dll

Have a look at the plugin's website for an appropriate version.

Value cannot be null. Parameter name: prov Keepass at KeePass.UI.ColumnProviderPool.Remove(ColumnProvider prov) at HIBPOfflineCheck.HIBPOfflineCheckExt.Terminate() at HIBPOfflineCheck.HIBPOfflineCheckExtCheckExt.Initialize(IPIuginHost host) at KeePass.Plugins.PluginManager.LoadPlugins(List'1 IFiIes, String strTypeName, String strDisplayFilePath, Boolean bSkipCacheFiIes) Boolean Remove(KeePass.UI.ColumnProvider)

gusbrown avatar Apr 26 '19 18:04 gusbrown

Weird, does this happen every time? Maybe it’s some caching issue.

mihaifm avatar Apr 26 '19 19:04 mihaifm

It displays the same error 3 times each time I launch KeePass. This has persisted through the last two versions of KeePass and HIBPOfflineCheck (but I did not experience after first installing the plugin).

gusbrown avatar Apr 26 '19 19:04 gusbrown

It could be related to .NET versions, since the latest versions of the plugin require .NET 4.5

See this discussion, there’s an advice to comment out older .NET versions from keepass.exe.config, maybe it helps:

https://sourceforge.net/p/keepass/discussion/329220/thread/c00b8889/

mihaifm avatar Apr 28 '19 08:04 mihaifm

I can confirm that issue:

  • Ubuntu 18.04
  • KeePass version: 2.41
  • HIBPOfflineCheck version: 1.5.1 / 1.6.0

Bildschirmfoto von 2019-07-13 17-28-47

boldt avatar Jul 13 '19 15:07 boldt

I installed mono-complete and it starts now.

boldt avatar Jul 13 '19 15:07 boldt

Does not happen under Windows.

samdark avatar Aug 17 '19 16:08 samdark

Hi, I got the same issue on Windows 10 1903 build 18362.388, .NET Framework >=4.8 (true, powershell ReleaseKey >= 528040) and KeePass 2.43.

I put the old plugin files in a subfolder and I had to rename the files in that subfolder in order to avoid KeePass to load them I guess. Because after I renamed them the error was gone.

`$ tree "C:\Program Files (x86)\KeePass Password Safe 2\Plugins" C:\Program Files (x86)\KeePass Password Safe 2\Plugins ├── HaveIBeenPwned.plgx ├── HIBPOfflineCheck.plgx ├── KeePassHIBP.plgx ├── KeePassQuickUnlock.plgx ├── MinLock.plgx ├── old │   ├── _1.3.1_HaveIBeenPwned.plg_x │   ├── _HIBPOfflineCheck.plg_x │   ├── HaveIBeenPwned.plg_x │   └── HIBPOfflineCheck.plg_x ├── OnScreenKeyboard2.plgx └── OnScreenKeyboard2_ReadMe.html

1 directory, 11 files`

2019-10-05 16_46_45-KeePass

2019-10-05 16_48_42-Update Check - KeePass

2019-10-05 16_52_13-HIBP Offline Check

Anyway the plugin seemed to load, whether it was renamed or not, despite the error. But if I renamed those files, then KeePass also loaded the new version of the haveIbeenPwned checker from the top folder, and the error message on HIBPOfflineCheck version: 1.7.1 was gone.

Just for your information.

ggaussling avatar Oct 05 '19 15:10 ggaussling

Is there anything to be done with this issue, or can it be closed?

cristianst85 avatar Dec 29 '22 05:12 cristianst85

It still happend on a clean Ubuntu installation:

  • Ubuntu version: 22.04.1 LTS
  • KeePass version: 2.47
  • HIBPOfflineCheck version: 1.7.9

As before, installing mono-complete makes it working.

boldt avatar Jan 03 '23 09:01 boldt

Hi there!

From what I understand, that's not an issue with the plugin itself, but with some prerequisite (i.e., mono-complete) that is missing. Isn't? Maybe updating the README.md with this info helps?

cristianst85 avatar Jan 03 '23 11:01 cristianst85

Yes, that would help!

boldt avatar Jan 03 '23 12:01 boldt

I don't have or use Ubuntu, but...

I've installed a fresh instance of OpenSUSE Leap 15.4 x64 (with KDE). Via YaST Control Center -> Software -> Software Management -> I can install KeePass 2.49-bp154.1.70, which pulls all mono dependencies, but without the mono-complete package. Also, keepass-plugin-HIBPOfflineCheck 1.7.6-bp154.1.52 is available as a package that installs fine with no additional dependencies being installed or required.

Additionally, I've built the latest version of HIBPOfflineCheck from the master branch and replaced the /usr/lib/keepass/HIBPOfflineCheck.dll, which loads without any issues. I have also tested the plgx version and had the same result - no errors.

mono --version outputs Mono JIT compiler version 6.8.0.105 (tarball Sat Jun 6 02:05:47 UTC 2020)

I find it weird that Ubuntu requires different packages. What version of mono do you have installed?

image

image

image

cristianst85 avatar Jan 03 '23 13:01 cristianst85

From https://www.mono-project.com/download/stable/#download-lin-ubuntu - it appears that the recommendation with mono is to install mono-complete to install everything.

The package mono-complete should be installed to install everything - this should cover most cases of "assembly not found" errors.

cristianst85 avatar Jan 03 '23 14:01 cristianst85

I'll run a test on another Ubuntu system to figure out, which exact package is missed, since the mono-complete seems a bit to much.

boldt avatar Jan 03 '23 14:01 boldt

Okay, we may have posted at the same time. As I said above, it appears that the recommendation with mono is to install mono-complete to install everything (see here). In any case, the issue seems to be with how the packages are built on various Linux distributions, which is a bit out of scope.

Edited to mention this comment.

cristianst85 avatar Jan 03 '23 14:01 cristianst85

What is interesting is if that I build the plugin PLGX with --plgx-prereq-net:4.5 I get this nice error. Which doesn't get away if I install mono-complete.

image

cristianst85 avatar Jan 03 '23 15:01 cristianst85

I have asked Dominik Reichl whether the --plgx-prereq-net build flag is supposed to work with Mono as well, and he said that this was added only in KeePass 2.52 (see his answer here). My idea of adding --plgx-prereq-net:4.5 when creating the PLGX is to make KeePass show a detailed error message to the end-user (instead of a generic plugin incompatibility message). This should work fine on Windows since many probably use a more recent version of KeePass anyway. But on Linux, it breaks the plugin if an older version of KeePass is used (older than the latest version which is 2.52) which will be the most distros I assume.

cristianst85 avatar Jan 03 '23 17:01 cristianst85

I assume, keepass2 on Suse installs more dependend packages than Ubuntu.

mono --version under Ubuntu 22.04:

Mono JIT compiler version 6.8.0.105 (Debian 6.8.0.105+dfsg-3.2 Wed Jun 30 05:34:49 UTC 2021)

Here the dependencies installed by keepass2:

$ apt-cache showpkg keepass2
Package: keepass2
Versions: 
2.47+dfsg-2
[...]
Dependencies: 
2.47+dfsg-2 - mono-runtime (2 3.0~) libgcrypt20 (2 1.8.7) libmono-corlib4.5-cil (2 5.18.0.240) libmono-system-drawing4.0-cil (2 5.12.0.309) libmono-system-security4.0-cil (2 5.18.0.240) libmono-system-windows-forms4.0-cil (2 5.16.0.220) libmono-system-xml4.0-cil (2 4.6.1.3) libmono-system4.0-cil (2 5.18.0.240) libx11-6 (2 2:1.6.0) xsel (0 (null)) keepass2-doc (0 (null)) mono-dmcs (0 (null)) xdotool (0 (null)) 

So, on Ubuntu, it just installs mono-runtime and some dependencies (libmono-).

https://unix.stackexchange.com/questions/282329/is-the-difference-between-mono-runtime-and-mono-complete-related-to-whether-mysq

boldt avatar Jan 03 '23 21:01 boldt

Bildschirmfoto vom 2023-01-03 22-13-44

Observation: It says, compiling. Are keepass plugins compiled on runtime?

Looking into mono-complete, it also installs mono-devel. If I install mono-devel (still a meta package with more than 400 dependencies), this plugin works.

boldt avatar Jan 03 '23 21:01 boldt

The PLGX version of the plugin(s) is(are) compiled once when KeePass loads.

See more at https://keepass.info/help/v2_dev/plg_index.html#plgx.

cristianst85 avatar Jan 03 '23 21:01 cristianst85

For documentation

The compiled plugins can be found here:

~/.local/share/KeePass/PluginCache/

Debugging

Thanks for the link it says:

PLGX debugging. When the command line option --debug is passed and a PLGX plugin fails to compile, the output of all tried compilers is saved to a temporary file.
  • I removed the compiled dll
  • I removed package mono-devel and all its dependencies
  • I added --debug

A log file was created. It says:

error CS0006: Metadata file `System.DirectoryServices.dll' could not be found

boldt avatar Jan 03 '23 21:01 boldt

Indeed HIBPOfflineCheck has a reference to System.DirectoryServices.dll. Not sure why since it builds without it just fine.

cristianst85 avatar Jan 03 '23 21:01 cristianst85

Can you prove me a PLGX without the System.DirectoryServices.dll , so I can test it?

boldt avatar Jan 03 '23 21:01 boldt

I did some cleanup. Removed three unneeded references. You can see the changes on this temporary branch/commit.

You must unzip it first. Otherwise, GitHub won't let me attach the file here.

HIBPOfflineCheck-1.7.9.da9addb.zip

cristianst85 avatar Jan 03 '23 21:01 cristianst85

Yes, it works without mono-devel.

boldt avatar Jan 03 '23 22:01 boldt

What about the mono-complete package, is that still required?

cristianst85 avatar Jan 03 '23 22:01 cristianst85

mono-complete is not required as well.

boldt avatar Jan 03 '23 22:01 boldt

I'll double check your PLGX on another system tomorrow.

boldt avatar Jan 03 '23 22:01 boldt

I assume, keepass2 on Suse installs more dependend packages than Ubuntu.

Probably not relevant anymore, but just for documentation purposes. On OpenSUSE Leap 15.4, when installing KeePass zypper also resolves the following packages.

localhost:~ # zypper in keepass
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following recommended package was automatically selected:
  xdotool

The following 14 NEW packages are going to be installed:
  keepass libgdiplus-devel mono-core mono-data mono-data-oracle mono-data-sqlite mono-devel mono-extras mono-mvc mono-wcf mono-web mono-winforms mono-winfxcore xdotool

14 new packages to install.
Overall download size: 47.1 MiB. Already cached: 0 B. After the operation, additional 205.6 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): n
localhost:~ # 

cristianst85 avatar Jan 03 '23 22:01 cristianst85

So, mono-devel is a dependency of keepass on Suse.

boldt avatar Jan 03 '23 22:01 boldt