Media Tab Broken
Using Nextcloud Matheria for iOS 7.0.1.3 Β© 2025 and Nextcloud Server 31.0.6
Another new problem has been observed. Prior to the version seven updates users were able to select their nextcloud root folder as the media folder and the media tab would populate with all of the photos that would be in sub folders in their nextcloud
Now this is not happening. If new photos are uploaded to some sub folder in their installation, they will appear in the media tab, but nothing pre-existing.
this was observed in the logs and maybe it has something to do with it?
2025-07-12 10:20:56 [START] Start searchMedia with lessDate 4001-01-01 00:00:00 +0000, greaterDate 0001-01-01 00:00:00 +0000, limit 300
How is #3586 related??
Yes me too, I find that the loading of media in the Media tab is very slow and works poorly with subfolders. For example, I have a folder at the root /Images/, inside I have a sub-folder /images/autoupload/year/month/, but I also have many sub-folders outside /images/family/etc/etc.
When I have to reload all the media due to a cache loss of the previews like after update 7.1.0 for example, the previews load well for the last auto upload folder so the current month. But loads almost no other files located in /images/here/.
In my opinion, the media tab should first analyze all the folders under the selected folder and index all the media, and once it has been loaded the previews. (like the memories app on web nextcloud)
The only solution I found for my 20162 photos and 1564 videos to be displayed in the Media tab is to go one by one into each folder and sub-folder from Files and refresh the folder. Itβs very long and requires walking around in absolutely every file, but it works really well.
For example, just for my auto-upload file, it makes me enter 57 folders:
02 - Images/iPhone/ βββ 2020 βΒ Β βββ 12 βββ 2021 βΒ Β βββ 01 βΒ Β βββ 02 βΒ Β βββ 03 βΒ Β βββ 04 βΒ Β βββ 05 βΒ Β βββ 06 βΒ Β βββ 07 βΒ Β βββ 08 βΒ Β βββ 09 βΒ Β βββ 10 βΒ Β βββ 11 βββ 2022 βΒ Β βββ 01 βΒ Β βββ 02 βΒ Β βββ 03 βΒ Β βββ 04 βΒ Β βββ 05 βΒ Β βββ 06 βΒ Β βββ 07 βΒ Β βββ 08 βΒ Β βββ 09 βΒ Β βββ 10 βΒ Β βββ 11 βΒ Β βββ 12 βββ 2023 βΒ Β βββ 01 βΒ Β βββ 02 βΒ Β βββ 03 βΒ Β βββ 04 βΒ Β βββ 05 βΒ Β βββ 06 βΒ Β βββ 07 βΒ Β βββ 08 βΒ Β βββ 09 βΒ Β βββ 10 βΒ Β βββ 11 βΒ Β βββ 12 βββ 2024 βΒ Β βββ 01 βΒ Β βββ 02 βΒ Β βββ 03 βΒ Β βββ 04 βΒ Β βββ 05 βΒ Β βββ 06 βΒ Β βββ 07 βΒ Β βββ 08 βΒ Β βββ 09 βΒ Β βββ 10 βΒ Β βββ 11 βΒ Β βββ 12 βββ 2025 βββ 01 βββ 02 βββ 03 βββ 04 βββ 05 βββ 06 βββ 07 βββ 08
confirm this issue. media tab is veeery slow
#3301
The algorithm hasn't changed, but now only photos found by the search are displayed. The reason is simple: the search is performed by date (from/to) within the selected folder (including subfolders).
This "change" was necessary because it created some unpleasant and dangerous time gaps.
Note. Since it is a server-side "SEARCH", the responsiveness is directly proportional to the server's performance.
The algorithm hasn't changed, but now only photos found by the search are displayed. The reason is simple: the search is performed by date (from/to) within the selected folder (including subfolders).
This "change" was necessary because it created some unpleasant and dangerous time gaps.
Note. Since it is a server-side "SEARCH", the responsiveness is directly proportional to the server's performance.
Hi, thanks a lot for your explanation. I understand better why the app now only displays photos found by the server-side SEARCH request.
However, I still have a doubt:
In most cases, the Media tab only loads files from the last ~2 months.
Older media are ignored, unless I manually browse into the corresponding subfolders through the Files tab.
So my question is: where are the βfrom / toβ dates of the search defined or parametrized?
Is it hard-coded in the app?
Or can it be configured somewhere (either client-side in the app, or server-side in Nextcloud)?
This would really help us understand if the limitation is a design choice or a configuration issue.
Thanks again for your time and for clarifying!
@ioleto The algorithm takes the last photo in the view, looks at the date and starts a search from that photo to the very past with a maximum limit of 300 items. If it doesn't find anything you should look at the LOG with a little patience to see what it doesn't find and why.
The display of my media always stops at 818 images and 41 videos. To do this, I clear the applicationβs cache and return to the media tab to launch the search (the media folder remains the same each time). He shows me the same ones every time, those imported recently.
I look at the logs at the same time, but I donβt see much for now except a lot of:
"url": "/remote.php/dav", "message": "Calling OCP\\DB\\QueryBuilder\\IQueryBuilder::orX without parameters is deprecated and will throw soon."
and:
"url": "/remote.php/dav", "message": "25-07-27 14-08-05 1384.jpg: Not a file or directory or no XMP Metadata requested"
I am trying to retrieve more detailed logs to provide you (especially those of the requests that display nothing).
Here is the log file in debug mode of the app just after clearing the cache. I went directly to load the media afterwards. We can see that the requests are going well, but the last three obviously have an error, does that speak to you?
I see:
2025-08-19 16:42:15 [DEBUG] Network response result: 2025-08-19 15:42:15 success(306726 bytes) and I don't see any error in your log
and:
</d:select>
<d:from>
<d:scope>
<d:href>/files/admin/02 - Images</d:href>
<d:depth>infinity</d:depth>
</d:scope>
</d:from>
<d:orderby>
<d:order>
<d:prop><nc:metadata-photos-original_date_time/></d:prop>
<d:descending/>
</d:order>
<d:order>
<d:prop><d:displayname/></d:prop>
<d:descending/>
</d:order>
</d:orderby>
<d:where>
<d:and>
<d:or>
<d:like>
<d:prop><d:getcontenttype/></d:prop>
<d:literal>image/%</d:literal>
</d:like>
<d:like>
<d:prop><d:getcontenttype/></d:prop>
<d:literal>video/%</d:literal>
</d:like>
</d:or>
<d:or>
<d:and>
<d:lt>
<d:prop><nc:metadata-photos-original_date_time/></d:prop>
<d:literal>1510405656</d:literal>
</d:lt>
<d:gt>
<d:prop><nc:metadata-photos-original_date_time/></d:prop>
<d:literal>-62135769600</d:literal>
</d:gt>
</d:and>
</d:or>
</d:and>
</d:where>
<d:limit>
<d:nresults>300</d:nresults>
</d:limit>
</d:basicsearch>
</d:searchrequest>
Return all objects where metadata-photos-original_date_time is earlier than 11 November 2017 (maybe last you photo in the view)and later than 1 January 0001 () . with max 300 results. it's correct.
Yes, I agree with you, yet the last three requests have not loaded anything. I will continue to investigate and get back to you. What is certain is that I have always had to manually load the content of my files to see them appear. Except that if an update clears the cache, you have to redo everything and itβs very long...
Yes, I'm sorry that we had to introduce a flag to ensure that we only display photos from the Media search to avoid finding photos from today, yesterday, a month ago and 2010 (because there was no actual search from a month ago but it simply displayed those already downloaded from files).
While analyzing the logs on the Nextcloud side, I noticed that it returns the exact same images for every request. This likely explains why the iOS side shows βsuccessfulβ but no preview is generatedβbecause the images are already being displayed.
Could it be that the XML script fails to switch the pivot image? Or perhaps it selects one that's too old?
I'm wondering: Which EXIF value does the algorithm use for searching? Is it the modification date, creation date, or something else entirely?
Note : I have also the sames symptoms as #3681 if I choose a specific folder : https://github.com/nextcloud/ios/issues/3681#issuecomment-3206311459
Is anyone fixing this? iOS users are impacted by this bug.
One thing to note here is the issue is with the ios app only, the web app displays all old files as well.
I was able to fix this by making sure by adding a cron container with same image as Nextcloud, and restarting the containers.
Ideally it takes few minutes for the search to complete depending on your system cpu and RAM.
Sorry I don't understand, can you add details to explain the whole process that you followed? Thanks a lot π
Sorry I don't understand, can you add details to explain the whole process that you followed? Thanks a lot π
version: '3'
# Create a custom network for the containers to communicate
networks:
nextcloud_network:
# external: true
services:
# Nextcloud service
nextcloud:
image: nextcloud:31
container_name: nextcloud
restart: always
ports:
- 1080:80
deploy:
resources:
limits:
cpus: '2.0'
memory: 25G
depends_on:
- nextcloud_redis
networks:
- nextcloud_network
environment:
- NEXTCLOUD_CONFIG={"debug":true}
- PHP_MEMORY_LIMIT=8192M
- NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.hanisntsolo.com
- MYSQL_HOST=mysql
- MYSQL_DATABASE=${NEXTCLOUD_DB}
- MYSQL_USER=${NEXTCLOUD_USER}
- MYSQL_PASSWORD=${NEXTCLOUD_PASSWORD}
- REDIS_HOST=nextcloud_redis
- TRUSTED_DOMAINS=nextcloud.hanisntsolo.com,localhost
- OVERWRITEHOST=nextcloud.hanisntsolo.com
- OVERWRITEPROTOCOL=https
- OVERWRITECLIURL=https://nextcloud.hanisntsolo.com
- APACHE_DISABLE_REWRITE_IP=1
- NEXTCLOUD_INIT_HTACCESS=true
- PHP_UPLOAD_LIMIT=100G
- PHP_OPCACHE_ENABLE=1
- PHP_OPCACHE_MEMORY_CONSUMPTION=1024
- APACHE_BODY_LIMIT=0
volumes:
# host drive
# - nextcloud_data:/var/www/html
# external ssd
# - /media/hanisntsolo/WDBlue_ssd_hanis/docker/volumes/nextcloud_nextcloud_data:/var/www/html
# moved to raid array on 2 dec 2024
- /mnt/raid1/docker/volumes/nextcloud_nextcloud_data:/var/www/html
# MySQL database service
mysql:
image: mariadb
container_name: nextcloud_mysql
restart: always
networks:
- nextcloud_network
environment:
- MYSQL_ROOT_PASSWORD=${NEXTCLOUD_PASSWORD}
- MYSQL_DATABASE=${NEXTCLOUD_DB}
- MYSQL_USER=${NEXTCLOUD_USER}
- MYSQL_PASSWORD=${NEXTCLOUD_PASSWORD}
ports:
- "3312:3306"
deploy:
resources:
limits:
cpus: '2.0'
memory: 25G
volumes:
# host drive
- mysql_data:/var/lib/mysql
# external ssd
# - /media/hanisntsolo/WDBlue_ssd_hanis/docker/volumes/nextcloud_mysql_data:/var/lib/mysql
# Cron service for Nextcloud
nextcloud_cron:
image: nextcloud:31
container_name: nextcloud_cron
restart: always
depends_on:
- nextcloud
- mysql
- nextcloud_redis
# This will not work : entrypoint: /bin/sh -c "while true; do su - www-data -s /bin/sh -c 'php -f /var/www/html/cron.php'; sleep 300; done"
entrypoint: /cron.sh
ports:
- 1082:80
deploy:
resources:
limits:
cpus: '2.0'
memory: 25G
networks:
- nextcloud_network
environment:
- NEXTCLOUD_CONFIG={"debug":true}
- PHP_MEMORY_LIMIT=8196M
- NEXTCLOUD_TRUSTED_DOMAINS=nextcloud.hanisntsolo.com
- MYSQL_HOST=mysql
- MYSQL_DATABASE=${NEXTCLOUD_DB}
- MYSQL_USER=${NEXTCLOUD_USER}
- MYSQL_PASSWORD=${NEXTCLOUD_PASSWORD}
- MYSQL_ROOT_PASSWORD=${NEXTCLOUD_PASSWORD}
- REDIS_HOST=nextcloud_redis
- TRUSTED_DOMAINS=nextcloud.hanisntsolo.com,localhost
- OVERWRITEHOST=nextcloud.hanisntsolo.com
- OVERWRITEPROTOCOL=https
- OVERWRITECLIURL=https://nextcloud.hanisntsolo.com
- APACHE_DISABLE_REWRITE_IP=1
- NEXTCLOUD_INIT_HTACCESS=true
- PHP_UPLOAD_LIMIT=100G
- PHP_OPCACHE_ENABLE=1
- PHP_OPCACHE_MEMORY_CONSUMPTION=1024
volumes:
- /mnt/raid1/docker/volumes/nextcloud_nextcloud_data:/var/www/html
nextcloud_redis:
image: redis:alpine
container_name: nextcloud_redis
restart: always
networks:
- nextcloud_network
# collabora code
collabora:
image: collabora/code
container_name: collabora
restart: always
depends_on:
- nextcloud
ports:
- "9980:9980"
environment:
#- aliasgroup1=nextcloud.hanisntsolo.com
- domain=nextcloud.hanisntsolo.com
#- server_name=collabora.hanisntsolo.com
#- username=${NEXTCLOUD_USER}
#- password=${NEXTCLOUD_PASSWORD}
- extra_params=--o:ssl.enable=false
#- extra_params=--o:net.allowed_hosts=nextcloud.hanisntsolo.com,collabora.hanisntsolo.com,172.28.0.4 --o:storage.wopi.host[0]=nextcloud.hanisntsolo.com --o:net.post_allow.host[0]=nextcloud --o:net.post_allow.host[1]=collabora --o:net.post_allow.host[2]=172.28.0.0/16 --o:net.post_allow.host[3]=localhost
# - extra_params=--o:net.allowed_hosts=nextcloud\\.hanisntsolo\\.com --o:storage.wopi.host[0]=nextcloud.hanisntsolo.com --o:net.post_allow.host[0]=nextcloud --o:net.post_allow.host[1]=collabora --o:net.post_allow.host[2]=172.18.0.0/16 --o:net.post_allow.host[3]=localhost
# - extra_params=--o:net.allowed_hosts=nextcloud\\.hanisntsolo\\.com --o:storage.wopi.host[0]=nextcloud\\.hanisntsolo\\.com
# - extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:net.proxy_prefix=/lool --o:net.allowed_hosts=nextcloud,localhost,nextcloud.hanisntsolo.com --o:storage.wopi.av_scan=false --o:logging.level=trace --o:net.frame_ancestors=nextcloud.hanisntsolo.com:* --o:storage.wopi.host[0]=nextcloud --o:storage.wopi.host[1]=nextcloud.hanisntsolo.com --o:net.post_allow.host[0]=nextcloud --o:net.post_allow.host[1]=172.18.0.0/16 --o:net.post_allow.host[2]=192.168.0.0/16 --o:net.post_allow.host[3]=10.0.0.0/8
- dictionaries=en_US en_GB
cap_add:
- MKNOD
- SYS_ADMIN
security_opt:
- seccomp=unconfined
- apparmor=unconfined
privileged: true
networks:
- nextcloud_network
volumes:
# On host drive
# nextcloud_data:
mysql_data:
# On External SSD
# On host drive
# nextcloud_data:/media/hanisntsolo/WDBlue_ssd_hanis/docker/volumes/nextcloud_nextcloud_data
# mysql_data:/media/hanisntsolo/WDBlue_ssd_hanis/docker/volumes/nextcloud_mysql_data
# On External SSD
# /media/hanisntsolo/WDBlue_ssd_hanis/docker/volumes/nextcloud_nextcloud_data:/var/www/html
# /media/hanisntsolo/WDBlue_ssd_hanis/docker/volumes/nextcloud_mysql_data:/var/lib/mysql
Hope it makes sense check the cron and redis sections.
Okay, I understand better now, but Iβm currently using Nextcloud AIO, which natively handles CRON tasks, Redis, and Collabora. Iβd actually recommend looking into Nextcloud AIO. Unfortunately, this wonβt change anything on my end...
I have the same problem, with the 7.1.2 update it doesn't work on iOS either, with 7.0.7 it works correctly
I just found a very interesting difference between the media that display and those that donβt. The ones that display were transferred either through the app or the web interface. The ones that donβt display were transferred via SFTP/USB/etc. and then scanned using occ files:scan --all. However, on the web interface, both the photo app and Memories can see them without any problem.
The solution I found is to download the files along with their media, extract them on the PC, and then upload them again via the web interface. But this is very slow for 500GB of media. And with this method, files loss their modification date. I should mention that the search in the app is still very slow, and it requires frequent refreshing by swiping...
@marinofaggiana What parameter could prevent the appβs indexing algorithm from working correctly? Would this be due to missing data in the database?
@CreativePR have you used this method to upload files to your Nextcloud?
In our situation files uploaded either via auto upload or files added to the NC then added by files scan do not show in media tab
Seems as version 7.1.2 - media tab is completely broken
can't believe this is still open ...
Can some Xcode guy raise a fix, or do I need to learn swift.
this is really annoying, going back to prior release :/
one thing to bring resource usage down is disable clamscan and restart nextcloud. root@8dab0a96ebe9:/var/www/html# php occ app:disable files_antivirus
Media tab still broken version 7.1.3
You can only solve it by looking at the server logs
@marinofaggiana Even if the algorithm worked properly, I still find the current display completely unusable for anyone with more than 15,000 media files. You have to swipe down, wait for 300 to load, and repeat this process over 50 times to get through all 15,000 media files. Since itβs no longer possible to speed up the process by navigating through folders and subfolders to accelerate the search, Iβve started using the Memories app in web interface, installed as a web app via Safari. Itβs just incredible β all the media load instantly thanks to the efficient Memories index, and the preview generation is almost instantaneous. It's a world apart from the app. Would it be possible to integrate the Memories display directly into the app instead of the Media tab?
great idea!