Description of problem: Unhandled Exception when launching Keepass [rhodes@fedora ~]$ keepass Unhandled Exception: System.TypeLoadException: Error verifying KeePass.Program:Main (string[]): Could not load type KeePass.Program at 0x0001 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Error verifying KeePass.Program:Main (string[]): Could not load type KeePass.Program at 0x0001 Version-Release number of selected component (if applicable): keepass-2.41-2.fc30.x86_64 mono-core-5.18.1-2.fc30.x86_64 How reproducible: Base install, install keepass, launch keepass Steps to Reproduce: 1. Base install 2. Install keepass 3. Launch keepass Actual results: Unhandled Exception: System.TypeLoadException: Error verifying KeePass.Program:Main (string[]): Could not load type KeePass.Program at 0x0001 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Error verifying KeePass.Program:Main (string[]): Could not load type KeePass.Program at 0x0001 Expected results: Keepass GUI window Additional info: This may be an issue with the mono package, which keepass run under.
Workaround: sudo yum install mono-winforms
In Fedora 30, package mono-devel provides "mono(System.Windows.Forms) = 4.0.0.0" (amongst others). This doesn't seem correct, and causes mono-devel to be installed in place of mono-winforms.
Installing mono-winforms has resolved the issue. My original keepass install did pick up mono-devel, but not mono-winforms. Resolving the dependency should be the solution. Thanks...
It seemed to me that dropping the patch mono-5.10.0-find-provides.patch should fix this, but I found that that didn't help. The spec file calls both /usr/lib/rpm/redhat/find-provides and %{buildroot}%{_bindir}/mono-find-provides to gather provides. It turns out that /usr/lib/rpm/redhat/find-provides calls /usr/lib/rpm/rpmdeps which calls /usr/lib/rpm/mono-find-provides. This /usr/lib/rpm/mono-find-provides is bundled with the RPM source and hasn't been updated for a decade: https://github.com/rpm-software-management/rpm/blob/master/scripts/mono-find-provides
mono-find-provides is really old, and probably needs a rewrite. directhex, the Debian packager at Microsoft, has complained about mono-find-provides before because it makes it difficult to build the Xamarin Mono rpm packages. I cannot find a quote anymore. I think this is how upstream builds Mono for Fedora/RHEL/CentOS: https://github.com/mono/linux-packaging-mono/blob/centos/mono-core.spec It does use mono-find-provides, but also hard codes a lot of Provides. For this specific issue with keepass, I recommend to add a specific Requires for the mono-winforms package instead of or additional to mono(System.Windows.Forms).
(In reply to Timotheus Pokorra from comment #5) > mono-find-provides is really old, and probably needs a rewrite. > directhex, the Debian packager at Microsoft, has complained about > mono-find-provides before because it makes it difficult to build the Xamarin > Mono rpm packages. I cannot find a quote anymore. Seems relevant: https://github.com/mono/mono/issues/14090 > For this specific issue with keepass, I recommend to add a specific Requires > for the mono-winforms package instead of or additional to > mono(System.Windows.Forms). I will do that, but I imagine that other packages will run into similar problems.
I realized now, that the problem is not in the mono-find-provides script. I created a new bug 1704560 for Mono.
*** Bug 1705281 has been marked as a duplicate of this bug. ***
keepass-2.41-3.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-ca279b1c50
keepass-2.41-3.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-ca279b1c50
keepass-2.41-3.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.