Skip to content
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

Appcenter does not recover gracefully from an empty cache #2246

Open
teamcons opened this issue Jan 4, 2025 · 1 comment · May be fixed by #2249
Open

Appcenter does not recover gracefully from an empty cache #2246

teamcons opened this issue Jan 4, 2025 · 1 comment · May be fixed by #2249
Labels
Status: Confirmed Verified by someone other than the reporter

Comments

@teamcons
Copy link

teamcons commented Jan 4, 2025

What Happened?

when appcenter starts with a fully empty cache, the UI loads partially:
there is no icons.
the banner disappears after a second or two#

closing and reopening appcenter restores its UI

Steps to Reproduce

kill appcenter
Remove in ~/.cache the folders io.elementary.appcenter, flatpak and appstream
open appcenter

Expected Behavior

appcenter UI is unaffected.
Load animations for icons should appear, and once all is loaded, be left as if cache was never empty

OS Version

8.x (Circe)

Session Type

Secure Session (Wayland)

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response

@edwood-grant edwood-grant added the Status: Confirmed Verified by someone other than the reporter label Jan 5, 2025
@edwood-grant
Copy link
Contributor

edwood-grant commented Jan 5, 2025

This is the current result for this bug.

Screenshot 1

The banner then disappears after a while, probably related to the update worker thread when remotes are loaded, it removes the banner and won't add anything because there is nothing in the remote lists, thus the empty top in general.

Screenshot 2 after a while

There is a way to solve this by reconstructing the cache in the constructor of FlatpakBackend.vala if the system fails to find the system or user cache folder via preprocess_metadata. This adds some load time, but I wouldn't expect to be much of a problem since this is a pretty rare case, only happening if you actively delete caches. So it could be a solution for this issue.

The other solution would be to simply not remove the banner and check if you have something in the flatpak remotes list. But I don0t think it's valid because you want the remote app data.

For the first solution I will upload a PR soon to see if anyone sees it valid enough to mark this as solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Confirmed Verified by someone other than the reporter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants