Server: Text is not generated along avatar in NC 13.0.0 RC 4

Created on 5 Feb 2018  路  35Comments  路  Source: nextcloud/server

Steps to reproduce

Install 12.0.0 from https://download.nextcloud.com/server/releases on CentOS 7 with PHP 7.1.13

Packages that I have installed along PHP are

- policycoreutils-python
- lbzip2-utils
- openssl
- php71w-fpm
- php71w-opcache
- php71w-common # ctype, iconv, json, libxml, simplexml, zip, zlib, curl, fileinfo, bz2, openssl, ftp, exif, gmp
- php71w-xml
- php71w-gd 
- php71w-xml # dom, xmlreader, xmlwriter
- php71w-mbstring 
- php71w-intl # intl
- php71w-mcrypt
- php71w-mysql
- php71w-ldap
- php71w-imap
- php71w-pecl-apcu 
- php71w-pecl-redis
- php71w-pecl-imagick
- php71w-process # posix
- libreoffice

Update to NC 13.0.0 RC 4 via web based updater.

Go to settings and update your Full name

Avatar (circle) will change colour but it won't have any letters.

Error log will include:

imagettftext(): Could not read font at /var/www/nextcloud/lib/private/Avatar.php#266
imagettfbbox(): Could not read font at /var/www/nextcloud/lib/private/Avatar.php#260

Expected behaviour

Avatar should get updated with letters generated using OpenSans-Semibold.woff

Actual behaviour

Avatar does not gain any letters inside it, it just changes a colour.

I have tried setting up a separate new CentOS 7 with fresh NC, and this error occurred there again.

When I changed OpenSans-Semibold.woff with ttf OpenSans-Regular.ttf, it worked.

I have GD2, FreeType enabled:

screen shot 2018-02-06 at 12 54 06 am

Server configuration

Operating system:

CentOS Linux release 7.4.1708 (Core)

Web server:

nginx/1.12.2

Database:

mysql Ver 15.1 Distrib 10.2.12-MariaDB, for Linux (x86_64) using readline 5.1

PHP version:

PHP 7.1.13 (cli)

Nextcloud version: (see Nextcloud admin page)

13.0.0 RC4

Updated from an older Nextcloud/ownCloud or fresh install:

Updated from 12.0.0

Where did you install Nextcloud from:

https://download.nextcloud.com/server/releases

Signing status:


Signing status

No errors have been found.

List of activated apps:


App list

Enabled:
  - activity: 2.6.1
  - announcementcenter: 3.1.1
  - bruteforcesettings: 1.0.3
  - caniupdate: 0.1.2
  - comments: 1.3.0
  - dav: 1.4.6
  - external: 3.0.1
  - federatedfilesharing: 1.3.1
  - federation: 1.3.0
  - files: 1.8.0
  - files_pdfviewer: 1.2.0
  - files_sharing: 1.5.0
  - files_texteditor: 2.5.1
  - files_trashbin: 1.3.0
  - files_versions: 1.6.0
  - files_videoplayer: 1.2.0
  - firstrunwizard: 2.2.1
  - gallery: 18.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.1.0
  - metadata: 0.6.0
  - nextcloud_announcements: 1.2.0
  - notifications: 2.1.2
  - oauth2: 1.1.0
  - password_policy: 1.3.0
  - provisioning_api: 1.3.0
  - serverinfo: 1.3.0
  - sharebymail: 1.3.0
  - systemtags: 1.3.0
  - theming: 1.4.1
  - twofactor_backupcodes: 1.2.3
  - unsplash: 1.0.5
  - updatenotification: 1.3.0
  - workflowengine: 1.3.0
Disabled:
  - admin_audit
  - contacts
  - encryption
  - files_downloadactivity
  - files_external
  - keeweb
  - quota_warning
  - survey_client
  - user_external
  - user_ldap

Nextcloud configuration:


Config report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "13.0.0.13",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "***REMOVED SENSITIVE VALUE***",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": "0"
        },
        "objectstore": {
            "class": "OC\\Files\\ObjectStore\\S3",
            "arguments": {
                "bucket": "nextcloud",
                "autocreate": true,
                "key": "***REMOVED SENSITIVE VALUE***",
                "secret": "***REMOVED SENSITIVE VALUE***",
                "hostname": "***REMOVED SENSITIVE VALUE***",
                "port": ***REMOVED SENSITIVE VALUE***,
                "use_ssl": false,
                "region": "optional",
                "use_path_style": true
            }
        },
        "asset-pipeline.enabled": "true",
        "skeletondirectory": "",
        "enable_previews": true,
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": "1",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "default_language": "ka_GE",
        "tempdirectory": "\/data\/nextcloud\/tmp",
        "updater.release.channel": "stable",
        "preview_max_x": "2000",
        "preview_max_y": "2000",
        "trashbin_retention_obligation": "31, 31"
    }
}

