I use gwibber to monitor Facebook and Twitter feeds so I don’t have to log in there. It hasn’t worked in a few weeks, and attempting to open the GUI did nothing.
I finally tried running it from the command line and got the obscure error “DatabaseError: database disk image is malformed”, which is tremendously unhelpful and shows someone isn’t checking their error conditions correctly.
Turns out that gwibber stores tons of data in an sqlite database hidden in ~/.config/gwibber. Since sqlite is hardly the most reliable of databases, this can get corrupted.
To fix it, first kill all gwibber-service processes. Then dump the database and rebuild it:
$ cd ~/.config/gwibber
$ echo ".dump" | sqlite3 gwibber.sqlite | sqlite3 new.db
$ mv gwibber.sqlite old.db
$ mv new.db gwibber.sqlite
When you’re happy with the way gwibber, just delete old.db.
I must admit, I’ve never seen the attraction of sqlite. It’s handy if you want to create a small database which you won’t be reading or writing often, but software like this abuses it by creating databases of hundreds of megabytes or more. When gwibber restarted after rebuilding the database it created a journal file of over half a gigabyte on a machine with 3GB free. Not good.