mbos/Pass4Win

Error when pressing the button "Key Management" (Windows 10)

Fiyorin opened this issue · 7 comments

david@mango /cygdrive/c/Program Files (x86)/GNU/GnuPG
$ gpg2.exe --version
gpg (GnuPG) 2.0.29 (Gpg4win 2.2.6)
libgcrypt 1.6.4


when i click on the button "Key Management" there's the following error message (below).
i've create a OpenGPG key using the "kleopatra" GUI. is there anything else i need to do? should i initialize "pass" first? i've never used it before. cheers!


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: InvalidArgument=Value of '0' is not valid for 'SelectedIndex'.
Parameter name: SelectedIndex
at System.Windows.Forms.ListBox.set_SelectedIndex(Int32 value)
at Pass4Win.frmKeyManager.treeView1_AfterSelect(Object sender, TreeViewEventArgs e)
at System.Windows.Forms.TreeView.OnAfterSelect(TreeViewEventArgs e)
at System.Windows.Forms.TreeView.TvnSelected(NMTREEVIEW* nmtv)
at System.Windows.Forms.TreeView.WmNotify(Message& m)
at System.Windows.Forms.TreeView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.6.106.0 built by: NETFXREL2STAGE

CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

Pass4Win
Assembly Version: 1.1.2.0
Win32 Version: 1.1.2.0

CodeBase: file:///C:/Program%20Files%20(x86)/Pass4Win/Pass4Win.exe

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.6.79.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System
Assembly Version: 4.0.0.0
Win32 Version: 4.6.79.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.6.93.0 built by: NETFXREL2STAGE

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.6.79.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll

System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.6.79.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.6.79.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

Bugsnag
Assembly Version: 1.2.0.0
Win32 Version: 1.2.0.0

CodeBase: file:///C:/Program%20Files%20(x86)/Pass4Win/Bugsnag.DLL

SimpleConfig
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0

CodeBase: file:///C:/Program%20Files%20(x86)/Pass4Win/SimpleConfig.DLL

Newtonsoft.Json
Assembly Version: 7.0.0.0
Win32 Version: 7.0.1.18622

CodeBase: file:///C:/Program%20Files%20(x86)/Pass4Win/Newtonsoft.Json.DLL

System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.6.79.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll

System.Runtime.Serialization
Assembly Version: 4.0.0.0
Win32 Version: 4.6.79.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll

System.Xml.Linq
Assembly Version: 4.0.0.0
Win32 Version: 4.6.79.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll

LibGit2Sharp
Assembly Version: 0.21.0.176
Win32 Version: 0.21.0.176

CodeBase: file:///C:/Program%20Files%20(x86)/Pass4Win/LibGit2Sharp.DLL

GpgApi
Assembly Version: 1.5.0.0
Win32 Version: 1.5.0.0

CodeBase: file:///C:/Program%20Files%20(x86)/Pass4Win/GpgApi.DLL

Microsoft.CSharp
Assembly Version: 4.0.0.0
Win32 Version: 4.6.79.0

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll

Octokit
Assembly Version: 0.15.0.0
Win32 Version: 0.15.0

CodeBase: file:///C:/Program%20Files%20(x86)/Pass4Win/Octokit.DLL

System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.6.79.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

System.Deployment
Assembly Version: 4.0.0.0
Win32 Version: 4.6.79.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll

Anonymously Hosted DynamicMethods Assembly
Assembly Version: 0.0.0.0
Win32 Version: 4.6.106.0 built by: NETFXREL2STAGE

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll

System.Dynamic
Assembly Version: 4.0.0.0
Win32 Version: 4.6.79.0

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll

System.Net.Http
Assembly Version: 4.0.0.0
Win32 Version: 4.6.79.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll

System.Data.DataSetExtensions
Assembly Version: 4.0.0.0
Win32 Version: 4.6.79.0 built by: NETFXREL2

CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Data.DataSetExtensions/v4.0_4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

mbos commented

Hiya,

So basically this is an error about not finding a key. And yeah that should not cause an exception :-)

Kleopatra on my system never worked (I'm on windows 10) so you might want to try the console:
cd "\Program Files (x86)\GNU\GnuPG"
gpg2.exe --list-secret-keys

Your new key should be listed. If it's not, that's the problem.

Cheers,

mike

mbos commented

Inactive closed

Hi, just wanted to mention, I'm getting this same error. If I run gpg2.exe --list-secret-keys, I see my key listed. Also using Windows 10 here. Created a key using Kleopatra. Thanks.

mbos commented

Hi,
could you please add the logging from typical userdir\Appdata\local\temp\pass4win\pass4win.log. Or you can start pass4win with the -d option to put it in your personal directory.

Thanks.

Hi Mike. I got this working. In my case, I may have tried to run pass4win for the first time before I created the gpg certificate (I used Kleopatra). The problem seemed to be the .gpg-id file in my passwords directory. It was empty. I tried running pass4win with the -r option to reset the config, but I kept using the same passwords directory. I finally edited the .gpg-id file and added the email address for my certificate, and then it started working. Maybe pass4win could detect if the .gpg-id file in the passwords dir is empty, and if so, give the user another chance to select the certificate, and write it to that file, if that makes any sense. Thanks.

mbos commented

That makes sense. Thanks, will add it to the next release!

mbos commented

fixed in source