Are you using external storage, if yes which one:

Local minio server

Are you using encryption:

no

Are you using an external user-backend, if yes which one:

no

Client configuration

Browser:

63.0.3239.132 (Official Build) (64-bit)

Operating system:

macOS High Sierra 10.13.4 Beta

Logs

Web server error log


Web server error log

2018/02/05 22:00:19 [error] 21865#0: *68 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: **Removed sentivive value**, server: **Removed sentivive value**, request: "GET /apps/logreader/poll?lastReqId=MuV0nZ1bDKwB72tgA5Jh HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "**Removed sentivive value**"
2018/02/05 22:39:13 [error] 22587#0: *1 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: **Removed sentivive value**, server: **Removed sentivive value**, request: "GET /apps/logreader/poll?lastReqId=SPY3on4JiibTTMGMhimH HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "**Removed sentivive value**"

Nextcloud log (data/nextcloud.log)


Nextcloud log

{"reqId":"ewO5hqPWBrq66EqTYqvC","level":3,"time":"2018-02-05T20:07:01+00:00","remoteAddr":"Removed sentivive value","user":"dachi","app":"PHP","method":"GET","url":"\/avatar\/dachi\/64?v=-373","message":"imagettfbbox(): Could not read font at \/var\/www\/nextcloud\/lib\/private\/Avatar.php#259","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.132 Safari\/537.36","version":"13.0.0.13"}
{"reqId":"ewO5hqPWBrq66EqTYqvC","level":3,"time":"2018-02-05T20:07:01+00:00","remoteAddr":"Removed sentivive value","user":"dachi","app":"PHP","method":"GET","url":"\/avatar\/dachi\/64?v=-373","message":"imagettftext(): Could not read font at \/var\/www\/nextcloud\/lib\/private\/Avatar.php#265","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.132 Safari\/537.36","version":"13.0.0.13"}
{"reqId":"TbHKpvTfeBp3vUwED4kA","level":3,"time":"2018-02-05T20:07:01+00:00","remoteAddr":"Removed sentivive value","user":"dachi","app":"PHP","method":"GET","url":"\/avatar\/dachi\/290?v=-373","message":"imagettfbbox(): Could not read font at \/var\/www\/nextcloud\/lib\/private\/Avatar.php#259","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.132 Safari\/537.36","version":"13.0.0.13"}
{"reqId":"TbHKpvTfeBp3vUwED4kA","level":3,"time":"2018-02-05T20:07:01+00:00","remoteAddr":"Removed sentivive value","user":"dachi","app":"PHP","method":"GET","url":"\/avatar\/dachi\/290?v=-373","message":"imagettftext(): Could not read font at \/var\/www\/nextcloud\/lib\/private\/Avatar.php#265","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.132 Safari\/537.36","version":"13.0.0.13"}
{"reqId":"ZBip1VJ8810wB7HNn0OQ","level":3,"time":"2018-02-05T20:47:04+00:00","remoteAddr":"Removed sentivive value","user":"dachi","app":"PHP","method":"PUT","url":"\/settings\/users\/dachi\/settings","message":"imagettfbbox(): Could not read font at \/var\/www\/nextcloud\/lib\/private\/Avatar.php#259","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.132 Safari\/537.36","version":"13.0.0.13"}
{"reqId":"ZBip1VJ8810wB7HNn0OQ","level":3,"time":"2018-02-05T20:47:04+00:00","remoteAddr":"Removed sentivive value","user":"dachi","app":"PHP","method":"PUT","url":"\/settings\/users\/dachi\/settings","message":"imagettftext(): Could not read font at \/var\/www\/nextcloud\/lib\/private\/Avatar.php#265","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.132 Safari\/537.36","version":"13.0.0.13"}
{"reqId":"2nyZPoezfOTKtImXXzj5","level":3,"time":"2018-02-05T20:47:04+00:00","remoteAddr":"Removed sentivive value","user":"dachi","app":"PHP","method":"GET","url":"\/avatar\/dachi\/64?v=-796","message":"imagettfbbox(): Could not read font at \/var\/www\/nextcloud\/lib\/private\/Avatar.php#259","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.132 Safari\/537.36","version":"13.0.0.13"}
{"reqId":"2nyZPoezfOTKtImXXzj5","level":3,"time":"2018-02-05T20:47:04+00:00","remoteAddr":"Removed sentivive value","user":"dachi","app":"PHP","method":"GET","url":"\/avatar\/dachi\/64?v=-796","message":"imagettftext(): Could not read font at \/var\/www\/nextcloud\/lib\/private\/Avatar.php#265","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.132 Safari\/537.36","version":"13.0.0.13"}
{"reqId":"OWipKMFlQyIEpSqWAFSG","level":3,"time":"2018-02-05T20:47:04+00:00","remoteAddr":"Removed sentivive value","user":"dachi","app":"PHP","method":"GET","url":"\/avatar\/dachi\/290?v=-796","message":"imagettfbbox(): Could not read font at \/var\/www\/nextcloud\/lib\/private\/Avatar.php#259","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.132 Safari\/537.36","version":"13.0.0.13"}
{"reqId":"OWipKMFlQyIEpSqWAFSG","level":3,"time":"2018-02-05T20:47:04+00:00","remoteAddr":"Removed sentivive value","user":"dachi","app":"PHP","method":"GET","url":"\/avatar\/dachi\/290?v=-796","message":"imagettftext(): Could not read font at \/var\/www\/nextcloud\/lib\/private\/Avatar.php#265","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/63.0.3239.132 Safari\/537.36","version":"13.0.0.13"}

