I’ve had a couple of incidents where Akregator crashed. On starting up again it remembered all my feeds, but not the status of any items within those feeds - i.e. it refetched everything and showed every item as unread.
To recover from this more easily in future, I’d like to be able to restore the relevant data from backups. However, I can’t find where the state of feed items is stored.
I expected this kind of data to be in ~/.local/share/akgregator or ~/.local/state/akregator (as per this previous topic).
Looking in those directories, I find:
~/.local/share/akgregator/data/feeds.opml - stores the feeds I subscribe to, and their hierarchy, but no information on individual items
~/.local/share/akgregator/Archive - has a bunch of files, one for each feed, but they’re all zero-length so can’t carry any state information.
~/.local/state/akregatorstaterc - has some information about the window size, and a “State” string which seems to be base-64 encoded data. However, if I delete this file, Akregator still remembers which items are read/unread, so it can’t be storing that information.
There’s also a directory ~/.cache/akregator, but the only thing that contains is an empty subdirectory.
Thank you Long term Windows user, I switched to Fedora KDE a month ago and I’m really enjoying KDE.
I checked, and I don’t have the button selected. (I chose “Delete articles older than 60 days”).
What I think is happening reproducibly is:
If I close Akregator, then open it again within the same session, then the status of each article is correctly retained. (However, the files in ~/.local/share/akregator/Archive are not being used to do that - they remain at 0 bytes length and their mtime corresponds to back when I first added the feed.)
If I end my session, log out and in again, and start up Akregator, I get a message “Akregator did not close correctly. Would you like to restore the previous session?”. I click “Restore” and I get the problem I described - every article appears as unread.
My guess is that somehow:
Akregator fails to persist state to those files in Archive. (I agree that’s where the state should be persisted, based on Akregator troubleshooting I’ve seen on other forums). The key is going to be to understand why that’s happening.
When the app runs, it stores state in memory. Closing the front end does not kill some back-end process that does this, so when I close and open the app within a session, I don’t experience the problem.
Agreed. I also looked at the Akonadi DB and didn’t see anything Akregator-related.
I mentioned before that “closing the front end does not kill some back-end process”. What I hadn’t realised is that clicking the window close button (which I was doing before) doesn’t do the same thing as File >> Quit (which I tried today). Just closing the window seems to leave the app running without a GUI, and if you then end your session, I guess that’s how you get to “Akregator did not close correctly” in the next session.
When I did File >> Quit, I did see the .mk4 archive files get written. So that’s some progress.
Something is still a bit weird though: I had set “Delete articles older than 60 days”. However, the application does show me articles more than 60 days old, but it gives them all a date of 1 Jan 1970 (i.e. zero Posix timestamp).
Further discovery: this is because I went the wrong way about removing the Akregator tray icon. I should have achieved this by disabling it in Akregator settings, but instead I hid the entry in the tray settings.
When I disable it the proper way, closing the window does properly exit the application.
I still need to look at the issue of old article hanging around and showing a 1970 date.