memories icon indicating copy to clipboard operation
memories copied to clipboard

Filenames with special characters cause ERROR: Exiftool may have crashed, restarting process

Open ohthehugemanatee opened this issue 1 year ago • 5 comments

Describe the bug Filenames with special characters or accents cause a logged error message "ERROR: Exiftool may have crashed, restarting process" .

To Reproduce Steps to reproduce the behavior:

  1. Upload an image file with an umlaut in the filename.
  2. Run occ memories:index --user=username --path="/path/to/containing/directory" --force

Platform:

(All values from inside the container)

  • OS: Alpine Linux 3.17.3 (image: lscr.io/linuxserver/nextcloud:26.0.0-ls238) on x64
  • Browser: N/A, occurs on cron or in terminal occ.
  • Memories Version: 5.2.1
  • Nextcloud Version: 27.0.0
  • PHP Version: 8.1.18

Additional context None

  • Any errors in the JS console? N/A
  • Any errors in the Nextcloud server logs? This bug is about errors in the server logs.

ohthehugemanatee avatar Jul 14 '23 19:07 ohthehugemanatee

Example name? can't repro here

pulsejet avatar Jul 22 '23 03:07 pulsejet

I think emojis in the path will do it, try putting media in a folder called "🐐🌋🐇"

Raudius avatar Jul 27 '23 16:07 Raudius

No luck, everything works fine for me. Perhaps a bug in alpine ...,

pulsejet avatar Jul 29 '23 17:07 pulsejet

Sample name: "Live show in Düsseldorf.jpeg" when i was originally looking into the problem, I thought it might be a quoting issue, ie allowing the interpreter to handle the special character rather than passing it as a literal.

Can anyone else repro with the linuxserver container? That's alpine based.

It's an NFS mounted filesystem, if that makes any difference.

I could try running exiftool manually against the file... what is the actual command?

On Sat, 29 Jul 2023, 19:11 Varun Patil, @.***> wrote:

No luck, everything works fine for me. Perhaps a bug in alpine ...,

— Reply to this email directly, view it on GitHub https://github.com/pulsejet/memories/issues/740#issuecomment-1656791773 or unsubscribe https://github.com/notifications/unsubscribe-auth/AAG5P6PCSB43CG2VKLZWWGLXSU72PBFKMF2HI4TJMJ2XIZLTSSBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLAVFOZQWY5LFVI2DKMZVGUZTAMJXGWSG4YLNMWUWQYLTL5WGCYTFNSWHG5LCNJSWG5C7OR4XAZNMJFZXG5LFINXW23LFNZ2KM5DPOBUWG44TQKSHI6LQMWVHEZLQN5ZWS5DPOJ42K5TBNR2WLKJVGI2DENZSHE4DLAVEOR4XAZNFNFZXG5LFUV3GC3DVMWVDCOBQGU2DONZZGA4IFJDUPFYGLJLMMFRGK3FFOZQWY5LFVI2DKMZVGUZTAMJXGWTXI4TJM5TWK4VGMNZGKYLUMU . You are receiving this email because you authored the thread.

Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

ohthehugemanatee avatar Jul 30 '23 07:07 ohthehugemanatee

Not sure if it helps, but I'v just seen something like it here. I have resently setup memories on my Nextcloud and noticed that one user have a couple of pictures showing up in the log repeatedly. I have my daughters permission to share this (and the picture if needed).

Feb 25 16:40:24 sky php[21588]: ERROR: Exiftool may have crashed, restarting process [/opt/owncloud/maja/files/Studie/Dokumenter/Før2008/Dokumenter/Billeder/Mit smukke h]
Feb 25 16:40:25 sky Nextcloud[21588]: {"reqId":"9RkFhNkvbaKQl84JtB5w","level":3,"time":"2024-02-25T16:40:25+01:00","remoteAddr":"","user":"--","app":"memories","method":"","url":"--","message":"Failed to index file /maja/files/Studie/Dokumenter/F\u00f8r2008/Dokumenter/Billeder/Mit smukke h: Nothing to read from Exiftool","userAgent":"--","version":"27.1.6.2","data":{"app":"memories"}}

The folder is from one af min daughters previous phones and might have been copied over to several devices, before ending up in our family Nextcloud. Looking closer on the one of the files it turned out that the filenames was a quite a bit off, so I renamed it.

wwwrun@sky:/opt/owncloud/maja/files/Studie/Dokumenter/Før2008/Dokumenter/Billeder> ls -b Mit\ smukke\ h�r\ \!.BMP
Mit\ smukke\ h\345r\ !.BMP
wwwrun@sky:/opt/owncloud/maja/files/Studie/Dokumenter/Før2008/Dokumenter/Billeder> mv Mit\ smukke\ h�r\ \!.BMP "Mit smukke hår.BMP"

After renaming, I ran a file:rescan followed by memories:index - but still I get:

'localadm@sky:~> sudo -u wwwrun -s /bin/bash  -c  '/usr/bin/php  /srv/www/htdocs/nextcloud/occ memories:index --user=maja  --force'
Forcing refresh of existing index entries
Indexing user maja
Indexing file /maja/files/Studie/Dokumenter/Før2008/Dokumenter/Billeder/Mit smukke h
ERROR: Exiftool may have crashed, restarting process [/opt/owncloud/maja/files/Studie/Dokumenter/Før2008/Dokumenter/Billeder/Mit smukke h]
Failed to index file /maja/files/Studie/Dokumenter/Før2008/Dokumenter/Billeder/Mit smukke h: Nothing to read from Exiftool

So I am out of ideas. Although memories states "Forcing refresh of existing index entries" it looks to me like the old filename is still around.

The picture itself is a old blurry one of no value, so we might just delete it. But if anyone want me to debug further before getting rid of it, just ping me.

MrManor avatar Feb 25 '24 16:02 MrManor