Missing avatar / broken url link after re-installation #13026

Closed
opened 2025-11-02 10:28:02 -06:00 by GiteaMirror · 16 comments
Owner

Originally created by @ghost on GitHub (May 25, 2024).

Description

I have no idea what I did wrong, or how to work around this. ./gitea doctor shows all working paths OK.

Screenshot_20240525_133959

app.ini

[1] Check paths and basic configuration

  • [I] Configuration File Path: "/home/khan/gitea/custom/conf/app.ini"
  • [I] Repository Root Path: "/home/khan/Documents/gitea-repositories"
  • [I] Data Root Path: "/home/khan/gitea/data"
  • [I] Custom File Root Path: "/home/khan/gitea/custom"
  • [I] Work directory: "/home/khan/gitea"
  • [I] Log Root Path: "/home/khan/gitea/log"

2024/05/25 13:46:24 ...s/graceful/server.go:50:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 16158
2024/05/25 13:47:18 ...eb/routing/logger.go:102:func1() [I] router: completed GET /khanumballz for 127.0.0.1:58920, 200 OK in 20.4ms @ user/home.go:713(user.UsernameSubRoute)
2024/05/25 13:47:18 routers/web/base.go:80:func2() [W] Unable to find avatars d94438e78ed6e2a09b4d25eb9a20587e
2024/05/25 13:47:18 ...eb/routing/logger.go:102:func1() [I] router: completed GET /avatars/d94438e78ed6e2a09b4d25eb9a20587e?size=512 for 127.0.0.1:58920, 404 Not Found in 0.1ms @ web/base.go:22(avatars)
2024/05/25 13:47:25 routers/web/base.go:80:func2() [W] Unable to find avatars d94438e78ed6e2a09b4d25eb9a20587e
2024/05/25 13:47:25 ...eb/routing/logger.go:102:func1() [I] router: completed GET /avatars/d94438e78ed6e2a09b4d25eb9a20587e?size=512 for 127.0.0.1:58920, 404 Not Found in 0.2ms @ web/base.go:22(avatars)
2024/05/25 13:47:25 ...eb/routing/logger.go:102:func1() [I] router: completed GET /favicon.ico for 127.0.0.1:58920, 301 Moved Permanently in 0.2ms @ misc/misc.go:46(web.Routes.StaticRedirect)

Gitea Version

Gitea version: 1.23.0+dev-125-gec771fdfcd built with GNU Make 4.3, go1.22.3 : bindata, sqlite, sqlite_unlock_notify

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Built from source Arm64

Database

SQLite

Originally created by @ghost on GitHub (May 25, 2024). ### Description I have no idea what I did wrong, or how to work around this. ./gitea doctor shows all working paths OK. ![Screenshot_20240525_133959](https://github.com/go-gitea/gitea/assets/161912587/4ab4cf2c-296b-47ba-ab64-593cc68cdb7e) app.ini [1] Check paths and basic configuration - [I] Configuration File Path: "/home/khan/gitea/custom/conf/app.ini" - [I] Repository Root Path: "/home/khan/Documents/gitea-repositories" - [I] Data Root Path: "/home/khan/gitea/data" - [I] Custom File Root Path: "/home/khan/gitea/custom" - [I] Work directory: "/home/khan/gitea" - [I] Log Root Path: "/home/khan/gitea/log" 2024/05/25 13:46:24 ...s/graceful/server.go:50:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 16158 2024/05/25 13:47:18 ...eb/routing/logger.go:102:func1() [I] router: completed GET /khanumballz for 127.0.0.1:58920, 200 OK in 20.4ms @ user/home.go:713(user.UsernameSubRoute) 2024/05/25 13:47:18 routers/web/base.go:80:func2() [W] Unable to find avatars d94438e78ed6e2a09b4d25eb9a20587e 2024/05/25 13:47:18 ...eb/routing/logger.go:102:func1() [I] router: completed GET /avatars/d94438e78ed6e2a09b4d25eb9a20587e?size=512 for 127.0.0.1:58920, 404 Not Found in 0.1ms @ web/base.go:22(avatars) 2024/05/25 13:47:25 routers/web/base.go:80:func2() [W] Unable to find avatars d94438e78ed6e2a09b4d25eb9a20587e 2024/05/25 13:47:25 ...eb/routing/logger.go:102:func1() [I] router: completed GET /avatars/d94438e78ed6e2a09b4d25eb9a20587e?size=512 for 127.0.0.1:58920, 404 Not Found in 0.2ms @ web/base.go:22(avatars) 2024/05/25 13:47:25 ...eb/routing/logger.go:102:func1() [I] router: completed GET /favicon.ico for 127.0.0.1:58920, 301 Moved Permanently in 0.2ms @ misc/misc.go:46(web.Routes.StaticRedirect) ### Gitea Version Gitea version: 1.23.0+dev-125-gec771fdfcd built with GNU Make 4.3, go1.22.3 : bindata, sqlite, sqlite_unlock_notify ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Built from source Arm64 ### Database SQLite
GiteaMirror added the issue/needs-feedbacktype/bug labels 2025-11-02 10:28:02 -06:00
Author
Owner

