-
Notifications
You must be signed in to change notification settings - Fork 335
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
Site logo disappearing #2454
Comments
I tested this locally. I was able to reproduce the issue with the site logo, but not a user profile picture. I also noticed that the user settings reload the page on save, where the site settings do not. I'll address the issue I found with the site settings. |
@SleeplessOne1917 Strange that you dont have it with the admin user picture. I must say, in my case the site logo is identical to the profile picture of the admin user. So it could be that they are stored by their hash, and if the site logo gets removed it automaticly deletes the profile picture of the admin user (as they have an identical hash value?). |
What routes are you on when editing the site logo vs the admin user profile picture? |
If you mean the URLs? They are |
So you are using the right routes. When you say the site logo is identical to the admin logo, do you mean that you are separately setting them to the same image, or that setting one sets the other? |
I mean that I am separately setting them to the same image, so uploading the same file twice. Another thing that might be different between your local testing and my situation is that I use fairly heavy caching (both in the nginx config for lemmy-ui, and Cloudflare caching on top of that). So if one of the pages in settings somehow sends the wrong headers that allow it to be cached, it will not be a problem during your tests, but will be a problem during mine. |
Currently, lemmy-ui doesn't set any cache related headers on requests. It does set cache control headers on responses though: https://github.com/LemmyNet/lemmy-ui/blob/main/src/server/middleware.ts#L37-L65 |
Yeah, I was only thinking in that direction because you mentioned something about "reload the page on save" so I thought maybe the caching interferes with the reload for the profile picture for example. Anyway, if you could just fix this for the site logo it would already be great! |
The PR for the admin settings fix is merged. @kroese let us know if you still run into this problem once the latest release is out. |
Today I lost the site logo again, after upgrading v0.19.4-beta.7 to v0.19.4-rc.1. This time I am 100 percent sure that I did not modify any Administrator settings. Its possible that I viewed that page quickly, but I never hit the So there are more ways to loose the site logo, besides hitting Save on that page. |
Is there a reproducible set of steps that consistently causes this bug? I'm currently at a loss as to what could be causing this problem. |
@SleeplessOne1917 Yes, thanks! Subscribed to that issue now |
@SleeplessOne1917 It seems I can reproduce this issue just by restarting the lemmy/pictrs containers. So it has nothing to do with version updates, the only relation is that when doing a version upgrade, the containers gets restarted. So I set the site logo, it works, I restart the container, site logo is gone. I am not sure if this is even a bug in Lemmy, as it could be an issue with Pict-RS as well (Im using 0.5.14). |
@asonix Have you or any other users of pict-rs encounter a similar issue? |
Okay, this is definitely a pict-rs issue, I get this error in my log:
The strange thing is that when uploading a picture, it is initially working fine. It just seems to get deleted when shutting down pict-rs. |
the way I read this issue previously was that the URL was just no longer in Lemmys database in the site configuration? I've recently run into an issue on one of my test instances where suddenly, not sure what was leading up to this, pictrs started returning 404 site icon and banner, but the urls were still set in since these seem to be two very different symptoms (image no longer being set in lemmy vs image being set but 404) i assumed my issue was different, but i didn't find enough time to investigate my issue properly yet. |
@Nothing4You For the site logo, it seems the URL is no longer set in the database, as the For the user profile, there is an URL set in the database, as the The issue you describe is listed here: #2211 , where a broken site logo will cause lemmy-ui to not run at all. But in my case it seems the database entry is reverted to empty. |
then I don't understand your previous #2454 (comment) here? afaik there is no way for anything within pict-rs to be able to remove the link from lemmys db, so unless the image gets lost in pict-rs and lemmy notices the image being dead and removes it from it own db, the reference disappearing in lemmys db shouldn't possibly be originating from pict-rs? #2211 is just for the follow-up issue in lemmy-ui, which should be addressed to reduce the impact of images not being loadable, but it doesn't explain the underlying issue of how we got to that situation in the first place. there is a possible reproduction case, although I haven't tested those steps yet, but that might be what happened in my case as well. |
Turns out this is likely a back-end issue, I think I know where the problem is, so I'll close this one. |
@dessalines Great! But for me the issue occured under two circumstances:
And that last issue is still present, so is it possible to re-open this until this second problem is also fixed? I am aware this might be a bug in pict-rs and not in lemmy-ui, but as pict-rs has no github repo, at least its reported somewhere then. |
@dessalines 0.5.14 (the latest). But as I see also this message in the logs of pict-rs:
im not sure if its related to the issue, but it looks like some Postgres migration went wrong. The whole strange thing is that I can upload a new site logo / user profile picture just fine, and the images stay for a while. But if I restart the containers, the images are suddenly gone. This are exactly the same symptoms as I had when hitting the "Save" button, but I can reproduce them without ever hitting "Save" or visiting the settings page, just by restarting the stack. |
@kroese if you just restart pictrs or just restart lemmy rather than restarting both do you see the image disappear? also I am working on a fix for that proxies foreign key issue (which is likely not related) |
Its likely the failed migration (even if that table is unrelated, it means that the rest of the migration probably didn't continue). |
The migration didn't fail, proxy cleanup isn't happening in the correct order. I will get a fix out today. proxy cleanup is unrelated to site icons, though, and if anything, this bug would prevent image deletion :p |
@dessalines I lost the logo after updating the container from The reason why I suspect Lemmy, and not Pict-RS is that the site logo field was actually cleared. If you try to start Lemmy-UI with a broken logo link, it will not even start (seperate issue). So it looked more like Lemmy forgot the link, instead of Pict-RS deleting the actual image. @asonix I just tried it with restarting the containers individually (lemmy-ui, lemmy, pict-rs all seperate). But I was unable to reproduce it. But I have seem this issue so many times now in the past weeks, that Im sure I will run into it again, and then I will pay good attention which of the 3 is responsible. |
The fix that closed this issue is in the new rc, |
@kroese here's an idea: stop pict-rs, then restart lemmy, then start pict-rs. I wonder if it's checking if the logo image exists and failing due to pict-rs not being online yet |
Anyways this isn't a lemmy-ui issue anymore, its a dupe of a back-end one: LemmyNet/lemmy#4763 |
I debugged this some more. I created a script to dump the value of
and it returned the URL to the site icon. Then I immediately upgraded from When visiting the image URL that was previously there, it was still available. So this is definately not a pict-rs issue, there is just something that resets the The difficulty here is that I when start/stop individual containers at random (lemmy/postgres/pictrs) I am not able to reproduce it. Only when they are restarted as a group (what typically happens when I do version updates in Portainer and have to edit the compose file of the group) it seems to occur. Or maybe switching versions triggers some migration to be executed, that accidently clears the |
This is not a lemmy-ui issue, use the other issue, or open up a new one on the lemmy repo, with specific steps using only rc.6 or A restart or upgrade should not be clearing that site icon, or something is seriously wrong. |
Requirements
Summary
Around Lemmy 0.19.4 beta 3 and higher I run into the issue that the site logo (and profile picture for the admin) are frequently disappearing.
My guess is to what happens is that when you edit the
Admin settings
or theProfile settings
it does not load the current picture correctly (the box stays empty) and as soon as you save your modifications, this will clear the existing logo/picture.So currently I workaround it by everytime uploading the logo again when I edit any settings on those pages, to prevent the existing logo from disappearing.
Would be nice to see this fixed before the official 0.19.4 is released, because Im sure this will affect a lot of people.
Steps to Reproduce
Technical Details
Samsung Internet browser on Android
Lemmy Instance Version
0.19.4-beta.6
Lemmy Instance URL
No response
The text was updated successfully, but these errors were encountered: