Issue displaying picture and video previews with the Media Viewer 1.0.4 plugin

I have been using the Media Viewer plugin (ver. 1.0.4) for a whuile now but it never worked to begin with. When I select a picture (jpg or other common format) the windows greays out and the navigation toolbar shows up at the bottom of the screen but the preview dont show up.

I tried getting to the bottom of this problem for a while but I am not finding the problem.

Steps to reproduce

  1. Navigate to folder containing pictures or videos
  2. Select a file
  3. Preview doesnt display

Expected behaviour

Preview of the media file should display

Actual behaviour

See description

Server configuration

Operating system: Rocky Linux 8

Web server:
Server version: Apache/2.4.37 (Rocky Linux)
Server built: Aug 12 2024 08:13:30
Database:
MariaDB
PHP version:
PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.24, Copyright (c) 1999-2018, by Zend Technologies

ownCloud version: 10.8.0
Updated from an older ownCloud or fresh install: Fresh install
Where did you install ownCloud from: download.owncloud.com

http://example.com/index.php/settings/integrity/failed 

"No errors have been found."
{
    "system": {
        "updatechecker": false,
        "instanceid": "*********",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.localdomain"
        ],
        "datadirectory": "\/mnt\/data",
        "overwrite.cli.url": "https:\/\/cloud.localdomain\/owncloud",
        "dbtype": "mysql",
        "version": "10.8.0.4",
        "dbname": "*********",
        "dbhost": "database.localdomain",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "America\/Toronto",
        "installed": true,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpport": "587",
        "forcessl": true,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 0,
        "log_rotate_size": 4194304,
        "filelocking.enabled": "true",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\APCu",
        "overwriteprotocol": "https",
        "session_lifetime": 3600,
        "session_keepalive": false,
        "theme": "",
        "maintenance": false,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\Illustrator",
            "OC\\Preview\\Postscript",
            "OC\\Preview\\Photoshop",
            "OC\\Preview\\TIFF"
        ]
    }
}
Enabled:
  - activity:
    - Version: 2.6.1
    - Path: /var/www/html/owncloud/apps/activity
  - configreport:
    - Version: 0.2.0
    - Path: /var/www/html/owncloud/apps/configreport
  - dav:
    - Version: 0.6.0
    - Path: /var/www/html/owncloud/apps/dav
  - federatedfilesharing:
    - Version: 0.5.0
    - Path: /var/www/html/owncloud/apps/federatedfilesharing
  - files:
    - Version: 1.5.2
    - Path: /var/www/html/owncloud/apps/files
  - files_external:
    - Version: 0.8.0
    - Path: /var/www/html/owncloud/apps/files_external
  - files_mediaviewer:
    - Version: 1.0.4
    - Path: /var/www/html/owncloud/apps/files_mediaviewer
  - files_trashbin:
    - Version: 0.9.1
    - Path: /var/www/html/owncloud/apps/files_trashbin
  - files_versions:
    - Version: 1.3.0
    - Path: /var/www/html/owncloud/apps/files_versions
  - firstrunwizard:
    - Version: 1.2.0
    - Path: /var/www/html/owncloud/apps/firstrunwizard
  - market:
    - Version: 0.6.1
    - Path: /var/www/html/owncloud/apps/market
  - templateeditor:
    - Version: 0.4.0
    - Path: /var/www/html/owncloud/apps/templateeditor
