New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Duplicate folder name" during restore #31
Comments
OK, I found the log file. It's in my home directory. This is the relevant log: Traceback (most recent call last): |
OK, the debug log suggested which email it was having trouble restoring. I looked at it and it was strange. It was a test email I sent when I first set up the Gmail account. It was "sent" to my email address about a half dozen times. Meaning the "to" list had my email address in it a half dozen times. Anyway, I just deleted that email from my gmvault db and kicked off another restore. This one is chugging away nicely. |
@MarkSte Thanks for reporting the problem. This look strange to me because normally I do not recreate the labels if they already exists. I would be happy to have the logs regarding the 2 emails before.I want to see the labels for these emails because it is a label problem here. Thanks |
Thanks for the quick response. Restore has failed several more times in this exercise. I've determined what's in common with all the failures. It's the presence of the label "[Imap]/Trash." If I edit the .meta file and remove that label, then rerun gmvault, the email is successfully restored. |
I just found another problem label. It's "[Imap]/Sent." Apparently, gmvault is having trouble with emails with Imap labels. |
hmmm I have never tested emails in "[Imap]"/Trash. To be clear, is it the Trash dir of you local email client not the Trash dir of Gmail ? |
Here's the usage (I think). On my Android phone, I access my Gmail account through Imap. Sometimes, I delete the email on the phone. That puts it into an [Imap]/Trash folder. That folder shows up in my Gmail account itself, with the deleted emails in it. Same for [Imap]/Sent, for emails sent from my Android phone. The Gmail account I'm trying to restore these emails to already as its own [Imap]/Trash and [Imap]/Sent folders, but gmvault is unable to restore emails to those folders. Instead it looks like it's trying to create them afresh and fails. Anyway, that's my guess as to what's going on. |
One easy workaround, if I had known of this situation, would have been to clean up my [Imap]/Trash folder before trying to sync/restore this Gmail account. If the emails really are trash, I could just delete them and not have to bother gmvault with handling them at all. And if, they aren't intended to be trashed, I could move them to other folders before running gmvault sync. So, I don't consider this a showstopper, but if it can't be "fixed" it should be noted in the getting-started documentation. |
@MarkSte it should work and I need to understand why Gmvault thinks that the dir doesn't exist. Thanks |
I finally edited all the offending emails in the db and managed to get them all restored. I'll see if I can recreate something to show you. Give me a day or two. |
In a separate email, I've sent you an offending email and the debug log file. |
@MarkSte Thanks, I got it and will investigate tonight |
I have the same problem, and I have also sent/deleted mail from a mobile IMAP device. In addition, I used my account to access external email accounts, and it may be the first one of those encountered that stops the works. (I may be wrong about which email caused the problem; is it the last "Restore email with id ..." right before the error, or is it the ID after that one?) Meta{"msg_id": "EMEW-k3M7f7c438e17aecb49e0e5e0ce78e13157a47-cf4.28be17df.35407a4b@aol.com", "gm_id": 1267676855994393694, "labels": ["\Inbox", "K12.wv.us"], "thread_ids": 1267676855994393694, "flags": ["\Seen"], "internal_date": 1208936459, "subject": "This is the subject.\r"} Terminal OutputError: create failed: '[ALREADYEXISTS] Folder name conflicts with existing folde === Exception traceback === === End of Exception traceback === |
SOLVED - For me, anyway. The "K12.wv.us" label on mail that Gmail had been fetching from another account has a capital "K" in the meta files, while the account into which I was importing had the label with a lower-case "k". Renaming the label in the recipient account to match the meta files solved the problem. It may be interesting to find out if @MarkSte's IMAP folders have the same letter case in the meta files vs the receiving account. |
I've also had this problem, stack trace below, let me know if you need anymore info Traceback (most recent call last): |
vrenna, I believe that my problem with "[Imap]/Trash" is not related to case insensitivity. At least, the problem case I sent to gaubert doesn't have this problem. |
@MarkSte @codebox @VRenna I investigated more and it has to do with the fact that GMail labels are case insensitive but returned with upper and lower cases by IMAP. So in some cases, they are sometimes in lower cases and in mixed cases. |
Cool - happy to test new version, I'm on OSX |
@MarkSte @codebox It is more complicated than expected but I am progressing. Again thanks a lot |
That was the situation in the attachment I sent May 14. I am including it again. Mark Steger On Wed, May 23, 2012 at 2:49 PM, Guillaume Aubert
|
The "[Imap]/Trash" is nested in the receiving Gmail account of the Mark Steger On Wed, May 23, 2012 at 3:07 PM, Guillaume Aubert
|
Hi, Attached is a screenshot of how the imap/trash folder appears in the robs-macbook-pro-2:db rob$ pwd Rob On Wed, May 23, 2012 at 9:07 PM, Guillaume Aubert <
|
@MarkSte @codebox @VRenna I have created a fix for the [IMAP]/.. issue. Man labels are a mess in Gmail. It is not handled clearly at the IMAP level. Anyway I am testing my fix now and will build a test version for you tomorrow or on saturday. Hope you will be ready to test it. |
Great! Thanks, @gaubert ! |
@MarkSte @codebox @VRenna I have created v1.6-develop that should fix the issue with [IMAP](hopefully ;-) ). In case of problems I would appreciate if you could send me the full log file available in ~/gmvault.log for mac and linux and C:\Users\gmvault.log for windows. Hope this will fix the issue. Let me know. Many thanks for your efforts. |
I used v1.6-develop successfully. My test case had some [Imap]/Trash MarkSte On Sat, May 26, 2012 at 8:15 AM, Guillaume Aubert
|
Camping today. I'll share results tomorrow evening. |
@MarkSte very good. I had to take some decision on how to create the nested labels but it seems ok now. |
@VRenna Ok enjoy the camping. Waiting for the results. |
@gaubert Everything ran perfectly. Before testing I renamed the relevant tag to make sure there was a case mismatch. Running the "restore" correctly placed all of the UC-tagged archive emails into the LC-tag on the account. Thank you again for all of your hard work. |
@VRenna great to learn that the fix seems ok |
New user of v1.0-beta. Happy user. I downloaded all 20,000 emails from one Gmail account and restored them to another. Everything worked, even more easily than I hoped.
So, then I tried the same thing with another Gmail account. Downloaded all 2,000 emails as problem-free as before. But when I went to restore them to another Gmail account, only two of the emails were restored before I hit this error:
Error create failed: '[ALREADYEXISTS] Duplicate folder name (Failure)'. For more information see log file.
I can't find the log file. It's not in the .gmvault directory. It's not in the gm-vault.db directory. It's not in the directory where gmvault itself is installed. Rerunning with --debug doesn't seem to create a log file, either. In both cases, a log is dumped to the screen (which is where I pulled the error message above), but I can't find any more information about what this error means or how to get around it. It's repeatable.
Help, please.
The text was updated successfully, but these errors were encountered: