-
Notifications
You must be signed in to change notification settings - Fork 165
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
CalDAV backend sometimes saves incomplete configuration with Flatpak, preventing app startup #845
Comments
I'm puzzled as to how anyone who tested that feature so far had not run into that issue... could it be that there is something special about your password/passphrase (or something else) that breaks saving the data? Have you been able to unbreak it (by clearing that corrupt configuration, I suppose) and looking at the debug output (might be worth trying it out with the debug option of launch.sh in the git version) to see if there's some sort of warning or error going on at the time of the initial activation? Just wildly guessing and prodding for initial info here, @jaesivsm and others would most likely have a much better idea of how to troubleshoot this :) |
I managed to install the development version on the Chromebook to try and replicate this issue. CalDAV syncing worked once I had established that libsecret needed to be installed to enable the CalDAV backend to save a password. This issue seems to be related to the flatpak on the Chromebook. Possibly related to the VM/lxc container set-up on ChromeOS. |
@nekohayo Just typing an update as you posted. This looks to be specific to the Flatpak on Chromebook. |
Running gtg from the Chromebook terminal
I get the following error on closing the app, after setting up CalDAV sync:
|
And libsecret is installed right? I wonder why flatpak would not be able to access it |
Yes, libsecret installed and proved to be working by running the development version with launch.sh. Here is the journal error concurrent with the issue seen in the GTG flatpak app:
I don't know if that is related. |
@steveblamey maybe you can use flatseal to investigate if it's a permissions issue? |
Sorry for the delay, I can confirm this doesn't happen in the flatpak version in Fedora. It's definitely saving and restoring ok. |
After more investigation I've discovered that the root cause is that the keyring is not being unlocked. On a Linux desktop the user's keyring is unlocked on login, but that doesn't happen on the Linux container under Chrome OS.
As is often the case, the Arch Wiki comes to the rescue and explains how to add a user systemd unit that prepares the gnome keyring daemon when the container starts; https://wiki.archlinux.org/title/Chrome_OS_devices/Crostini#Unlock_the_keyring_when_starting_the_container
That solves the problem.
I will add some additional comments later.
|
Thanks to @diegogangl and @nekohayo for help and encouragement to track down the cause of this issue. The TLDR answer is above, #845 (comment). MotivationI run GTG on my laptop, which is powered by fedora. This is great but creates a sort of task management island that I can only visit when I have my laptop around. CalDAV sync is a game changer enabling me to collect tasks on my Android phone and also run GTG in the Linux environment on my Chromebook and have tasks synced back to other devices! I'm using an HP X2 11, which is an ARM based convertible Chromebook with detachable keyboard/trackpad. The CalDAV service for testing is Radicale. Notes on testing with the development versionWhile investigating this issue I used the development version of GTG to do some testing. After starting the app for the first time and configuring the CalDAV backend;
When starting GTG again the password is retrieved and the CalDAV backend connects and syncs successfully. After restarting the lxc container and running GTG, I was asked for a password to unlock the keyring. GTG then fails to retrieve the CalDAV password from the keyring (possibly a timing issue due to a sync call?), the CalDAV backend is called but fails to authenticate with the service. Auth failure would be expected but, checking the keyring, the stored password was now blank! It seems that the CalDAV backend was able to access the keyring some fraction of a second after startup and calls How it looks when using the flatpakI understand that access to the keyring is mediated by xdg-desktop portal in flatpak. In this case there is no prompt for a password to unlock the keyring, the CalDAV backend fails to store the password and, therefore, does not write a full configuration. That leads to the error described in #845 (comment) when GTG is closed and restarted. Removing the incomplete CalDAV section in backend.conf allows GTG to start without error. Follow-up
|
Congrats on figuring it out!
A more descriptive error would be nice, though I don't think we can say more than "There's something wrong with libsecret"
I think so, but I don't know if we have a place for that in the wiki page (https://wiki.gnome.org/Apps/GTG). What do you think @nekohayo ? |
It might not be only a ChromeOS-related issue, if 877 and 895 (linked above) turn out to be the same problem... if that is indeed the case, then we can rename this ticket here to reflect the cause (the keyring) and the fact that it's not specific to one particular platform, although strangely it seems to manifest pretty rarely (considering we've had only a handful of people report this here, vs thousands of users)... |
I confirm that I had this elsewhere (flatpak in RHEL) workaround for the flatpak distribution: As a clue for people hitting this issue and just trying to get the app running again, I could work around it by editing |
I wonder if this might have had anything to do with issue #846 at some point, or if that's just a coincidence? |
For anyone looking at retesting, investigating, and potentially fixing this with the latest git |
Running GTG 0.6 stable flatpak on my Chromebook and using CalDAV sync.
After configuring the backend an initial sync happens and synced task appear as expected. After closing GTG and re-openning, startup fails with the following error:
Context: Startup
Software versions:
Inspecting the
backend.conf
I notice that a number values are missing or incorrect (see below). Adding and correcting also causes startup to fail because the password had not been stored.The text was updated successfully, but these errors were encountered: