Bug 782762 - no such table: mem.Drafts
Summary: no such table: mem.Drafts
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: evolution
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Matthew Barnes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-18 11:55 UTC by Tim Waugh
Modified: 2012-01-23 15:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-20 10:20:31 UTC
Type: ---


Attachments (Terms of Use)
output from running evolution in a terminal (3.55 KB, text/plain)
2012-01-19 14:43 UTC, Tim Waugh
no flags Details
gzipped debugging output of camel (181.67 KB, application/x-gzip)
2012-01-19 14:45 UTC, Tim Waugh
no flags Details

Description Tim Waugh 2012-01-18 11:55:49 UTC
Description of problem:
I get this error when clicking on my Drafts folder on an IMAP account:

Error while Generating message list.
no such table: mem.Drafts

When using a webmail interface to the same account, the Drafts folder is accessible without any problem.

Version-Release number of selected component (if applicable):
evolution-3.2.2-1.fc16.x86_64

Comment 1 Milan Crha 2012-01-19 07:58:44 UTC
Thanks for a bug report. Is it possible that the folders.db file (local summary) corresponding to that account is broken, or fetching of the Drafts folder failed for some reason? Similar errors happen when the folder is empty, but the code expect it and hides it from a user. Could you try to run evolution from console, whether there will be anything useful when entering the Drafts folder, please? Alternatively run evolution with camel debugging on, like this:
   $ CAMEL_DEBUG=all evolution &>log.txt
and when you close evolution then search for the "Drafts" strings and check surrounding outputs for anything useful. It would be also good to check consistency of the folders.db file, it's stored in ~/.local/share/evolution/mail/imap/<account>/..., but I cannot find a command which would do that at the moment.

I suppose it is an IMAP account, not IMAP+.

Comment 2 Tim Waugh 2012-01-19 14:42:45 UTC
(In reply to comment #1)
> Is it possible that the folders.db file (local
> summary) corresponding to that account is broken, or fetching of the Drafts
> folder failed for some reason?

I tried moving that file away to see if it made any difference, and it didn't.

> I suppose it is an IMAP account, not IMAP+.

It is IMAP, but I could try IMAP+ if that helps to diagnose the problem.

Comment 3 Tim Waugh 2012-01-19 14:43:28 UTC
Created attachment 556288 [details]
output from running evolution in a terminal

Comment 4 Tim Waugh 2012-01-19 14:45:33 UTC
Created attachment 556289 [details]
gzipped debugging output of camel

Comment 5 Milan Crha 2012-01-20 10:20:31 UTC
Thanks for the update. I see what is going on here, your Drafts (and INBOX/majordomo) folder has set incorrect version (lower than 2) in the folders.db file, and the migration fails because the Drafts folder was removed earlier, and this repeats forever. I found an upstream bug report for this [1], and I'm moving there with this.

Something like this may fix the issue:
  $ sqlite3 ~/.local/share/evolution/mail/.../folders.db \
     "UPDATE 'Drafts_version' SET version='2';"

(In reply to comment #2)
> (In reply to comment #1)
> > Is it possible that the folders.db file (local
> > summary) corresponding to that account is broken, or fetching of the Drafts
> > folder failed for some reason?
> 
> I tried moving that file away to see if it made any difference, and it didn't.

It's possible that you either moved a different file, because I see I pointed you into an incorrect place, the file is stored more user-unfriendly now, in
  ~/.local/share/evolution/mail/<uid-of-the-imap-account>/folders.db
And the 3.3.x has it under ~/.cache for IMAP accounts.

I'll see what I can do here and if there will be any patch done upstream, then I would be able to create a package for you.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=666764

Comment 6 Tim Waugh 2012-01-20 11:10:09 UTC
OK, thanks.  I won't make any modifications for the time being, in order to be able to test patches.

Comment 7 Milan Crha 2012-01-23 07:52:58 UTC
OK. Do you want to create a test package? The upstream bug report has a patch included.

Comment 8 Tim Waugh 2012-01-23 15:55:13 UTC
Fix works for me.  Thanks!
https://bugzilla.gnome.org/show_bug.cgi?id=666764#c4


Note You need to log in before you can comment on or make changes to this bug.