Menu

Error message "Unhandled exception has occurred ..." - KP Portable 2.31 Windows 7

John
2016-04-04
2016-04-05
  • John

    John - 2016-04-04

    I am reasonably computer literate but I am struggling to install this and I am now getting the above error message.

    I have KeePass 2.31 Portable running under W7 located at C:\Users\John\Documents\Backup\KeePass\KP_A.

    I found the instructions in the TXT file somewhat confusing as I did not understand the concepts behind the actions, and I think I misunderstood "Starting with v2.1 it has its own credentials built in" as meaning I did not have to do anything to Google Drive, so I did not do anything to it.

    I followed the other instructions, located the strangely named ...\AppData\Local\KeePass\PluginCache\xxx.xxx folder, renamed it to GoogleSyncPlugin and copied it to C:...\KP_A\, where it sits in the same folder as KeePass.exe and the config file.

    I got the error message when trying to upload the file to Google Drive.

    I then discovered Kaa Ching's instructions and realised I had to do something to Google Drive, so I logged on, created a Project, enabled the Drive API, and obtained a Client ID and a Client Secret. I went Tools > Google Sync > Config, ticked the Custom box, and added the Client ID and Client Secret to the config page. It already had the UUID from the Google Drive entry in KeePass, and I checked and the UUID is at the bottom of the config.xml file. This was also non-trivial as the user interface to Google Drive has obviously changed and none of the things mentioned were where they used to be.

    I still get the same error message, namely:

    *Unhandled exception has occurred in your application. If you click continue ...

    Could not load file or assembly "Google.Apis.Authenticatuion.OAuth2.Version=1.2.4696.27633, Culture=neutral, PublicKeyToken-null" or one of its dependencies. The system cannot find the file specified.

    When I click the Details button I get:

    See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
    
    ************** Exception Text **************
    System.IO.FileNotFoundException: Could not load file or assembly 'Google.Apis.Authentication.OAuth2, Version=1.2.4696.27633, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
    File name: 'Google.Apis.Authentication.OAuth2, Version=1.2.4696.27633, Culture=neutral, PublicKeyToken=null'
       at GoogleSyncPlugin.GoogleSyncPluginExt.syncWithGoogle(SyncCommand syncCommand, Boolean autoSync)
       at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
       at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
       at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ToolStrip.WndProc(Message& m)
       at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 4.0.0.0
        Win32 Version: 4.6.1055.0 built by: NETFXREL2
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
    ----------------------------------------
    KeePass
        Assembly Version: 2.31.0.27913
        Win32 Version: 2.31.0.0
        CodeBase: file:///C:/Users/John/Documents/Backup/KeePass/KP_A/KeePass.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 4.0.0.0
        Win32 Version: 4.6.1055.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.1055.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.1068.2 built by: NETFXREL3STAGE
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Xml
        Assembly Version: 4.0.0.0
        Win32 Version: 4.6.1067.0 built by: NETFXREL3STAGE
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Configuration
        Assembly Version: 4.0.0.0
        Win32 Version: 4.6.1055.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.Core
        Assembly Version: 4.0.0.0
        Win32 Version: 4.6.1055.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
    ----------------------------------------
    GoogleSyncPlugin
        Assembly Version: 2.1.2.0
        Win32 Version: 2.1.2.0
        CodeBase: file:///C:/Users/John/Documents/Backup/KeePass/KP_A/GoogleSyncPlugin/GoogleSyncPlugin.DLL
    ----------------------------------------
    KeePass.XmlSerializers
        Assembly Version: 2.31.0.27913
        Win32 Version: 2.31.0.27913
        CodeBase: file:///C:/Users/John/Documents/Backup/KeePass/KP_A/KeePass.XmlSerializers.DLL
    ----------------------------------------
    System.Security
        Assembly Version: 4.0.0.0
        Win32 Version: 4.6.1073.0 built by: NETFXREL3STAGE
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Security/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Security.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:
    
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    
    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.
    
    I l
    

    Any help will be greatly appreciated.

     

    Last edit: John 2016-04-04
    • Uranium235

      Uranium235 - 2016-04-04

      You do not need to do anything to Google Drive, i.e. you do not need to create a project and enable the Drive API etc.

      You only need to do that if you want to use your own credentials for some reason. Otherwise just dont't enable "Custom OAuth 2.0 Credentials" in the Plugin Settings (default).

      The problem you have has nothing to do with the credentials.

      I assume the "strangely named folder" you copied was indeed the folder for the GoogleSyncPlugin, right?

      Did you delete the plgx file in the KeePass Directory after copying the folder? (you must do that)
      Did you delete that folder in its original location? (should not make a difference, but hey...)
      Does the Plugin work if you just use the plgx file?

      The folder should contain 6 files totaling 2.032.640 bytes.

       
  • John

    John - 2016-04-05

    Many thanks for your reply, especially as it appears it was a "senior moment" on my part :-(

    I had done all of the things you asked, but you gave me an idea. I had copied the folder with the files to the folder where KeePass.exe is. I wondered if I should have copied the .dll files in the folder to the folder where KeePass.exe is.

    Sure enough, once I put the .dll files in the same folder as KeePass.exe, it magically sprung to life!

    It now works, but I now have two Google Sync Plugin entries under Tools so I need to do some cleaning up.

    Thanks again.

     
  • John

    John - 2016-04-05

    I had already deleted the GoogleSyncPlugin folder in AppData. I now deleted it from the folder with KeePass, leaving all its .dll in the same folder as KeePass. I disabled the Custom... in Configuration and all is working excellently, and my second instance of Tools > Google Sync Plugin has disappeared.

    I am still a bit confused as the readme.txt file (for Portable) says "3. Inside one of the cryptically named folders is a file named GoogleSyncPlugin.dll. Copy that folder with all its files into the KeePass folder of your Portable KeePass installation. You may rename the cryptic folder name to "GoogleSyncPlugin"."

    Anyway, it's working. Whether it is the folder or the files I need to put in the folder with KeePass.exe is merely a matter of paths, so I am quite happy.

    I shall next try syncing to/from my Android phone as I read somewhere that it works.

    I shall then try syncing my second instance of KeePass. I have one instance for less secure passwords (forums, shopping sites etc); and one instance, with a much more secure password, for financial stuff. I cannot see any problems as the database files are named differently so, ever the optimist, I think it will work fine.

     
    • Uranium235

      Uranium235 - 2016-04-05

      The instructions for the portable mode indeed were meant for the files to be inside a subfolder, not the KeePass directory itself.

      I don't know why you need to have the .dll files in the KeePass directory directly instead of having all files inside the subfolder with the plugin. It works fine that way with my portable copy.

      I use KeePass2Android as well as several instances of KeePass with this Plugin on multiple computers and a portable Version on a USB-Stick. Am very happy with that setup.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.