Browser log


Browser log

64?v=-86 | 200 | png | merged-template-prepend.js?v=3793cd21-6:5178 | 895聽B | 59聽ms
-- | -- | -- | -- | -- | --
290?v=-86 | 200 | png | merged-template-prepend.js?v=3793cd21-6:5178 | 1.6聽KB | 82聽ms

bug previews and thumbnails

Most helpful comment

We could add 27 fallback avatars (one per a-z and one for everything else) and use them if the method fails and we can detect it.

All 35 comments

Same Problem here after Upgrade 12->13.

I have tried this with recent NC 13. And with on another server with PHP 7.2. Still getting this error.

i am also getting this error after upgrading from 12 to 13 just now...

Could you open the settings and go there to the admin section: are there any hints listed in the setup checks?

Negative! No obvious hint.
However, I just noticed that under Monitoring, the graphs CPU Load and Memory Usage no longer show anything.
Everything else seems to be fine. Nothing else is to be found in the OC log either.

Negative! No obvious hint.

:/ Okay - then it's not the missing font, because that would show up in the setup checks.

I'm also having that problem. It can be reproduced quick and easy with https://uberspace.de (U6 & U7).

Same there.
Want a fix.

cc @nextcloud/theming @juliushaertl @rullzer for the avatars.

What OS are you on?
What php packages are installed?
Can you link me to a full phpinfo output?

Set up a test space:

aaaah

Seems you need to update your freetype version: https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/ChangeLog.25#n3640

I'll see if I can add a check for this in the admin settings.

checked my test server and it have freetype and latest version it seems. and still get the issue.. hmm

@rullzer is it possible to deactivate the function? Because CentOS 7 has only 2.4.11 (freetype-2.4.11-15.el7.x86_64)

I can confirm that issue with CentOS 7 and freetype.x86_64 2.4.11-15.el7 after 12.0.5 to 13.0.0.14

@tmaff unfortunatly no we can't. We need generated default avatars in order to show them reliably in apps (think collabora/talk etc) and on the clients (android/ios/desktop) etc.

Also 2.4.11 was released over 5 years ago... seems an upgrade is not such a bad idea...

@MrLordy can you give me your phpinfo output?

@rullzer it worked before, maybe just revert the changes ? I have centos too and updating freetype library is much of pain(because it's latest one in centos repos, so we have to compile it from the source, and doing other hacks).

@Temtaime no it did not, not everywhere. You didn't have proper avatars everywhere then. It only worked in very specific parts of the web app.

@rullzer https://mobile.twitter.com/ubernauten/status/963092676584361985 seem to be the outdated CentOS repos 馃檮

We could add 27 fallback avatars (one per a-z and one for everything else) and use them if the method fails and we can detect it.

@nickvergessen I like that approach!

We could add 27 fallback avatars (one per a-z and one for everything else) and use them if the method fails and we can detect it.

The advantage of using them is, that the letters may be aligned better ... maybe we should consider using them all the time :)

The advantage of using them is, that the letters may be aligned better ... maybe we should consider using them all the time :)

Well the current method makes the color based on the full name, not on the first char only.

Just to be clear -- leaving as it is now means that CentOS instances are buggy now :)
There is no freetype version at prerequisites page.

Well the current method makes the color based on the full name, not on the first char only.

Why not generate then only the letter with transparent background and load that instead of the font letter 馃槈 馃殌

Why not generate then only the letter with transparent background and load that instead of the font letter 馃槈 馃殌

And in the same step drop the dependency on the font thing and only go one way and not 2 ;)

We then still have the problem: what about numbers, special characters like 莽枚玫锚拧 or non-latin characters?

Maybe just drop woff fonts and use supported ones ?

Same Problem for me after Upgrade 12->13.

@Temtaime so simple :S Let me add the ttf versions and switch over the generation

Please check if #8428 fixes the issues for you

I can confirm the patch proposed in #8428 fixes the issue for me, thanks!

In my side, the patch stopped the message error log but still no profil letter avatar.

Was this page helpful?
0 / 5 - 0 ratings