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

Bug: 8 of my organisations refers to the same avatarID #14199

Closed
1 of 4 tasks
somera opened this issue Dec 30, 2020 · 9 comments
Closed
1 of 4 tasks

Bug: 8 of my organisations refers to the same avatarID #14199

somera opened this issue Dec 30, 2020 · 9 comments
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Milestone

Comments

@somera
Copy link

somera commented Dec 30, 2020

  • Gitea version (or commit ref): 1.13.1
  • Git version: 2.25.1
  • Operating system: Ubuntu 20.04.1
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite

Description

Today my gitea instance "lost" some avatars. Just started my server and started uodate mirrors task. During the process I created new organisation. Avatar was shown. Than I mirrored some projects to the new organisation and that I see:

image

image

And in the gitea.log I see for every missing avatar the same Avatar ID

2020/12/30 20:41:37 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:24 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:24 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:24 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:24 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:24 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:25 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:25 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:25 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:41 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:41 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:41 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:42 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:42 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:42 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:42 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:42 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:48 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:48 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:49 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:49 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:49 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:49 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e
2020/12/30 20:42:49 ...ers/routes/routes.go:165:func2() [W] Unable to find avatars d41d8cd98f00b204e9800998ecf8427e

During the update mirrors task I deleted an empty organisation.

Looks like all the organizations has the same avatar. Cause after I added new organisation the avatar with the ID d41d8cd98f00b204e9800998ecf8427e was created and all the 8 organisations refers to the same avatar ID.

image

@somera somera changed the title ...ers/routes/routes.go:165:func2() [W] Unable to find avatars xxxx Bug: 8 of my organisations refers to the same avatarID Dec 30, 2020
@techknowlogick
Copy link
Member

I feel like this could be related to #14176, at the very least be caused by something similar

@techknowlogick techknowlogick added topic/ui Change the appearance of the Gitea UI theme/avatar labels Dec 31, 2020
@somera
Copy link
Author

somera commented Dec 31, 2020

I feel like this could be related to #14176, at the very least be caused by something similar

Every new organisation overwrites the one Avatar ID with the new binary data. Looks like the bug was first in Gitea 1.13.0.

@somera
Copy link
Author

somera commented Dec 31, 2020

The avatar column in the user table for the last organisations

image

@lunny lunny added the type/bug label Dec 31, 2020
@lunny
Copy link
Member

lunny commented Jan 2, 2021

I think this is related with #13649 . On explore page,

-<img class="ui avatar image" src="{{.RelAvatarLink}}">
+					{{avatar .}}

Something maybe wrong, use_custom_avatar is true, but avatar stored the id of the organization. But I never set customized avatar on the UI.

image

After I updated use_custom_avatar from t to f for those organization stored id in column use_custom_avatar. It's work now.

We can do both things,

  1. correct wrong data on database, if use_custom_avatar is true, avatar should be a file hash but not user id.
  2. If an image missed, we can added a fallback image for the user.

@silverwind
Copy link
Member

Should be fixed by #14217.

@somera
Copy link
Author

somera commented Jan 3, 2021

Should be fixed by #14217.

Will the fix repair the affected organisations?

In which release will be the fix available?

@lunny
Copy link
Member

lunny commented Jan 3, 2021

@somera Will be the incoming v1.13.2

@lunny lunny added this to the 1.13.2 milestone Jan 3, 2021
@somera
Copy link
Author

somera commented Feb 2, 2021

@somera Will be the incoming v1.13.2

Thx. I updated to 1.13.2. And what I should do, to repair the affected organisations? Cause 57 have the same avatar.

@lunny
Copy link
Member

lunny commented Feb 3, 2021

@somera I think you can try updated use_custom_avatar from t to f for those organization stored id in column avatar.

@go-gitea go-gitea locked and limited conversation to collaborators Feb 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

No branches or pull requests

4 participants