I crossposted this as a bug report on github:
Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can.
The Basics
- Nextcloud Server version (e.g., 29.x.x):
Nextcloud Hub 9 (30.0.2)
- Operating system and version (e.g., Ubuntu 24.04):
Ubuntu 22.04.5 LTS (GNU/Linux 5.15.0-126-generic x86_64)
- Web server and version (e.g, Apache 2.4.25):
replace me
- Reverse proxy and version _(e.g. nginx 1.27.2)
replace me
- PHP version (e.g, 8.3):
8.3.13
- Is this the first time you’ve seen this error? (Yes / No):
yes
- When did this problem seem to first start?
November 26
- Installation method (e.g. AIO, NCP, Bare Metal/Archive, etc.)
AIO
- Are you using Cloudflare, mod_security, or similar? (Yes / No)
No
Summary of the issue you are facing:
Last week, previews stopped showing up for new photos taken on my iphone and uploaded to nextcloud. I am getting thousands of errors showing up in the log. This appears to be related to a problem with imagemagick which has been fixed in recent upgrades. Do we need to upgrade the imagemagick that ships with AIO?
ImageMagick version that ships with AIO currently is 7.1.1-32. Most recent version is 7.1.1-41.
root@2024-nextcloud-ubuntu-s-2vcpu-4gb-120gb-intel-nyc3-01:~# sudo docker exec --user www-data -it nextcloud-aio-nextcloud magick --version
Version: ImageMagick 7.1.1-32 Q16-HDRI x86_64 22207 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(4.5)
Delegates (built-in): bzlib cairo fftw fontconfig freetype gslib heic jng jpeg jxl lcms ltdl lzma pangocairo png ps raw rsvg tiff webp x xml zlib zstd
Compiler: gcc (13.2)
Steps to replicate it (hint: details matter!):
- Take some photos using iphone with iOS 18.1.1
- upload photos to nextcloud
- see that previews are not generated
- visit logs to see errors
Also, running magick from console generates the same error when processing a photo taken since I upgraded my iphone:
root@2024-nextcloud-ubuntu-s-2vcpu-4gb-120gb-intel-nyc3-01:~# sudo docker exec --user www-data -it nextcloud-aio-nextcloud magick identify -format "%m,%w,%h\n%[EXIF:*]" "/mnt/ncdata/nnn-1/files/nnn Photos/2024/12/24-12-03 08-50-07 7496.heic"
identify: Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) `/mnt/ncdata/nnn-1/files/nnn Photos/2024/12/24-12-03 08-50-07 7496.heic' @ error/heic.c/IsHEIFSuccess/144.
As compared to processing an older photo that works:
root@2024-nextcloud-ubuntu-s-2vcpu-4gb-120gb-intel-nyc3-01:/mnt/volume_nyc3_01/nextcloud/backup/files/backup/Photos Library/2024/2024-01-22# sudo docker exec --user www-data -it nextcloud-aio-nextcloud magick identify -format "%m,%w,%h\n%[EXIF:*]" "/mnt/ncdata/backup/files/backup/Photos Library/2024/2024-01-22/IMG_4752.HEIC"
HEIC,4284,5712
exif:ApertureValue=171202/102901
exif:BrightnessValue=12291/69091
exif:ColorSpace=65535
exif:DateTime=2024:01:22 17:23:32
exif:DateTimeDigitized=2024:01:22 17:23:32
exif:DateTimeOriginal=2024:01:22 17:23:32
exif:ExifOffset=220
exif:ExifVersion=0232
exif:ExposureBiasValue=0/1
exif:ExposureMode=0
exif:ExposureProgram=2
exif:ExposureTime=1/60
exif:Flash=16
exif:FNumber=89/50
exif:FocalLength=343/50
exif:FocalLengthIn35mmFilm=24
exif:LensMake=Apple
exif:LensModel=iPhone 15 Pro Max back triple camera 6.86mm f/1.78
exif:LensSpecification=1551800/699009, 1551800/699009, 1551800/699009, 1551800/699009
exif:Make=Apple
exif:MakerNote=Apple iOS
exif:MeteringMode=5
exif:Model=iPhone 15 Pro Max
exif:OffsetTime=-08:00
exif:OffsetTimeDigitized=-08:00
exif:OffsetTimeOriginal=-08:00
exif:Orientation=6
exif:PhotographicSensitivity=800
exif:PixelXDimension=5712
exif:PixelYDimension=4284
exif:ResolutionUnit=2
exif:SceneType=.
exif:SensingMethod=2
exif:ShutterSpeedValue=73847/12503
exif:Software=17.2.1
exif:SubjectArea=1087, 1087, 1087, 1087
exif:SubSecTimeDigitized=976
exif:SubSecTimeOriginal=976
exif:WhiteBalance=0
exif:XResolution=72/1
exif:YResolution=72/1
Log entries
Nextcloud
Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log
located in your data directory). Feel free to use a pastebin/gist service if necessary.
{"reqId":"9nw4pSuDjfpHdNkf4gSO","level":3,"time":"2024-12-05T16:29:21+00:00","remoteAddr":"73.19.12.15","user":"nnn-1","app":"core","method":"GET","url":"/core/preview?fileId=1643779&x=250&y=250","message":"File: /nnn-1/files/nnn Photos/2024/12/24-12-03 08-50-07 7496.heic Imagick says:","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36","version":"30.0.2.2","exception":{"Exception":"ImagickException","Message":"Invalid input: Unspecified: Metadata not correctly assigned to image (2.0) `/mnt/ncdata/nnn-1/files/nnn Photos/2024/12/24-12-03 08-50-07 7496.heic' @ error/heic.c/IsHEIFSuccess/144","Code":425,"Trace":[{"file":"/var/www/html/lib/private/Preview/HEIC.php","line":99,"function":"pingImage","class":"Imagick","type":"->","args":["/mnt/ncdata/nnn-1/files/nnn Photos/2024/12/24-12-03 08-50-07 7496.heic[0]"]},{"file":"/var/www/html/lib/private/Preview/HEIC.php","line":56,"function":"getResizedPreview","class":"OC\\Preview\\HEIC","type":"->","args":["/mnt/ncdata/nnn-1/files/nnn Photos/2024/12/24-12-03 08-50-07 7496.heic",2048,2048]},{"file":"/var/www/html/lib/private/Preview/GeneratorHelper.php","line":44,"function":"getThumbnail","class":"OC\\Preview\\HEIC","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},2048,2048]},{"file":"/var/www/html/lib/private/Preview/Generator.php","line":337,"function":"getThumbnail","class":"OC\\Preview\\GeneratorHelper","type":"->","args":[{"__class__":"OC\\Preview\\HEIC"},{"__class__":"OC\\Files\\Node\\File"},2048,2048]},{"file":"/var/www/html/lib/private/Preview/Generator.php","line":313,"function":"generateProviderPreview","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\SimpleFS\\SimpleFolder"},{"__class__":"OC\\Files\\Node\\File"},2048,2048,false,true,"image/heic",""]},{"file":"/var/www/html/lib/private/Preview/Generator.php","line":119,"function":"getMaxPreview","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\SimpleFS\\SimpleFolder"},[],{"__class__":"OC\\Files\\Node\\File"},"image/heic",""]},{"file":"/var/www/html/lib/private/Preview/Generator.php","line":86,"function":"generatePreviews","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},[{"width":250,"height":250,"crop":true,"mode":"fill"}],"image/heic"]},{"file":"/var/www/html/lib/private/PreviewManager.php","line":167,"function":"getPreview","class":"OC\\Preview\\Generator","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},250,250,true,"fill",null]},{"file":"/var/www/html/core/Controller/PreviewController.php","line":159,"function":"getPreview","class":"OC\\PreviewManager","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},250,250,true,"fill"]},{"file":"/var/www/html/core/Controller/PreviewController.php","line":123,"function":"fetchPreview","class":"OC\\Core\\Controller\\PreviewController","type":"->","args":[{"__class__":"OC\\Files\\Node\\File"},250,250,false,true,"fill",false]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"getPreviewByFileId","class":"OC\\Core\\Controller\\PreviewController","type":"->","args":[1643779,250,250,false,true,"fill",false]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\PreviewController"},"getPreviewByFileId"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OC\\Core\\Controller\\PreviewController"},"getPreviewByFileId"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OC\\Core\\Controller\\PreviewController","getPreviewByFileId",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"core.preview.getpreviewbyfileid"}]},{"file":"/var/www/html/lib/base.php","line":1001,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/core/preview"]},{"file":"/var/www/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Preview/HEIC.php","Line":99,"message":"File: /nnn-1/files/nnn Photos/2024/12/24-12-03 08-50-07 7496.heic Imagick says:","exception":[],"CustomMessage":"File: /nnn-1/files/nnn Photos/2024/12/24-12-03 08-50-07 7496.heic Imagick says:"},"id":"6751d55c59697"}
Web Browser
If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.
PASTE
Web server / Reverse Proxy
The output of your Apache/nginx/system log in /var/log/____
:
PASTE HERE
Configuration
Nextcloud
The output of occ config:list system
or similar is best, but, if not possible, the contents of your config.php
file from /path/to/nextcloud
is fine (make sure to remove any identifiable information!):
{
"system": {
"one-click-instance": true,
"one-click-instance.user-limit": 100,
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"appsallowlist": false,
"check_data_directory_permissions": false,
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"password": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"overwritehost": "nextcloud.nnn.org",
"overwriteprotocol": "https",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"nextcloud.nnn.org"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "30.0.2.2",
"overwrite.cli.url": "https:\/\/nextcloud.nnn.org\/",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"maintenance": false,
"loglevel": 2,
"log_type": "file",
"logfile": "\/var\/www\/html\/data\/nextcloud.log",
"log_rotate_size": "10485760",
"log.condition": {
"apps": [
"admin_audit"
]
},
"preview_max_x": 2048,
"preview_max_y": 2048,
"jpeg_quality": 60,
"enabledPreviewProviders": [
"OC\\Preview\\MP3",
"OC\\Preview\\TXT",
"OC\\Preview\\OpenDocument",
"OC\\Preview\\Movie",
"OC\\Preview\\Krita",
"OC\\Preview\\HEIC",
"OC\\Preview\\TIFF",
"OC\\Preview\\Image"
],
"enable_previews": true,
"upgrade.disable-web": true,
"mail_smtpmode": "smtp",
"trashbin_retention_obligation": "auto, 30",
"versions_retention_obligation": "auto, 30",
"activity_expire_days": "30",
"simpleSignUpLink.shown": false,
"share_folder": "\/Shared",
"one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
"upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
"updatedirectory": "\/nc-updater",
"maintenance_window_start": 100,
"allow_local_remote_servers": true,
"davstorage.request_timeout": 3600,
"htaccess.RewriteBase": "\/",
"dbpersistent": false,
"auth.bruteforce.protection.enabled": true,
"ratelimit.protection.enabled": true,
"files_external_allow_create_new_local": false,
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_sendmailmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "25",
"mail_smtpauth": 1,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"memories.db.triggers.fcu": true,
"memories.exiftool": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/exiftool-amd64-musl",
"memories.vod.path": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/go-vod-amd64",
"memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
"memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
"memories.gis_type": 2,
"default_phone_region": "US",
"defaultapp": "files,keeweb,memories",
"memories.vod.disable": false,
"documentation_url.server_logs": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/5425",
"preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
"DOMAIN": "nextcloud.nnn.org"
}
}
Apps
The output of occ app:list
(if possible).
Enabled:
- activity: 3.0.0
- app_api: 4.0.0
- bruteforcesettings: 3.0.0
- cloud_federation_api: 1.13.0
- dav: 1.31.1
- external: 5.5.2
- federatedfilesharing: 1.20.0
- files: 2.2.0
- files_downloadlimit: 3.0.0
- files_pdfviewer: 3.0.0
- files_sharing: 1.22.0
- files_trashbin: 1.20.1
- files_versions: 1.23.0
- keeweb: 0.6.20
- logreader: 3.0.0
- lookup_server_connector: 1.18.0
- memories: 7.4.1
- nextcloud-aio: 0.7.0
- notes: 4.11.0
- notify_push: 0.7.0
- oauth2: 1.18.1
- password_policy: 2.0.0
- photos: 3.0.2
- previewgenerator: 5.7.0
- provisioning_api: 1.20.0
- recognize: 8.1.1
- recommendations: 3.0.0
- related_resources: 1.5.0
- serverinfo: 2.0.0
- settings: 1.13.0
- sociallogin: 5.7.0
- support: 2.0.0
- systemtags: 1.20.0
- theming: 2.5.0
- twofactor_backupcodes: 1.19.0
- unroundedcorners: 1.1.4
- viewer: 3.0.0
- webhook_listeners: 1.1.0-dev
- workflowengine: 2.12.0
Disabled:
- admin_audit: 1.20.0 (installed 1.18.0)
- calendar: 5.0.6 (installed 5.0.6)
- circles: 30.0.0 (installed 28.0.0)
- comments: 1.20.1 (installed 1.18.0)
- contacts: 6.1.1 (installed 6.1.1)
- contactsinteraction: 1.11.0 (installed 1.9.0)
- dashboard: 7.10.0 (installed 7.8.0)
- deck: 1.14.2 (installed 1.14.2)
- encryption: 2.18.0
- federation: 1.20.0 (installed 1.18.0)
- files_archive: 1.2.3 (installed 1.2.3)
- files_external: 1.22.0
- files_reminders: 1.3.0 (installed 1.1.0)
- firstrunwizard: 3.0.0 (installed 2.17.0)
- groupfolders: 18.0.6 (installed 18.0.6)
- maps: 1.5.0 (installed 1.5.0)
- nextcloud_announcements: 2.0.0 (installed 1.17.0)
- notifications: 3.0.0 (installed 2.16.0)
- privacy: 2.0.0 (installed 1.12.0)
- sharebymail: 1.20.0 (installed 1.18.0)
- side_menu: 4.0.1 (installed 4.0.1)
- survey_client: 2.0.0 (installed 1.16.0)
- suspicious_login: 8.0.0
- tasks: 0.16.1 (installed 0.16.1)
- text: 4.1.0 (installed 3.9.1)
- theming_customcss: 1.17.0 (installed 1.17.0)
- twofactor_nextcloud_notification: 4.0.0
- twofactor_totp: 12.0.0-dev (installed 10.0.0-beta.2)
- user_ldap: 1.21.0
- user_status: 1.10.0 (installed 1.8.1)
- weather_status: 1.10.0 (installed 1.8.0)
Tips for increasing the likelihood of a response
- Use the
preformatted text
formatting option in the editor for all log entries and configuration output. - If screenshots are useful, feel free to include them.
- If possible, also include key error output in text form so it can be searched for.
- Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.