User Avatar Missing, can't upload new ones

After updating Passbolt to the latest version (Docker), some of our user avatars are missing and i can’t upload a new one. I tried .jpg and .png files.

Error Log:

Summary

2019-10-16 09:31:22 Error: [Cake\Routing\Exception\MissingRouteException] A route matching “/img/public/Avatar/2e/18/3e/539d841c5fa74439a80bea146ad18552/539d841c5fa74439a80bea146ad18552.65a0ba70.png” could not be found. Request URL: /img/public/Avatar/2e/18/3e/539d841c5fa74439a80bea146ad18552/539d841c5fa74439a80bea146ad18552.65a0ba70.png Referer URL: https://passbolt.domain.dev/app/users

2019-10-16 09:31:25 Error: [Cake\Routing\Exception\MissingRouteException] A route matching “/img/public/Avatar/2e/18/3e/539d841c5fa74439a80bea146ad18552/539d841c5fa74439a80bea146ad18552.65a0ba70.png” could not be found. Request URL: /img/public/Avatar/2e/18/3e/539d841c5fa74439a80bea146ad18552/539d841c5fa74439a80bea146ad18552.65a0ba70.png Referer URL: https://passbolt.domain.dev/app/users
2019-10-16 09:33:11 Error: [Cake\Routing\Exception\MissingRouteException] A route matching “/img/public/Avatar/2e/18/3e/539d841c5fa74439a80bea146ad18552/539d841c5fa74439a80bea146ad18552.65a0ba70.png” could not be found. Request URL: /img/public/Avatar/2e/18/3e/539d841c5fa74439a80bea146ad18552/539d841c5fa74439a80bea146ad18552.65a0ba70.png Referer URL: https://passbolt.domain.dev/app/users
2019-10-16 09:39:56 Error: [Cake\Routing\Exception\MissingRouteException] A route matching “/img/public/Avatar/2e/18/3e/539d841c5fa74439a80bea146ad18552/539d841c5fa74439a80bea146ad18552.65a0ba70.png” could not be found. Request URL: /img/public/Avatar/2e/18/3e/539d841c5fa74439a80bea146ad18552/539d841c5fa74439a80bea146ad18552.65a0ba70.png Referer URL: https://passbolt.domain.dev/
2019-10-16 09:41:56 Error: [Cake\Routing\Exception\MissingRouteException] A route matching “/img/public/Avatar/2e/18/3e/539d841c5fa74439a80bea146ad18552/539d841c5fa74439a80bea146ad18552.a99472d5.png” could not be found. Request URL: /img/public/Avatar/2e/18/3e/539d841c5fa74439a80bea146ad18552/539d841c5fa74439a80bea146ad18552.a99472d5.png Referer URL: https://passbolt.domain.dev/app/settings/profile

Browser Log:

Summary

Failed to load resource: the server responded with a status of 404 (Not Found)
539d841c5fa74439a80bea146ad18552.a99472d5.png:1
Failed to load resource: the server responded with a status of 404 (Not Found)
/users/58e62652-8d5a-4412-9cd1-20dc3334e2ef.json?api-version=v2:100
Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Inside the docker container at “/var/www/passbolt/webroot/img/public/Avatar” the folder “2e” is missing. The owner of the folder is “www-data”, group “www-data”.

Hi @tobi,

I’m not sure what happened and why that folder is missing on your file system, but one way to “repair” would be to truncate the content of the file_storage table in your database. From there you should be able to upload new avatars, provided you have the right permissions set on the public folder.

This happened to me when I didn’t have persistent storage for the docker image, so when the pod restarted or got updated they were lost. (as that’s how docker works)

so I just created one and then mounted it like so

 - name: images
   persistentVolumeClaim:
     claimName: passbolt

 - mountPath: /var/www/passbolt/webroot/img/public
        name: images

As Remy stated, i did the same, I fixed it by manually going into the database and replacing all of the images with the default image since they were lost and not found.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.