@lunny commented on GitHub (May 25, 2024):

How did you re-install?

@lunny commented on GitHub (May 25, 2024): How did you re-install?
Author
Owner

@yp05327 commented on GitHub (May 29, 2024):

avatars are saved in {data path}/avatars, maybe you need to check the files in this folder.

@yp05327 commented on GitHub (May 29, 2024): avatars are saved in `{data path}/avatars`, maybe you need to check the files in this folder.
Author
Owner

@alyandon commented on GitHub (May 29, 2024):

I appear to have the same issue after upgrading to 1.22.0 from 1.21.7. data/avatar directory is empty and attempting to force the download does not appear to do anything. Gitea is configured with default Gravatar source.

Edit: Also, the profile in question didn't actually have a gravatar so was relying on the identicon generator. I tried to assign an actual image to the gravatar profile and that didn't work either. Uploading an image via web browser works.

@alyandon commented on GitHub (May 29, 2024): I appear to have the same issue after upgrading to 1.22.0 from 1.21.7. `data/avatar` directory is empty and attempting to force the download does not appear to do anything. Gitea is configured with default Gravatar source. Edit: Also, the profile in question didn't actually have a gravatar so was relying on the identicon generator. I tried to assign an actual image to the gravatar profile and that didn't work either. Uploading an image via web browser works.
Author
Owner

@alyandon commented on GitHub (May 29, 2024):

Some logs:

2024/05/29 16:22:21 routers/web/base.go:80:func2() [W] Unable to find avatars 9e61922cdffba0bcee9a3c5552ba7513
2024/05/29 16:22:21 routers/web/base.go:80:func2() [W] Unable to find avatars 9e61922cdffba0bcee9a3c5552ba7513
2024/05/29 16:22:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /avatars/9e61922cdffba0bcee9a3c5552ba7513?size=512 for [IPV6_ADDR_REMOVED]:0, 404 Not Found in 0.1ms @ web/base.go:22(avatars)
2024/05/29 16:22:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /avatars/9e61922cdffba0bcee9a3c5552ba7513?size=48 for [IPV6_ADDR_REMOVED]:0, 404 Not Found in 0.2ms @ web/base.go:22(avatars)
@alyandon commented on GitHub (May 29, 2024): Some logs: ``` 2024/05/29 16:22:21 routers/web/base.go:80:func2() [W] Unable to find avatars 9e61922cdffba0bcee9a3c5552ba7513 2024/05/29 16:22:21 routers/web/base.go:80:func2() [W] Unable to find avatars 9e61922cdffba0bcee9a3c5552ba7513 2024/05/29 16:22:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /avatars/9e61922cdffba0bcee9a3c5552ba7513?size=512 for [IPV6_ADDR_REMOVED]:0, 404 Not Found in 0.1ms @ web/base.go:22(avatars) 2024/05/29 16:22:21 ...eb/routing/logger.go:102:func1() [I] router: completed GET /avatars/9e61922cdffba0bcee9a3c5552ba7513?size=48 for [IPV6_ADDR_REMOVED]:0, 404 Not Found in 0.2ms @ web/base.go:22(avatars) ```
Author
Owner

