Recently my GDrive application started showing a "primary key must be unique" error message, asking me to disconnect the drive and start all over again. I did that. Took few hours to resynchronize it all. But the next day I got the same error and asked me again to repeat the operation. I have been poking the forums (including Google's forum) up and down for months and found no real solution. So I had to do the job on my own. This is how to fix the "primary key must be unique" error:
- Start Google Drive
- Hold the SHIFT key pressed while clicking the Google Drive systray icon. This will show the 'Enable diagnostic mode' special menu.
- Click 'Enable diagnostic mode' menu.
- Wait until Google Drive crashes and shows the "primary key must be unique"error message. Let the application shutdown.
- Go to "c:\Users\YOUR_USER_NAME\AppData\Local\Google\Drive" folder and open "sync_log.log".
Note: Replace 'YOUR_USER_NAME' with your Windows account name (the account in which you are logged in). You can see this name when you press the 'Start' button. - Look up this text: "Detected conflict while trying to download file to".
- After 'to' follows the name of the file that generated the conflict. Locate that file and delete it or (better) rename it. Do this for all conflicted files (if there are more than one).
- Restart Google Drive.
That's it.
Update 1 - How to do it on Mac OS (thanks to Maik):
Thanks, this fix also works for Apple Mac OS-X.
To get to the log file:
- in finder click the Go menu
- with the menu open click ALT-key so the hidden Library item appears
- open the Library and go to folder Google -> Drive
Update 2 - More GDrive bugs: The trash cannot be purged
Now my Google Drive account shows that is 95% full even if I don't have many files loaded in GDrive (I have a total of 1.1GB). After investigation I have discovered that are files locked in the 'Trash' that cannot be deleted. I contacted Google Drive support and they said they will fix my account. The provided additional Google Drive space so I can keep using my GDrive until they will fix the problem. That was in February 2012. Still no word from them.
Update 3 - How to make GDrive synchronize faster?
Related
How to improve the Google Drive synchronize speed?
_______________
With this occasion I want to thanks Google team for the fucking 'good' job they did and to tell them: I don't believe in witches, but they surely exist.
Thank you very much for sharing your knowledge!
ReplyDeleteThis was the second time in 3 months I got this error and your solutions worked fine!
Your solution worked great! I'll definitely be scanning this huge sync log from now on. Thanks.
ReplyDeleteIt worked like a charm! Thank you VERY much for sharing this, it was a nightmare going thru all this all the time... Thank you. Thank you. Thank you.
ReplyDeleteKeeps happening. How can a good company s*ck that much? Makes me wonder. Thanks for your post.
ReplyDeleteLet's all hope that Google will release a decent GDrive version soon.
ReplyDeleteThanks, this fix also works for Apple Mac OS-X.
ReplyDeleteTo get to the log file:
- in finder click the Go menu
- with the menu open click ALT-key so the hidden Library item appears
- open the Library and go to folder Google -> Drive
Best regards,
Maik
Thanks a lot for this. Solved the problem easily.
ReplyDeleteI can confirm this does the job also in the german version of google drive. After ~10x re-syncing 3GB in the last month, this should now be over.
ReplyDeleteAs for my files, a stock monitor file caused the problem. Maybe it wrote data to GDrive when shutting the PC down - after the Google service was terminated? Since I now got a hint, I will close this application before shutting down the PC and hope the problem won´t come again.
thank you very much! this work for me!
ReplyDeleteHi, thanks for posting this. After Step 3 I get a box saying "Start Logging" and a "Log Level" dropdown box saying either "Info" or "Debug". Should I "Start Logging" and which of the dropdown options should I choose?
ReplyDeleteThank you!!!
Yes.
ReplyDeleteYou need to start logging.
Let is log until after you see the error you want to monitor. Then stop the logging and investigate the log.
'Info' shows less text in the log. It is easier to investigate.
'Debug' shows maximum amount of info. More accurate. You need more patience to investigate the log.
I would go for debug.
Thank you so much!, I have gotten this error many times and this was the first that I was able to recover without re-downloading all my files.
ReplyDelete