Unable to View Photos

HI guys,

I can view the shared photos as an admin, but not as the user.
version: 9.0.53 (stable)
php 5.4

It not working on mobile device browser or computer.

`Enabled:

  • activity: 2.2.1
  • admin_audit: 1.0.0
  • announcementcenter: true
  • comments: 0.2
  • dav: 0.1.6
  • direct_menu: 0.9.0
  • documents: 0.12.1
  • external: 1.2
  • federatedfilesharing: 0.1.0
  • federation: 0.0.4
  • files: 1.4.4
  • files_antivirus: true
  • files_external: 0.5.2
  • files_pdfviewer: 0.8.1
  • files_sharing: 0.9.1
  • files_texteditor: 2.1
  • files_trashbin: 0.8.0
  • files_versions: 1.2.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 14.5.0
  • music: 0.3.12
  • notes: 2.0.2
  • notifications: 0.2.3
  • password_policy: 1.0.0
  • provisioning_api: 0.4.1
  • systemtags: 0.2
  • templateeditor: 0.1
  • theming: 0.2.0
  • updatenotification: 0.1.0
    Disabled:
  • audios
  • encryption
  • galleryplus
  • ojsxc
  • user_external
  • user_ldap
  • user_saml
    `

`Exception: Could not locate node linked to ID: 6731
Error gallery Exception: Could not locate node linked to ID: 6760
Error gallery Exception: Could not locate node linked to ID: 6760
Error PHP Undefined offset: 0 at /media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/apps/gallery/environment/environment.php#363

Error gallery Exception: Could not locate node linked to ID: 6756
Error gallery ExceptionCould not locate node linked to ID: 6756
Error PHP Undefined offset: 0 at /media/54bf67db-da31-4c50-bb3c 27140944b223/www/nextcloud/apps/gallery/environment/environment.php#363`

Error! Could not generate a preview of this file. Please go to the next slide while we remove this imae from the slideshow.

Did you manually delete files from the file system? Looks like in your NC there are still some files linked that do not exist any more. You can run a file-scan:
sudo -u www-data php /path/to/nextcloud/occ files:scan --all

What deleted file system are you referring to?
I did that scanned, but error persist.

I thought that you perhaps manually deleted files (via SSH or FTP). There will be a feature to create and delete thumbnails manually via occ-command, not sure how far the development is:

Let’s ping @oparoz

That feature may be released one day, but that won’t solve the initial problem. Maybe the encryption key is corrupt. I had a similar issue with a botched upgrade (my fault).
I suspect it works with one user because the thumbnails are still there, but if you remove them, then you’ll get the same errors.

The original post shows that encryption is disabled…

I’m not using encryption.
The photos are sharing via Samba shares, if that matter.

I also tried manually add 'enable_previews' => true, in config.php
and deleted user thumbnails folder, /data/<user>/thumbnails
but error persist.

Users had experience this issue in OwnCloud prior NC.
Another thing I notice is that my MP3 Player (audios) detect all songs in the playlist when I’m log in as an admin, but as the user, it not recognize at all.

When log in as a user, the ‘music’ player built in, it says “No music found”.

https://github.com/owncloud/gallery/issues/169
https://github.com/owncloud/core/issues/16837

Can you temporarily disable the apps direct_menu and music?
Does it work if you place the files on your principal storage (not on external storage)? Would also be interesting if other external storage fails as well.

Could be a problem of smb as external storage, there were also reports in the owncloud forum: Size of the folder is pending - #3 by diogogomes101 - Server - ownCloud Central

I just tried, but error persist.
I’m using the same local storage with OC without this issue.
Same permissions setup.

Do you use the PHP smbclient module?
https://docs.nextcloud.com/server/9/admin_manual/configuration_files/external_storage/smb.html

@icewind can perhaps help you out with external storage problems.

No, I’m mounting it as local storage.
By the way, my smbclient is installed , but it says it isn’t.

Note: "smbclient" is not installed. Mounting of SMB / CIFS, SMB / CIFS using OC login is not possible. Please ask your system administrator to install it.

Then you don’t need smbclient. Are you using symlinks in that storage?

No, I’m not.

@oparoz Is this node link the reference of the file in the filecache-table?
This the the OP could try to trace which file is causing the errors…

Not sure how to debug this any further, who can help out? If you don’t get answers in a reasonable time, also consider creating a bug report on Issues · nextcloud/server · GitHub

Correct.

@tx7, since this problem seems to affect all the apps which need to access the filesystem, I think it would be a good idea to post the details on Github. There must be something strange going on with the Samba mount.

If it’s the Samba issue, then how come when I logged in as an admin, view the photos without issue.

Here’s the file permissions:

Samba share: drwxrwsr-x+ 12 root users 4096 Jun 2 20:13 Shared