@alyandon commented on GitHub (May 30, 2024):

Both identicons and custom gravatar avatars aren't working. Manually uploading a gif|jpg|png to my profile appears to work fine.

@alyandon commented on GitHub (May 30, 2024): Both identicons and custom gravatar avatars aren't working. Manually uploading a gif|jpg|png to my profile appears to work fine.
Author
Owner

@yp05327 commented on GitHub (May 30, 2024):

So you are using gravatar avatars, but it seems that all avatar URLs are accessing Gitea instance not gravatar server.

IIRC, the following settings will be cached in DB, maybe on/off it can update the settings. Not sure whether this will work, but can have a try.
image

@yp05327 commented on GitHub (May 30, 2024): So you are using gravatar avatars, but it seems that all avatar URLs are accessing Gitea instance not gravatar server. IIRC, the following settings will be cached in DB, maybe on/off it can update the settings. Not sure whether this will work, but can have a try. ![image](https://github.com/go-gitea/gitea/assets/18380374/65f0583c-d182-4c0b-bca1-31adecffaa2b)
Author
Owner

@alyandon commented on GitHub (May 30, 2024):

Toggling it by itself didn't appear to actually help. I managed to get my identicon to show up by doing the following:

  1. Disable Gravatar in settings.
  2. Go into my user profile settings
  3. Noticed the "delete current avatar" button is enabled even though technically I don't have one.
  4. Pressed "delete current avatar" and immediately my identicon avatar displayed as expected.
  5. Re-enabled Gravatar in settings.

Actual Gravatars don't appear to show up though. I switched to another user that does have a custom Gravatar associated with the profile email address and Gitea displays an identicon instead of the avatar.

@alyandon commented on GitHub (May 30, 2024): Toggling it by itself didn't appear to actually help. I managed to get my *identicon* to show up by doing the following: 1) Disable Gravatar in settings. 2) Go into my user profile settings 3) Noticed the "delete current avatar" button is enabled even though technically I don't have one. 4) Pressed "delete current avatar" and immediately my identicon avatar displayed as expected. 5) Re-enabled Gravatar in settings. Actual Gravatars don't appear to show up though. I switched to another user that does have a custom Gravatar associated with the profile email address and Gitea displays an identicon instead of the avatar.
Author
Owner

@yp05327 commented on GitHub (May 30, 2024):

As @lunny asked above, we don't know how you reinstalled your Gitea instance, so it is hard to say this is a bug from Gitea.

Maybe reset the avatar email can be helpful?

@yp05327 commented on GitHub (May 30, 2024): As @lunny asked above, we don't know how you reinstalled your Gitea instance, so it is hard to say this is a bug from Gitea. Maybe reset the avatar email can be helpful?
Author
Owner

@ghost commented on GitHub (May 30, 2024):

Hi again.

The problem isn't the custom uploaded avatars, but the generic ones that get automatically generated.

I still haven't found the issue, because the avatar folder is empty by default, so it seems to be some kind of vector graphics code written somewhere in the js I suppose.

More info:

I have built gitea form source on arm64 orange pi 5 plus. Everything else works fine

@ghost commented on GitHub (May 30, 2024): Hi again. The problem isn't the custom uploaded avatars, but the generic ones that get automatically generated. I still haven't found the issue, because the avatar folder is empty by default, so it seems to be some kind of vector graphics code written somewhere in the js I suppose. More info: I have built gitea form source on arm64 orange pi 5 plus. Everything else works fine
Author
Owner

@rdmcguire commented on GitHub (Jun 17, 2024):

