Menu

sometimes sync, sometimes creates new file

crazyfoxx
2014-07-09
2014-11-05
  • crazyfoxx

    crazyfoxx - 2014-07-09

    Hello, I was able to set up the sync plugin on Windows. However, sometimes it syncs the existing file on google drive, and sometimes it creates a new file. Anyone else experiencing this? Any advice? Thanks for your help.

     
  • crazyfoxx

    crazyfoxx - 2014-09-03

    UPDATE.
    I'm still experiencing this issue. I have KeePass and the Google Sync plugin installed on several machines. However, each time I use the sync button, it uploads a new file instead. Is this the intended behavior?

    Other than than, great plug-in. Thanks!

     
  • Danyal

    Danyal - 2014-10-15

    No that is not the intended behavior. It should be updating the original file only on Google Drive.
    Google maintains revisions as the file is updated, it does not create new files.

    Please try these steps - important - please backup all database files that have been created by downloading them to your computer

    1. Once safely backed up to your computer, delete all KeePass database files from Google Drive
    2. Make sure to go to Trash folder in Google Drive and clear it - important - you might have other files in trash you might want to keep - if so - you can select only KeePass related files and select "delete forever" option.
      • Assuming your main KeePass database file is named Database.kdbx, you should have no Database.kdbx files on your Google Drive after this step.
    3. Upload your active Database.kdbx file to Google Drive manually - the one KeePass is currently using - not the ones you downloaded for backup
    4. Try doing a sync now
     
  • crazyfoxx

    crazyfoxx - 2014-11-05

    Thanks for your response.

    I am still seeing the issue, though. It worked fine for several syncs yesterday - then this morning when I tried to sync again, it created a new file instead.

    These are the steps I took:
    -remove all instances of .kdbx files from google drive (even those in trash).
    -upload active database to google drive root.
    -run sync.

    As I mentioned, sometimes it will sync correctly and sometimes it will create a new file. I can't seem to find a pattern as to when/why.

    Awesome plugin. Any help you can provide on this is much appreciated.

     
    • Uranium235

      Uranium235 - 2014-11-05

      Please try agin with v2.0 if you haven't.
      There have been changes to the method responsible for finding existing files on your Google Drive. It now does make sure not to also look in the Trash folder as well as making sure the found file is unique.

      The Plugin creates new files whenever it does not find a file with the same name. I can think of 2 scenarios now, why your problem might happen:

      1. There is a timeout or miscommunication with the Google making the Plugin think there is no file. But errors here should throw an exception and lead to a complete fail.
      2. The old Plugin found multiple files, but the 1st file found was in the Trash folder. When trying to update a file in Trash, Google automatically creates a new file. That is pure speculation on my part. Haven't tested that.

      But if the latter is the case, v2.0 will fix your problem.

       
  • crazyfoxx

    crazyfoxx - 2014-11-05

    I noticed that v2.0 was available so I installed that. Instructions were clear and easy to follow. Everything went well. However...

    Even though keepass reports the sync as completed (in the status bar after a save), the file is NOT in google drive. I even tried 'upload', which once again, keepass reports as successful.

    This is really weird because the developer console shows that each time I hit save in keepass, there is a successful api request.

    But the file is not in drive. I looked/searched the whole thing, including the trash.

     
    • Uranium235

      Uranium235 - 2014-11-05

      Sure you have looked in the correct Google drive? Only reason I can think of is, you provided Client ID and Client Secret for the correct Google Account but authorized the app with a different Google Account. (or the other way around)

      What matters (in terms of where the file shows up) is not the account where the Client ID and Client Secret are created, but the account you ultimately authorize the app with (the popup asking for authorization you typically only see once).
      The former is just where the quota for API requests will show up, the latter is where the former "Project" has access to. Those can be to different accounts.

      If you have multiple Google Accounts, please make sure you do not mix them up. It might be that you were already logged in to another account with IE (what the popup also uses) when the Plugin asked for authorization and you didn't notice it was not the correct account. In that case revoke all access grated (in Google Security Settings - for all your accounts) and authorize again (simply sync) making sure you use the correct account.

       

      Last edit: Uranium235 2014-11-05
  • Uranium235

    Uranium235 - 2014-11-05

    Btw, if you think you deleted everything before making that first sync command but the Plugin's status (in the KeePass status bar) says it successfully synced "Local file synchronized..." instead of "File uploaded..." (the first time using sync only), that is a strong indicator you either are using the wrong account or for some reason there is a problem with your Google Drive not showing you everything there actually is.

     

    Last edit: Uranium235 2014-11-05
  • crazyfoxx

    crazyfoxx - 2014-11-05

    Spot on! It was indeed going to a different account. I was too quick to push the accept button. I didn't notice that it was for my work account, and not my personal account. I revoked access and started over with the correct account. Working now.

    Also, initial testing shows that my 'sometimes sync, sometimes creates new file' issue is resolved. I will let you know after testing for a couple more days.

    Thanks for all your help. Cheers!

     

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.