Unable to play videos, mp3 nor view pics from webapp (nextcloud 30.0.4)

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.4.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • CentOS 7.8.2003
  • Web server and version (e.g, Apache 2.4.25):
    • replace me
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx 1.20.1
  • PHP version (e.g, 8.3):
    • 8.3.8
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • When upgrading. We were on 30.0.3 but I’m not sure if also happened there.
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Bare Metal`

Summary of the issue you are facing:

When accesing to my documents via the webapp, if i click on a video it gets downloaded, but not played. I’m using Brave 132 as a web browser, also tried Edge and didn’t help. I tried the 1 hour nextcloud trial and was able to play the video.
I also tried to upload a video there and was able to play it, so i know its not an issue with the video but with my nextcloud installation (i can’t play the same video in my nextcloud 30.0.4)

I can’t neither preview photos (i can do it on the nextcloud trial).
I can’t neither play mp3 (i can do it on the nextcloud trial)

I checked that if I click on the three dots next to a file, I don’t have the “view” option, only “download”

This is what i see on my nextcloud


This is what i see on nextcloud trial

The thing is that when i click on a pic or a video, i doesn’t go to &openfile=true but directly downloads it.

In the nextcloud trial, when i click on a pic or video it goes to dir=/&openfile=true

Web Browser

When accesing to the folder, i get several [WARN] @nextcloud/files Accessing "Node.attributes.displayname" is deprecated, access it directly on the Node instance.

Also, an error in Settings.js:24 saying A setting with the same name is already registered

Web server / Reverse Proxy


192.168.99.10 - - [05/Feb/2025:19:29:02 +0100] "PROPFIND /remote.php/dav/files/myuser/Photos/ HTTP/2.0" 207 1054 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"
192.168.99.10 - - [05/Feb/2025:19:29:03 +0100] "PROPFIND /remote.php/dav/files/myuser/Photos/ HTTP/2.0" 207 1054 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"
192.168.99.10 - - [05/Feb/2025:19:29:06 +0100] "GET /remote.php/dav/files/myuser/Photos/foto%20reverse.jpg HTTP/2.0" 200 112985 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36" "-"

Configuration

Nextcloud

The output of occ config:list system

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            ***REMOVED SENSITIVE VALUE***,
            ***REMOVED SENSITIVE VALUE***,
            ***REMOVED SENSITIVE VALUE***
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "forwarded_for_headers": [
            "HTTP_X_FORWARDED_FOR"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.4.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "ES",
        "trashbin_retention_obligation": "30,90",
        "installed": true,
        "maxZipInputSize": 0,
        "allowZipDownload": true,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtptimeout": 10,
        "theme": "",
        "maintenance": false,
        "ldapIgnoreNamingRules": false,
        "loglevel": 2,
        "forcessl": true,
        "secret": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "http:\/\/192.168.30.35",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0
        },
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "enabledPreviewProviders": {
            "0": "OC\\Preview\\Image",
            "1": "OC\\Preview\\TXT",
            "2": "OC\\Preview\\MP3",
            "3": "OC\\Preview\\Movie",
            "5": "OC\\Preview\\MKV",
            "6": "OC\\Preview\\AVI"
        }
    }
}

Apps

The output of occ app:list (if possible).

Enabled:
  - activity: 3.0.0
  - admin_audit: 1.20.0
  - app_api: 4.0.3
  - bruteforcesettings: 3.0.0
  - cloud_federation_api: 1.13.0
  - comments: 1.20.1
  - contactsinteraction: 1.11.0
  - dav: 1.31.1
  - federatedfilesharing: 1.20.0
  - federation: 1.20.0
  - files: 2.2.0
  - files_downloadlimit: 3.0.0
  - files_fulltextsearch: 30.0.0
  - files_pdfviewer: 3.0.0
  - files_reminders: 1.3.0
  - files_sharing: 1.22.0
  - files_trashbin: 1.20.1
  - files_versions: 1.23.0
  - firstrunwizard: 3.0.0
  - fulltextsearch: 30.0.0
  - fulltextsearch_elasticsearch: 30.0.0
  - groupfolders: 18.0.8
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - nextcloud_announcements: 2.0.0
  - notifications: 3.0.0
  - oauth2: 1.18.1
  - password_policy: 2.0.0
  - photos: 3.0.2
  - privacy: 2.0.0
  - provisioning_api: 1.20.0
  - recognize: 8.2.0
  - recommendations: 3.0.0
  - related_resources: 1.5.0
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - support: 2.0.0
  - survey_client: 2.0.0
  - systemtags: 1.20.0
  - text: 4.1.0
  - theming: 2.5.0
  - thesearchpage: 1.2.8
  - twofactor_backupcodes: 1.19.0
  - twofactor_nextcloud_notification: 4.0.0
  - updatenotification: 1.20.0
  - user_status: 1.10.0
  - viewer: 3.0.0
  - weather_status: 1.10.0
  - webhook_listeners: 1.1.0-dev
  - workflowengine: 2.12.0
Disabled:
  - circles: 30.0.0 (installed 0.15.1)
  - dashboard: 7.10.0 (installed 6.0.0)
  - encryption: 2.18.0
  - files_external: 1.22.0
  - suspicious_login: 8.0.0
  - twofactor_totp: 12.0.0-dev
  - user_ldap: 1.21.0 (installed 0.4.2)

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.

Do you have any warnings or errors under Admin settings->Overview?

When you open Files are you seeing anything in the browser inspector under Console related to viewer?

1 Like

Hi!

Thanks for helping.

When going to Files, under the console in the browser inspector i get several ERR_ABORTED 404 of mjs files

Under Administration Settings → Overview i have some warnings.
I guess this is the important one
image

As stated here i went to the nginx config to check wether it was serving mjs or not. I added it to application/javascript js; and now it is application/javascript js mjs;
Then reloaded nginx but it was still not working.

Then checked my nginx config and saw I wasn’t declaring anything for mjs files.
So, in my nginx.conf file, where it stated
location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
I added mjs.
location ~ \.(?:css|js|mjs|woff2?|svg|gif|map)$ {

Then restarted nginx (systemctl reload nginx)

and it started to work as a charm.

Thank you so much for your guidance, it was the key to find what was going on!

Edit: Just in case anyone arrives here, check also some other cache control kind of files you may add.
Now I have, as stated in docs
location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {

2 Likes

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.