/media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud$ ls -la total 260 drwxr-sr-x+ 16 www-data www-data 4096 Aug 18 15:35 . drwxrwsr-x+ 6 www-data users 4096 Jul 28 21:46 .. drwxr-sr-x+ 29 www-data www-data 4096 Jul 5 09:10 3rdparty drwxrwsrwx+ 40 www-data www-data 4096 Aug 22 21:02 apps -rw-r--r--+ 1 www-data www-data 8065 Jul 5 09:08 AUTHORS drwxrwsrwx+ 2 www-data www-data 4096 Jul 19 18:17 config -rw-r--r--+ 1 www-data www-data 3695 Jul 5 09:08 console.php -rw-r--r--+ 1 www-data www-data 34520 Jul 5 09:08 COPYING-AGPL drwxr-sr-x+ 16 www-data www-data 4096 Jul 18 14:32 core -rw-r--r--+ 1 www-data www-data 5919 Jul 5 09:08 cron.php drwxr-s---+ 12 www-data www-data 4096 Aug 19 15:29 data -rw-r--r--+ 1 www-data www-data 32727 Jul 5 09:08 db_structure.xml -rw-r--r--+ 1 www-data www-data 3652 Jul 19 18:23 .htaccess -rw-r--r--+ 1 www-data www-data 179 Jul 5 09:08 index.html -rw-r--r--+ 1 www-data www-data 2027 Jul 5 09:08 index.php drwxr-sr-x+ 3 www-data www-data 4096 Jul 5 09:08 l10n drwxr-sr-x+ 5 www-data www-data 4096 Jul 5 09:08 lib -rwxr-xr-x+ 1 www-data www-data 283 Jul 5 09:08 occ drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:08 ocs drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:08 ocs-provider -rw-r--r--+ 1 www-data www-data 2969 Jul 5 09:08 public.php -rw-r--r--+ 1 www-data www-data 4599 Jul 5 09:08 remote.php drwxr-sr-x+ 5 www-data www-data 4096 Jul 5 09:08 resources -rw-r--r--+ 1 www-data www-data 26 Jul 5 09:08 robots.txt drwxr-sr-x+ 12 www-data www-data 4096 Jul 5 09:08 settings -rw-r--r--+ 1 www-data www-data 1835 Jul 5 09:08 status.php drwxr-sr-x+ 3 www-data www-data 4096 Jul 5 09:08 themes drwxr-sr-x+ 7 www-data www-data 4096 Jul 5 09:10 updater -rw-r--r--+ 1 www-data www-data 163 Jul 19 18:23 .user.ini -rw-r--r--+ 1 www-data www-data 235 Jul 18 14:34 version.php drwxr-sr-x+ 2 root www-data 4096 Aug 19 13:41 .well-known

/media/54bf67db-da31-4c50-bb3c-27140944b223/www/nextcloud/apps/gallery$ ls -la total 376 drwxr-sr-x+ 20 www-data www-data 4096 Jul 5 09:10 . drwxrwsrwx+ 40 www-data www-data 4096 Aug 22 21:02 .. drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:10 appinfo -rw-r--r--+ 1 www-data www-data 116 Jul 5 09:08 AUTHORS.md drwxr-sr-x+ 4 www-data www-data 4096 Jul 5 09:08 build -rw-r--r--+ 1 www-data www-data 8902 Jul 5 09:08 CHANGELOG.md -rw-r--r--+ 1 www-data www-data 913 Jul 5 09:08 codeception.yml -rw-r--r--+ 1 www-data www-data 1293 Jul 5 09:08 composer.json -rw-r--r--+ 1 www-data www-data 151103 Jul 5 09:08 composer.lock drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:08 config drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:08 controller -rw-r--r--+ 1 www-data www-data 34520 Jul 5 09:08 COPYING drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:08 css drwxr-sr-x+ 3 www-data www-data 4096 Jul 5 09:08 documentation drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:08 environment drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:08 .github -rw-r--r--+ 1 www-data www-data 106 Jul 5 09:08 .gitmodules drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:08 http drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:08 img drwxr-sr-x+ 3 www-data www-data 4096 Jul 5 09:08 js drwxr-sr-x+ 3 www-data www-data 4096 Jul 5 09:08 l10n drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:08 middleware -rw-r--r--+ 1 www-data www-data 782 Jul 5 09:08 phpdoc.xml drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:08 preview drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:08 service drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:08 templates drwxr-sr-x+ 2 www-data www-data 4096 Jul 5 09:08 utility drwxr-sr-x+ 4 www-data www-data 4096 Jul 5 09:08 vendor

Note that the player has its own database.
and your old version has issues recognizing removed files so you could see them even if they are gone (but not play them)
By the way: in the apostore i released the neuest version of the audios-continuation calles “Audio Player”

For you issue: did you touch perhaps the mimetypes?
Did you check the filecache table if the files are still there?

I double check the audio player.
Don’t know about the mimetypes or filecache table.

Update: just updated to NC10, and the Photos are working fine now.

Thanks.

1 Like