Media doesn't appear when auto uploaded from mobile app

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • Nextcloud Hub 10 (31.0.8)
  • Operating system and version (e.g., Ubuntu 24.04):
    • Rocky Linux 9.6
  • Web server and version (e.g, Apache 2.4.25):
    • Webserver inside of standard docker compose deployment
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Nginx Proxy Manager version 10.8.2
  • PHP version (e.g, 8.3):
    • PHP inside of standard docker compose deployment
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • Once AIO deployed behind NPM
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • CloudfIare Tunnel but problem is also in LAN with internal DNS

Summary of the issue you are facing:

I installed my Nextcloud AIO instance following the official guides for deployment behind an external reverse proxy (NPM).
Everything works fine: file management, users, web interface, and mobile app.
The only issue is that when I open the mobile app on my phone, I don’t see any media. Even though the “Photos” folder is full of pictures and videos. If I take a photo, I can see that the app uploads it correctly to the server. The file appears in the “Photos” folder, but when I check the media from the web portal, it doesn’t show up (even though the file is there and indexed).
I’ve tried everything. The installation is clean. The only thing that comes to mind is that NPM is somehow causing the error. The reverse proxy is used both for LAN and external requests because it provides SSL.
Any ideas?

Steps to replicate it (hint: details matter!):

  1. Shot a picture
  2. Check if file compare into Photos folder with success
  3. Photo tab don’t show it

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":"GpyExnHTSVfYFWGJJfJr","level":2,"time":"2025-08-31T19:28:42+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"failed to create instance of background job: OCA\\AppAPI\\BackgroundJob\\ProvidersAICleanUpJob","userAgent":"--","version":"31.0.8.1","exception":{"Exception":"OC\\AppFramework\\Utility\\QueryNotFoundException","Message":"Could not resolve OCA\\AppAPI\\BackgroundJob\\ProvidersAICleanUpJob! Class \"OCA\\AppAPI\\BackgroundJob\\ProvidersAICleanUpJob\" does not exist","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\AppAPI\\BackgroundJob\\ProvidersAICleanUpJob"]},{"file":"/var/www/html/lib/private/ServerContainer.php","line":155,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\AppAPI\\BackgroundJob\\ProvidersAICleanUpJob",true]},{"file":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","line":42,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OCA\\AppAPI\\BackgroundJob\\ProvidersAICleanUpJob"]},{"file":"/var/www/html/lib/public/Server.php","line":39,"function":"get","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCA\\AppAPI\\BackgroundJob\\ProvidersAICleanUpJob"]},{"file":"/var/www/html/lib/private/BackgroundJob/JobList.php","line":322,"function":"get","class":"OCP\\Server","type":"::","args":["OCA\\AppAPI\\BackgroundJob\\ProvidersAICleanUpJob"]},{"file":"/var/www/html/lib/private/BackgroundJob/JobList.php","line":201,"function":"buildJob","class":"OC\\BackgroundJob\\JobList","type":"->","args":[{"id":217,"class":"OCA\\AppAPI\\BackgroundJob\\ProvidersAICleanUpJob","argument":"null","last_run":1756581849,"last_checked":1756668249,"0":"And 4 more entries, set log level to debug to see all entries"}]},{"file":"/var/www/html/cron.php","line":152,"function":"getNext","class":"OC\\BackgroundJob\\JobList","type":"->","args":[false,null]}],"File":"/var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php","Line":113,"message":"failed to create instance of background job: OCA\\AppAPI\\BackgroundJob\\ProvidersAICleanUpJob","exception":{},"CustomMessage":"failed to create instance of background job: OCA\\AppAPI\\BackgroundJob\\ProvidersAICleanUpJob"}}
nextcloud-aio-nextcloud:/var/www/html# 

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!):

nextcloud-aio-nextcloud:/var/www/html# php occ config:list system
{
    "system": {
        "default_phone_region": "IT",
        "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
            }
        ],
        "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": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "***REMOVED SENSITIVE VALUE***",
            "192.168.100.11"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "31.0.8.1",
        "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***\/",
        "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,
        "updatechecker": 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": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie",
            "7": "OC\\Preview\\Krita",
            "0": "OC\\Preview\\Imaginary",
            "23": "OC\\Preview\\ImaginaryPDF"
        },
        "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,
        "documentation_url.server_logs": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/5425",
        "htaccess.RewriteBase": "\/",
        "dbpersistent": false,
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "files_external_allow_create_new_local": true,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": true,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [
            "admin"
        ],
        "DOMAIN": "***REMOVED SENSITIVE VALUE***"
    }
}```

#### Apps

Enabled:
  - activity: 4.0.0
  - admin_audit: 1.21.0
  - bruteforcesettings: 4.0.0
  - calendar: 5.5.1
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - comments: 1.21.0
  - contacts: 7.2.6
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - dav: 1.33.0
  - deck: 1.15.2
  - encryption: 2.19.0
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_external: 1.23.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - firstrunwizard: 4.0.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - nextcloud-aio: 0.8.0
  - nextcloud_announcements: 3.0.0
  - notes: 4.12.3
  - notifications: 4.0.0
  - notify_push: 1.2.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - photos: 4.0.0
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - support: 3.0.0
  - survey_client: 3.0.0
  - suspicious_login: 9.0.1
  - systemtags: 1.21.1
  - tasks: 0.16.1
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - updatenotification: 1.21.0
  - user_ldap: 1.22.0
  - user_status: 1.11.0
  - viewer: 4.0.0
  - weather_status: 1.11.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - app_api: 5.0.2 (installed 5.0.2)

@Alessandro_Arosio

Hey @Alessandro_Arosio welcome to the community :waving_hand:

this is just a hunch… try “show hidden files” in the web portal…

also check your media folder settings:

Hey @scubamuc thank you for reply. I checked options suggested but it doesn’t work.
For better show you the issue, I want to show you some screenshot by my web portal and mobile app.



As you can see, in Photos folder are present a lot of files but in Media tab in mobile app, I can see only the unique picture that I made with phone. This picture is properly uploaded into the Photos folder (as you can see).
Then, I logged into web portal with same account. Under Photos folder in Files, a can see last picture shooted and loaded by mobile. But I can’t see it in Media tab. I attach you web portal screeshot.




A also try to give manual command occ files:scan. It run successfully but doesn’t happen.

Any idea to fix my issue? :slightly_smiling_face:

I discovered something else during my tests.

In my new installation, I copied the files directly via CLI to the user’s Photos folder. Then, again from CLI, I ran the command “occ files:scan ”. The photos are found as files correctly, but the media section is not populated.

The result is different if, instead of copying the files via CLI, I upload them from the web portal. At that point, the files are visible both in the Photos folder and in the Media section.

I also noticed that if, following the second procedure, I then move more files via CLI to the Photos folder and then run “occ files:scan ”, the Media folder freezes again.

There is no one that can help me on this issue?

Good morning everyone (if anyone is reading this).
Currently, the only way I can migrate my photos on a large scale is via the web, which takes a very long time.
It’s the only way to ensure that the photos can then be viewed through the Photos app. But surely there must be a smarter way to do this, one that makes the photos visible from the Media section of the cell phone or the Photo section of the web portal.
Why is there no one to help me with my problem? Can you help me solve it? Thank you.

Wow, thanks everyone, your overwhelming enthusiasm is truly deafening.