Menu

object Reference Not Set on Synchronize

Help
2014-08-16
2014-09-30
  • RIck Bullen

    RIck Bullen - 2014-08-16

    On attempting to synchronize between machines on a home network we got a dialog box with three lines:
    1. the full path of the database file on the other computer that we wish to synch to
    2. "Import failed."
    3. "Object reference not set to an instance of an object"

     
  • wellread1

    wellread1 - 2014-08-17

    Please provide some additional details:

    • What operating system are you using?
    • What version of KeePass are you using?
    • Are any plugins installed?
    • Where is the KeePass installation located (e.g. local drive, network drive)?
    • How are you initiating the sync (e.g. via a trigger, or 'File>Synchronize>Synchronize with File...', or 'File>Synchronize>Synchronize with URL...'?
    • Which database is 'active' (open) when you sync (e.g. local or network)?
    • Is more that one database open in the Workspace?
    • Are both databases OK (e.g. Can they be opened)?

    If you are not using the most recent version of KeePass 2.x try upgrading.

     
  • RIck Bullen

    RIck Bullen - 2014-08-17

    Both machines run Windows 7.
    Both machine run Keepass 2.7
    No plugins are installed
    The Keepass install is on the local drive on both machines
    Using File>Synchronize>with File to initialize synch
    Local drive is open when initializing the synch
    Only one db is open
    Both db's are ok, they can be opened.

     
  • wellread1

    wellread1 - 2014-08-17

    Nothing is obviously wrong with the setup or procedure. (I assume KeePass 2.7 means KeePass 2.27). It is possible that there is something wrong with the Windows .NET installation, or there is a subtle problem with the KeePass configuration, or with the production database(s). You could try the following:

    Set KeePass to its default settings.

    Exit KeePass, then rename the active keepass.config.xml to keepass.config.old.xml. When KeePass is restarted it will create a new keepass.config.xml with default settings.

    If you are using the installed version of KeePass the active keepass.config.xml is probably in %APPDATA%/Keepass. If you are using the portable version of keepass the active keepass.config.xml is probably in the KeePass program directory. See http://keepass.info/help/base/configuration.html for details.

    Retry the synchronization. If the synchronization still fails there was nothing wrong with the settings (take care to verify that you updated the active keepass.config.xml). You can restore your old settings by copying them back when KeePass is NOT running.

    Conduct a Synchronization test using a test database pair.

    Create a new local test database and make a local copy. Try synchronizing the test database with the local test database copy.

    • If the local test database synchronization fails, there might be something wrong with the Windows .NET installation, but try rebooting the computer first. Also try the test on the alternate computer (if the local test fails on both computers it does not seem likely that the problem is .NET but you could still try the repair or update). If the local sync continues to fail try:
    • If the local test database synchronization succeeds, move the copy of the test database to the networked location and synchronize.
      • If the network synchronization with test databases fails, but the local test succeeded, something might be wrong with the network configuration.
      • If the network synchronization with test databases succeeds, then there is probably something subtly wrong with the production database(s). Make a copy of each production database and try synchronizing the copy with the original to determine if one or both test databases is damaged. There are several repair strategies you can attempt if you determine a production database is the source of the problem.
     

    Last edit: wellread1 2014-08-17
  • leicray

    leicray - 2014-08-20

    I too am experiencing exactly the same problem. To make matters even simpler, both databases are on the same computer and were created with the same version (2.27) of KeePass. In case it's relevant, one database is on the computer's hard drive and the other is on a USB flash drive. I have updated .NET to 4.5.2 to no avail.

    I see exactly the same behaviour on another computer.

     
  • Paul

    Paul - 2014-08-20

    leicray, are you able to reproduce this with test databases? If so you could upload the databases for us to test.

    cheers, Paul

     
  • Haddock

    Haddock - 2014-08-23

    I had the same problem, and I maybe found what caused it: On one computer I installed the beta version of Visual Studio 2014 which comes with .NET framework 4.5.3 SDK, while the other computer have only .NET framework 4.5.1.

    When I made a synchronization on one computer, I could not synchronize anymore on the other , even if I tried to reset everything and/or copy manually the database.

    So I removed VS2014 and 4.5.3 framework and got back to 4.5.1, then I copy manually the database file from the other computer (otherwise the error was still there, the database file with 4.5.3 framework seems corrupted).
    I restart the computer and voila, synchronization is now working on both computers.

     
  • Dominik Reichl

    Dominik Reichl - 2014-08-23

    A pair of sample databases for reproducing the issue would be great.

    Best regards,
    Dominik

     
  • drm2525

    drm2525 - 2014-09-28

    I have the same problem using Windows 7 64 bit (with all current updates) when trying to sync.

    So, I downloaded KeePass v2.27 (zip version) today and then created two new kdbx files and saved each as created (without any editing). I then tried to sync the two newly created kdbx files.

    The synch fails with the "Object reference not set to an instance of an object" error. However, I can see that the sync did add the second files contents to the first.

    I've attached the two newly created kdbx sample files that give the error. The password for each is "1234"

    I have MS Net framework 4.51 installed.

     
  • Paul

    Paul - 2014-09-29

    I can confirm the behaviour with the attached files.
    After a sync the file in KeePass has the updates from the file on disk.
    Neither file has been saved although KeePass shows no changes.

    cheers, Paul

     
  • Dominik Reichl

    Dominik Reichl - 2014-09-29

    This problem has already been fixed.

    Here's the latest development snapshot for testing:
    http://keepass.info/filepool/KeePass_140929.zip

    Best regards,
    Dominik

     
  • Paul

    Paul - 2014-09-30

    All better with the snapshot.

    cheers, Paul

     

Log in to post a comment.