Disabled:
  - admin_audit:
    - Path: /var/www/html/owncloud/apps/admin_audit
  - announcementcenter:
    - Path: /var/www/html/owncloud/apps/announcementcenter
  - comments:
    - Path: /var/www/html/owncloud/apps/comments
  - customgroups:
    - Path: /var/www/html/owncloud/apps/customgroups
  - encryption:
    - Path: /var/www/html/owncloud/apps/encryption
  - enterprise_key:
    - Path: /var/www/html/owncloud/apps/enterprise_key
  - external:
    - Path: /var/www/html/owncloud/apps/external
  - federation:
    - Path: /var/www/html/owncloud/apps/federation
  - files_antivirus:
    - Path: /var/www/html/owncloud/apps/files_antivirus
  - files_classifier:
    - Path: /var/www/html/owncloud/apps/files_classifier
  - files_external_dropbox:
    - Path: /var/www/html/owncloud/apps/files_external_dropbox
  - files_external_ftp:
    - Path: /var/www/html/owncloud/apps/files_external_ftp
  - files_ldap_home:
    - Path: /var/www/html/owncloud/apps/files_ldap_home
  - files_lifecycle:
    - Path: /var/www/html/owncloud/apps/files_lifecycle
  - files_pdfviewer:
    - Path: /var/www/html/owncloud/apps/files_pdfviewer
  - files_sharing:
    - Path: /var/www/html/owncloud/apps/files_sharing
  - files_texteditor:
    - Path: /var/www/html/owncloud/apps/files_texteditor
  - firewall:
    - Path: /var/www/html/owncloud/apps/firewall
  - graphapi:
    - Path: /var/www/html/owncloud/apps/graphapi
  - guests:
    - Path: /var/www/html/owncloud/apps/guests
  - metrics:
    - Path: /var/www/html/owncloud/apps/metrics
  - notifications:
    - Path: /var/www/html/owncloud/apps/notifications
  - oauth2:
    - Path: /var/www/html/owncloud/apps/oauth2
  - openidconnect:
    - Path: /var/www/html/owncloud/apps/openidconnect
  - password_policy:
    - Path: /var/www/html/owncloud/apps/password_policy
  - provisioning_api:
    - Path: /var/www/html/owncloud/apps/provisioning_api
  - ransomware_protection:
    - Path: /var/www/html/owncloud/apps/ransomware_protection
  - sharepoint:
    - Path: /var/www/html/owncloud/apps/sharepoint
  - systemtags:
    - Path: /var/www/html/owncloud/apps/systemtags
  - systemtags_management:
    - Path: /var/www/html/owncloud/apps/systemtags_management
  - theme-enterprise:
    - Path: /var/www/html/owncloud/apps/theme-enterprise
  - updatenotification:
    - Path: /var/www/html/owncloud/apps/updatenotification
  - user_external:
    - Path: /var/www/html/owncloud/apps/user_external
  - user_ldap:
    - Path: /var/www/html/owncloud/apps/user_ldap
  - user_shibboleth:
    - Path: /var/www/html/owncloud/apps/user_shibboleth
  - web:
    - Path: /var/www/html/owncloud/apps/web
  - windows_network_drive:
    - Path: /var/www/html/owncloud/apps/windows_network_drive
  - wopi:
    - Path: /var/www/html/owncloud/apps/wopi
  - workflow:
    - Path: /var/www/html/owncloud/apps/workflow

Client configuration

Browser: LibreWolf or Firefox (latest releases)
Operating system: Varies (Win10 or Mint 22)

Blind guess: the picture is too large.

I dont think so, this happens with every picture no matter how large they are… Even with thumbnails or icons…

I also noticed the download button (Arrow pointing down in the bottom toolbar) doesnt work (I press it and it does nothing).

Next guess: Because the pic isn’t where it should be, or the access rights are not suitable.
I assume the log and/or the browser console would have additional information.

As you suggested the browser console shows these messages immediately after I select a JPG:

undefined Previous jquery.min.js:23:184083
undefined Next jquery.min.js:23:184083
undefined Replay jquery.min.js:23:184083
undefined Play jquery.min.js:23:184083
undefined Mute jquery.min.js:23:184083
undefined Fullscreen jquery.min.js:23:184083
undefined Download jquery.min.js:23:184083
undefined Close jquery.min.js:23:184083
undefined Previous jquery.min.js:23:184083
undefined Next jquery.min.js:23:184083
undefined Rotate 90° counterclockwise jquery.min.js:23:184083
undefined Zoom in jquery.min.js:23:184083
undefined Zoom out jquery.min.js:23:184083
undefined Download jquery.min.js:23:184083
undefined Close jquery.min.js:23:184083
TypeError: OCA.Sharing is undefined
    jQuery 15
jquery.min.js:7:11689
TypeError: OCA.Sharing is undefined
    jQuery 15
jquery.min.js:7:11689
TypeError: OCA.Sharing is undefined
    jQuery 15
jquery.min.js:7:11689
Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/files_mediaviewer/254-526.png".
    jQuery 16
jquery.min.js:23:171405
This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”. jquery.min.js
sizeToContent() is deprecated and will be removed in the future. 2 commonDialog.js:135:10
TypeError: OCA.Sharing is undefined
    jQuery 9
jquery.min.js:7:11689

I have ZERO expertise in debugging these or concluding if they are relevant or not… The owncloud log shows absolutely nothing related yto this (at least there are no entries within the appropriate timeframe…

Hey,

i’m not sure but i think it could be possible that these could be the origin of the problem. From what i know both versions are from around 2021 which i think are quite dated.

Currently the Media Viewer plugin is available in version 1.0.5 while the ownCloud version is on 10.15.0 according to the ownCloud homepage or Marketplace.

1 Like

Well I updates OC to 10.15.0 and its apps (including Media Viewer which is now 1.0.5) and I have the same issue…

PHP was also out of date (7.1) and I upgraded to 7.4.

1 Like

Hey,

i think i just have remembered the reason because i have seen this:

Another user had found out in the past that the Share Files app is mandatory for the Media Viewer app to work:

2 Likes

That would be it! I probably had other issues and/or outdated things before the updates but re-activating the “files_sharing” app, now it works flawlessly!

Thanks guys (esp. tom42) for your precious help!

3 Likes