flathub / org.gnome.Evolution

https://flathub.org/apps/details/org.gnome.Evolution
8 stars 10 forks source link

Uninstalling the Evolution Flatpak and clearing its data breaks the application upon reinstalling #155

Open mariobrostech opened 9 months ago

mariobrostech commented 9 months ago

Hi,

I want to report an issue with the Evolution flatpak wherein if you uninstall it with flatpak uninstall org.gnome.Evolution --delete-data (you must include the --delete-data flag to reproduce this), the application subsequently breaks upon reinstalling.

I was able to find a copy of this issue on the GNOME GitLab, but this seems specific to the Evolution flatpak, which is why I'm reopening it here.

After reinstalling the flatpak, the application is stuck in a partially installed state. It's impossible to get through the setup wizard (see the attached issue for symptoms), and upon further inspection, it looks as though the system doesn't even detect the Evolution flatpak anymore. Running flatpak list | grep Evolution only shows the locale package, not the whole application.

I've been able to reproduce this on several systems now, so I'm wondering if a fix can be applied to the Evolution flatpak to prevent this from happening in the future.

Thanks in advance for your help!

mcrha commented 9 months ago

I'm the one from the GNOME GitLab bug you found. Thinking of it now, I do not know why I referenced this tracker instead of the Flatpak itself, because reading what you see makes me think it's something even lower level than only in this flatpak app. That you do not see the app in the flatpak list output is a weird problem, but something the app itself cannot influence.

There is one special thing about the Evolution in Flatpak, it's left running even after the window is closed. It's because of the background processes (from evolution-data-server), which the application uses. Maybe, but really only maybe, when the uninstall is ran only after flatpak kill org.gnome.Evolution, then it can be started properly. Another possibility is that there's something wrong about the --delete-data switch, but I think it's not.

Nonetheless, I tried the steps with flatpak-1.15.6-1.fc39.x86_64 and the app started with no problem when it was not running in the background.

On the other hand, when I left the background processes running (ps ax | grep evolution | grep /app/) and initiated the uninstall, they were still left running, which is wrong. When I install it I see the plain org.gnome.Evolution in the flatpak list response (this is different from your observation, no idea what could fail for you). I could run the app, but it was using the old app data (now non-existent), thus I needed to run flatpak kill org.gnome.Evolution to make the evolution use the newly installed bits.

That being said, from my point of view:

  1. flatpak uninstall should make sure the uninstalled app is also killed
  2. you might investigate further what failed during the installation (that the app is missing from the flatpak list), maybe a networking glitch, who knows; this is nothing related to the app itself, as you've been solely running flatpak commands.
Sesivany commented 9 months ago

I just tried to reproduce it on Fedora Silverblue and couln't. Even if I run flatpak uninstall org.gnome.Evolution --delete-data while Evolution is running, it completely uninstalls and then I can install it again without any issues.

What distribution are you using? This looks like something distro-specific, maybe some bug in Flatpak integration?

mariobrostech commented 9 months ago

Hi all,

Thanks for your prompt replies. I'll include a little more information about my testing environment to hopefully help you reproduce my issue:

All systems tested were running Fedora Linux 39.

1) I installed the Evolution flatpak from Flathub by using GNOME Software. I made sure to select the Flathub package from the drop-down instead of using the RPM package provided by Fedora.

2) I launched Evolution and partially set up my Gmail account. The whole reason that I reinstalled Evolution in the first place was because I couldn't add my Gmail account. I thought it might be something with my installation, so I tried reinstalling whilst clearing data to remove the possibility of a configuration issue being the cause.

3) With Evolution opened and showing the yellow banner at the top of the screen for an account sign-in confirmation, I pressed the close button on the Evolution window. I didn't completely kill the process, which, in hindsight, may have contributed to this issue.

4) I then ran the flatpak uninstall org.gnome.Evolution --delete-data command in a terminal window to remove Evolution and all of its data.

5) I reinstalled the Evolution flatpak using GNOME Software and attempted to go through the setup procedure. When I got the end of the setup dialogs, I saw the error message that I referenced in the GNOME GitLab instance earlier.

Hopefully, given that information, someone is able to replicate this issue and ultimately determine if it's an Evolution packaging issue or an issue with flatpak itself. If you test this out and find anything interesting, please share! Thanks again for your help.

mcrha commented 9 months ago

Okay, I tried with flatpak-1.15.6-1.fc39.x86_64 and the distro being up-to-date as of today. It happened once that Flatpak left behind the org.gnome.Evolution.Locale after uninstall, but I tried to uninstall the app from the GNOME Software (gnome-software-45.3-1.fc39.x86_64), which asks whether the user data should be kept or deleted. I asked it to delete it, but the deletion failed with "Directory is not empty". After this there had been left the Locale part and installing Evolution did not install the whole app, which led to a lot of trouble.

It happened only once, right after reboot with evo binaries not being running. After that I could not reproduce it, neither the error, nor the leftover Locale part and even if I installed the Locale part separately and then Evolution, it worked with no problem. It's quite confusing, to be honest. Still, the install/uninstall is not about the app itself, it's about the flatpak tool. I expect this can be reproduced with other apps as well, I only do not know 100% reproducible steps (neither for evo) to prove it.