monicahq / monica

Personal CRM. Remember everything about your friends, family and business relationships.
https://beta.monicahq.com
GNU Affero General Public License v3.0
21.65k stars 2.16k forks source link

Cannot re-add photos to some contacts after Monica migration #5257

Open mgrhm opened 3 years ago

mgrhm commented 3 years ago

Since migrating to a fresh install of Monica, I can't re-add photos some contacts that previously had photos. When trying to, I get this error dialogue:

Screenshot 2021-06-07 at 08 23 08

Strangely, this doesn't happen with all contacts who previously had photos -- only some of them. It happens if I use new photos or try to use the ones I previously used which I'd grabbed from Monica before reinstalling.

asbiin commented 3 years ago

What are the data sent to the request?

mgrhm commented 3 years ago

The data is just a photo in JPEG format. It happens if I use the same photo as before, or if I use a different one.

nhymxu commented 3 years ago

I checked that file path is public/storage/photos But new version using url http://monica.instance/store/photos

So is it problem?

My instance back to work after run this command:

cd /path/to/monica/public
ln -s /path/to/monica/storage/app/public store
mgrhm commented 3 years ago

It appears to have been fixed by resetting Monica to v3.0.1 and then running

php artisan monica:update --force

Thanks everyone for your help!

mgrhm commented 3 years ago

There’s something more at play here. Some of the contacts can be changed, some can't. I'm running 3.1.1 and still having this issue inconsistently. Running the monica:update command doesn't fix it.

cweagans commented 3 years ago

Same problem here on 3.1.1. The page is asking for /store/avatars/[hash].jpg, but the image actually exists at /storage/avatars/[hash].jpg.

justsomebody42 commented 3 years ago

I have the same issue with Version: 3.3.1 running in a docker container. I checked all permissions and tried other hints as well. I'm even unable to upload a picture for new contacts. The error message is the same.

The only error message that shows up in the logs is:

192.168.240.1 - - [19/Oct/2021:08:25:33 +0000] "POST /people/h:6KyP2YXMDAgwW9gpGd/avatar HTTP/1.1" 302 1725 "http://192.168.1.110:8181/people/h:6KyP2YXMDAgwW9gpGd/avatar" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0"

I couldn't find an environment var to enable debug in the docker configuration. If there's a way, I can provide more logs.

Brice187 commented 2 years ago

still an issue in 3.5.0

sebklaus commented 2 years ago

It's still an issue in 3.6.1. Avatar uploads work perfectly fine when done from a Desktop, but using in-built camera on a tablet (for example) results in this error. Picking a photo from the Library works, sometimes. No Laravel logs are created, docker logs show 302 as stated above.

mgrhm commented 2 years ago

I finally upgraded to 3.7.0, and this issue still exists.