Unspecific error while changing avatar

While updating the Avatar we get an unexpected error “An Internal Error Has Occured.”

Investigating this error in a dockerized environment with DEBUG=true, we get more information like:

The file
was not found.

When investigating the filesystem, the file is indeed missing. But - because this is a fresh install - an image was created with a different path. So, hitting “Save” while updating the Avatar creates an image in the file system, but tries to access a different one!? First an empty “Avatar” directory:

root@pass_passbolt:/usr/share/php/passbolt/webroot/img/public/Avatar# ls -la
total 8
drwxr-xr-x 2 www-data www-data 4096 Apr 27 08:36 .
drwxr-xr-x 1 www-data www-data 4096 Apr 27 07:05 ..

Now we try to change the avatar (DEBUG=true) hitting “save” after uploading an PNG image 256x256px:

Looking immediately at the file system will show that the image was created under a different filename:

root@pass_passbolt:/usr/share/php/passbolt/webroot/img/public/Avatar# ls -la
total 12
drwxr-xr-x 3 www-data www-data 4096 Apr 27 08:42 .
drwxr-xr-x 1 www-data www-data 4096 Apr 27 07:05 ..
drwxr-xr-x 3 www-data www-data 4096 Apr 27 08:42 89


root@pass_passbolt:/usr/share/php/passbolt/webroot/img/public/Avatar# ls -la 89/ec/a7/91ab33ba50a7442a8022c59bc7097f60/91ab33ba50a7442a8022c59bc7097f60.png
-rw-r--r-- 1 www-data www-data 7958 Apr 27 08:42 89/ec/a7/91ab33ba50a7442a8022c59bc7097f60/91ab33ba50a7442a8022c59bc7097f60.png

This is strange!

We see this behavior on three different systems: test, stage and production. The Healthcheck shows only error that SSL isn’t forced, but we are behind a reverse proxy and this is expected. Everything else themes to be running fine.

What can we do?

Hi @Timm Welcome to the forum. This is strange indeed. Since you mentioned you are behind a reverse proxy, I was thinking this might be due to inadvertent caching settings.

Hi @garrett - thank you for jumping in, but there is no caching involved (except the browser cache), it’s just a simple Traefik Reverse Proxy which handles SSL-Termination and Routing. I’m loosing my mind on this. :frowning: