server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: Avatar New style looks weird

Open AndyXheli opened this issue 2 years ago • 30 comments

⚠️ This issue respects the following points: ⚠️

  • [X] This is a bug, not a question or a configuration/webserver/proxy issue.
  • [X] This issue is not already reported on Github (I've searched it).
  • [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • [X] Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • [X] I agree to follow Nextcloud's Code of Conduct.

Bug description

image image

Steps to reproduce

After this was implemented https://github.com/nextcloud/server/pull/33752

Expected behavior

Should look more clear. Th users back end is running LDAP @CarlSchwan what do you think?

Installation method

No response

Operating system

No response

PHP engine version

No response

Web server

No response

Database engine version

No response

Is this bug present after an update or on a fresh install?

No response

Are you using the Nextcloud Server Encryption module?

No response

What user-backends are you using?

  • [x] Default user-backend (database)
  • [x] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report

No response

List of activated Apps

Na

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

AndyXheli avatar Sep 09 '22 17:09 AndyXheli

Not fixed in NC 25 Beta 7

Same results

imageimage

AndyXheli avatar Sep 19 '22 18:09 AndyXheli

Oh now I see the issue, it wasn't about dark theme but the weird border

CarlSchwan avatar Sep 19 '22 18:09 CarlSchwan

Let me know if you have a manual patch you'd like to me test out

AndyXheli avatar Sep 19 '22 19:09 AndyXheli

Hello still having this issue on NC 25 RC1

AndyXheli avatar Sep 26 '22 18:09 AndyXheli

@CarlSchwan could this happen if imagick is not enabled on an instance?

szaimen avatar Sep 26 '22 18:09 szaimen

Just to confirm I do have imagick installed

AndyXheli avatar Sep 26 '22 18:09 AndyXheli

@andyxheli does your imagick setup have svg enabled? What is your instance overview saying?

https://cloud.domain.com/settings/admin/overview image

skjnldsv avatar Oct 23 '22 08:10 skjnldsv

Hi @skjnldsv yes I have php-imagick & imagemagick installed. In the server overview I got a green check no issues or recommendations

At first I didn't have imagemagick I just had php-imagick but I didn't get any warning on the server so I did some research and I seen that imagemagick so I did that also rebooted the server still the same issue

AndyXheli avatar Oct 23 '22 14:10 AndyXheli

Same problem on NC 25.0.1

Ho551 avatar Nov 16 '22 09:11 Ho551

@Ho551 have you upgrade through beta or RC before reaching stable 25 ?

If so, can you clear your avatars and try generate them again?

# cd into your appdata avatar directory
cd data/appdata_xxxxx/avatar

# look for generated avatar and delete their containing directory
find -name 'generated' -type f -execdir pwd \; | xargs -d '\n' rm -rfv

# update file cache to make Nextcloud generate them again on demand
occ files:scan-app-data avatar

skjnldsv avatar Nov 18 '22 07:11 skjnldsv

Thanks for the hint! I've updated through beta channel. I wanted to test NC in my test system first. I tried to generate the avatars again. Now the avatar in top bar looks good (for one user), but in setttings and talk it looks still weird:

image image

image image

Ho551 avatar Nov 18 '22 08:11 Ho551

I'm guessing this is a browser cache issue. Please clear cache or try in a private window @Ho551 ?

skjnldsv avatar Nov 18 '22 11:11 skjnldsv

That's what I suspected too, but the problem still persists. It occurs on Chrome, Safari and Firefox browsers. Is there any way I can help further @skjnldsv?

Ho551 avatar Nov 18 '22 11:11 Ho551

Thanks, it means the problem persist indeed :) I'll think about how to tackle that

skjnldsv avatar Nov 18 '22 12:11 skjnldsv

Hey there,

I'm having some similar issues. It seems to be related with the User Status app. After disabling it, the not-so-beautiful avatars appeared. Re-enabling the app only changed my personal avatar in the top right corner (which returns to be not-so-beautiful when (re)loading the page, but is replaced after the page is fully loaded with the better avatar.)

Screenshot from 2022-11-24 12-17-31 Screenshot from 2022-11-24 12-17-52 Screenshot from 2022-11-24 12-18-26

Nextcloud Version: 25.0.1 Firefox Version: 106.0.2 (64-bit) Client Ubuntu Version: 22.04.1 LTS

MoritzDPTV avatar Nov 24 '22 11:11 MoritzDPTV

Could be an outdated component, indeed. Nonetheless that does not explains this

image image

For everyone that have this issue, can you manually fetch the avatar files of the broken users in your data/appdata/avatar/USERID and post them here please?

I need to know the source of the issue, if it's coming from a broken generation or somewhere else :)

skjnldsv avatar Nov 24 '22 13:11 skjnldsv

@skjnldsv Looking at the generated images, this seems to be the problem. In the 64x64px image, the unsightly edge is already visible avatar 64

I attach the entire generated avatars in a zip archive avatar.zip

Ho551 avatar Nov 24 '22 13:11 Ho551

Thank you @Ho551 , it really helps! :pray: Ok, so it is definitely something with our svg or the php dependency

skjnldsv avatar Nov 24 '22 13:11 skjnldsv

You're welcome! I have probably found the problem. My server was set up with PHP 8.0 until 2 days ago. Now I've updated to PHP 8.1 and just regenerated the avatars again...Now everything looks fine:

admin_avatar 64 test_avatar 64

So just update everyone to PHP 8.1 - it's better either way 😁

Ho551 avatar Nov 24 '22 13:11 Ho551

@come-nc ring a bell? Maybe a difference in parameters between 8.0 and 8.1?

skjnldsv avatar Nov 24 '22 17:11 skjnldsv

I'm running PHP 8.1 on NC25.0.1 and still have issue

AndyXheli avatar Nov 24 '22 18:11 AndyXheli

@come-nc ring a bell? Maybe a difference in parameters between 8.0 and 8.1?

Hum, kind of. I remember having a problem with gd or imagick changing result is some PHP version.

come-nc avatar Nov 28 '22 08:11 come-nc

I have this test script left over on my disk, which indicates I did have trouble with this:

<?php

$font = '/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf';

var_dump(imagettfbbox(12, 0, $font, 'E'));

But I’m failing to find any more information on this. All I can see is I have commands in my history to check which version of gd/freetype is linked to my PHP build. So I can only advise to test the result of imagettfbbox and compare it accross PHP versions and setups.

come-nc avatar Nov 28 '22 08:11 come-nc

Here is what I have locally:

> php ~/dev/test-freetype.php
array(8) {
  [0]=>
  int(1)
  [1]=>
  int(0)
  [2]=>
  int(8)
  [3]=>
  int(0)
  [4]=>
  int(8)
  [5]=>
  int(-11)
  [6]=>
  int(1)
  [7]=>
  int(-11)
}
> php --info|grep -i gd
/etc/php/8.1/cli/conf.d/20-gd.ini,
gd
GD Support => enabled
GD headers Version => 2.3.0
GD library Version => 2.3.0
gd.jpeg_ignore_warning => 1 => 1
> php --info|grep -i freetype
FreeType Support => enabled
FreeType Linkage => with freetype

And with my PHP 8.2 built from source for tests:

> ~/dev/php-src-git/sapi/cli/php ~/dev/test-freetype.php
array(8) {
  [0]=>
  int(1)
  [1]=>
  int(0)
  [2]=>
  int(8)
  [3]=>
  int(0)
  [4]=>
  int(8)
  [5]=>
  int(-12)
  [6]=>
  int(1)
  [7]=>
  int(-12)
}
> ~/dev/php-src-git/sapi/cli/php --info|grep -i gd
Configure Command =>  './configure'  '--with-ldap' '--with-ldap-sasl' '--with-zip' '--with-curl' '--with-openssl' '--with-zlib' '--enable-mbstring' '--enable-pcntl' '--enable-intl' '--with-password-argon2' '--with-freetype' '--with-jpeg' '--enable-gd' '--with-imagick' '--enable-exif'
gd
GD Support => enabled
GD Version => bundled (2.1.0 compatible)
gd.jpeg_ignore_warning => On => On
> ~/dev/php-src-git/sapi/cli/php --info|grep -i freetype
Configure Command =>  './configure'  '--with-ldap' '--with-ldap-sasl' '--with-zip' '--with-curl' '--with-openssl' '--with-zlib' '--enable-mbstring' '--enable-pcntl' '--enable-intl' '--with-password-argon2' '--with-freetype' '--with-jpeg' '--enable-gd' '--with-imagick' '--enable-exif'
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.11.1

So there is a 1 pixel difference between my 2 local versions already.

come-nc avatar Nov 28 '22 08:11 come-nc

Interesting! So is the issue maybe only reproducible on php 8.0 and below?

szaimen avatar Nov 28 '22 09:11 szaimen

No I think it depends upon which gd and/or freetype version is used. We need to test on as many setups as possible to see common patterns.

come-nc avatar Nov 28 '22 11:11 come-nc

Still an issue on NC 25.0.3

AndyXheli avatar Jan 17 '23 16:01 AndyXheli

In case some of the devs need a instance to reproduce it. The problem also exists on the LTD's on try.nextcloud.com

schiessle avatar Mar 27 '23 12:03 schiessle

Still an issue on NC 26.0.0

AndyXheli avatar Mar 29 '23 15:03 AndyXheli

Still an issue NC 27

AndyXheli avatar Jun 14 '23 16:06 AndyXheli