Menu

Unhandled exception when disabling sync

2016-11-22
2018-10-31
  • fritzophrenic

    fritzophrenic - 2016-11-22

    I currently have configured to automatically sync on both open and save. I wanted to temporarily disable sync on open so that I could restore a backup copy of the database.

    If no database is open, I cannot disable sync. Trying to open the KPGoogleSync configuration without an open database shows an error message, "You first need to open a database."

    To fix this I tried opening a local database file which does not have a stored KPGoogleSync configuration (it is for local-only passwords). I can access the KPGoogleSync configuration, but after I select "Disabled" in the Auto Sync menu, and press OK, I get a message: "Remove Google Account association from KeePass config?". If I select "No" then nothing happens at all; the configuration dialog remains open. If I cancel, sync is not disabled.

    If instead of "No" I select "Yes" for removing the Google Account association, then I get an unhandled exception:

    System.NullReferenceException: Object reference not set to an instance of an object.
       at GoogleSyncPlugin.GoogleSyncPluginExt.AskForConfiguration()
       at GoogleSyncPlugin.GoogleSyncPluginExt.OnConfigure(Object sender, 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)
    

    I would like a way to disable sync prior to opening my database, to prevent the automatic sync on open when needed! And needless to say, the plugin shouldn't crash.

     
    • Uranium235

      Uranium235 - 2016-11-23

      You can temporarily disable sync by holding down the Shift-Key while opening the database.

       
    • Uranium235

      Uranium235 - 2016-11-27

      You could also manually edit the KeePass.config.xml and remove the Item with the Key GoogleSync.AutoSync

      I fixed the NullReferenceException problem and the fix will be in the next release.

       
  • Andrew Russell

    Andrew Russell - 2018-10-31

    There seems to be a regresstion/complexity to this error on Keepass 2.40, GoogleSyncPlugin-3.0.1.

    If there is NO google account in DB, therefore no uuid for it.
    Then after trying to setup the OAuth.
    It asks to remove the Google Account association, then I get the same unhandled exception:

    ** Exception Text **
    System.NullReferenceException: Object reference not set to an instance of an object.
    at GoogleSyncPlugin.GoogleSyncPluginExt.AskForConfiguration()
    at GoogleSyncPlugin.GoogleSyncPluginExt.OnConfigure(Object sender, EventArgs e)
    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)

     

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.