This is also broken for me immediately following upgrade to 1.22.0 -- gravatar no longer works. I didn't have any custom avatars, only gravatar. The disable slider is off (it was on following the upgrade), but it still doesn't work.

I am also being asked to reset my password after authenticating with my oidc provider, so there seems to be some account functionality broken after the upgrade though I doubt it's related.

Installed via helm chart gitea-10.2.0.

@rdmcguire commented on GitHub (Jun 17, 2024): This is also broken for me immediately following upgrade to 1.22.0 -- gravatar no longer works. I didn't have any custom avatars, only gravatar. The disable slider is off (it was on following the upgrade), but it still doesn't work. I am also being asked to reset my password after authenticating with my oidc provider, so there seems to be some account functionality broken after the upgrade though I doubt it's related. Installed via helm chart gitea-10.2.0.
Author
Owner

@rdmcguire commented on GitHub (Jun 17, 2024):

Per the 1.22 release notes, server.OFFLINE_MODE is now set to true by default. This seems to break gravatar functionality even if the disable slider is off. Setting server.OFFLINE_MODE=false in my k8s secret and rollout restarting the deployment restored gravatar functionaly for me.

@rdmcguire commented on GitHub (Jun 17, 2024): Per the 1.22 release notes, server.OFFLINE_MODE is now set to true by default. This seems to break gravatar functionality even if the disable slider is off. Setting server.OFFLINE_MODE=false in my k8s secret and rollout restarting the deployment restored gravatar functionaly for me.
Author
Owner

@alyandon commented on GitHub (Jun 18, 2024):

Same here. As soon as I changed the setting to false and restarted gitea my actual gravatar immediately appeared in place of the identicon.

@alyandon commented on GitHub (Jun 18, 2024): Same here. As soon as I changed the setting to false and restarted gitea my actual gravatar immediately appeared in place of the identicon.
Author
Owner

@sbuller commented on GitHub (Jun 26, 2024):

This bit me too. I'm using the gitea/gitea container, and all our avatars were broken by the 1.22 update. We'd had nothing but the auto generated geometric patterns, so I went through and used the 'Delete Avatar' button on all the accounts to fix things.

@sbuller commented on GitHub (Jun 26, 2024): This bit me too. I'm using the gitea/gitea container, and all our avatars were broken by the 1.22 update. We'd had nothing but the auto generated geometric patterns, so I went through and used the 'Delete Avatar' button on all the accounts to fix things.
Author
Owner

@yp05327 commented on GitHub (Jun 27, 2024):

I can image two cases which can cause this issue:

  • maybe from far before, there's some thing happened which made user.avatar != empty, even user is using gravatar avatar. Then after forcing offline mode, user.avatar is not exist in local, so the avatar is broken.
  • unexpected data deletion

But as many reports above are updating, so the first case is the most possible case I think.

@yp05327 commented on GitHub (Jun 27, 2024): I can image two cases which can cause this issue: - maybe from far before, there's some thing happened which made `user.avatar != empty`, even user is using gravatar avatar. Then after forcing offline mode, `user.avatar` is not exist in local, so the avatar is broken. - unexpected data deletion But as many reports above are updating, so the first case is the most possible case I think.
Author
Owner

@sbuller commented on GitHub (Jun 27, 2024):

For context I can add that my installation has been through various stages. It started out as gogs, running on a VM. It was upgraded in place to gitea. More recently it was converted to a container. The latest update was from container version 1.21.11 to container version 1.22.

I guess the gravatar setting might contribute - I never had it disabled - but as far as I could tell it wasn't contributing anything.

@sbuller commented on GitHub (Jun 27, 2024): For context I can add that my installation has been through various stages. It started out as gogs, running on a VM. It was upgraded in place to gitea. More recently it was converted to a container. The latest update was from container version 1.21.11 to container version 1.22. I guess the gravatar setting might contribute - I never had it disabled - but as far as I could tell it wasn't contributing anything.
Author
Owner

@GiteaBot commented on GitHub (Aug 21, 2024):

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot commented on GitHub (Aug 21, 2024): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13026