server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: Preview image link doesn't work for users it was shared with

Open sHHHk opened this issue 2 years ago • 5 comments

⚠️ This issue respects the following points: ⚠️

  • [X] This is a bug, not a question or a configuration/webserver/proxy issue.
  • [X] This issue is not already reported on Github (I've searched it).
  • [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • [X] Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • [X] I agree to follow Nextcloud's Code of Conduct.

Bug description

Whenever I share a picture with another user via Nextcloud Talk for example, the user with whom the picture was shared cannot see it under their preview URL.

In my example the user who uploaded the image can view it with both of these URLs. Whereas the user who the file was shared with can only view it in his Nextcloud Talk Folder under the second URL. The server throws a 404 for the first URL.

  1. Example for a preview URL: https://example.com/core/preview?fileId=1240931

  2. Example for https://example.com/remote.php/dav/files/user/Talk/20210908_091635.jpg

Steps to reproduce

Unfortunately I was not able to enclose the cause of this. I thought I could pin the issue down by disabling all apps with occ and disabling server sided encryption (which was originally enabled on my instance).

Expected behavior

I would assume that an image preview should be shown for the user who the file was shared with under the exact same link with the preview id.

In my example: https://example.com/core/preview?fileId=1240931

Installation method

Official All-in-One appliance

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • [X] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report

{
    "system": {
        "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
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "example.com",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "example.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "25.0.4.1",
        "overwrite.cli.url": "https:\/\/example.com\/",
        "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***",
        "loglevel": "1",
        "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",
            "0": "OC\\Preview\\Imaginary"
        },
        "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",
        "tempdirectory": "\/mnt\/ncdata\/tmp\/",
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "htaccess.RewriteBase": "\/",
        "files_external_allow_create_new_local": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "allow_local_remote_servers": true,
        "default_phone_region": "DE",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpport": "465",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "twofactor_enforced": "false",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [],
        "maintenance": false,
        "preview_imaginary_url": "http:\/\/nextcloud-aio-imaginary:9000",
        "app_install_overwrite": [
            "occweb",
            "whiteboard"
        ],
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory"
    }
}

List of activated Apps

Enabled:
  - activity: 2.17.0
  - admin_audit: 1.15.0
  - announcementcenter: 6.5.1
  - appointments: 1.14.11
  - approval: 1.0.12
  - bruteforcesettings: 2.5.0
  - calendar: 4.2.4
  - calendar_resource_management: 0.4.0
  - circles: 25.0.0
  - cloud_federation_api: 1.8.0
  - comments: 1.15.0
  - contacts: 5.1.0
  - contactsinteraction: 1.6.0
  - dashboard: 7.5.0
  - data_request: 1.12.0
  - dav: 1.24.0
  - deck: 1.8.3
  - drawio: 2.1.0
  - electronicsignatures: 2.0.3
  - encryption: 2.13.0
  - event_update_notification: 2.0.0
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_automatedtagging: 1.15.2
  - files_downloadactivity: 1.15.0
  - files_downloadlimit: 1.0.1
  - files_external: 1.17.0
  - files_fulltextsearch: 25.0.0
  - files_linkeditor: 1.1.13
  - files_lock: 26.0.0
  - files_mindmap: 0.0.27
  - files_pdfviewer: 2.6.0
  - files_retention: 1.14.1
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - firstrunwizard: 2.14.0
  - forms: 3.2.0
  - fulltextsearch: 25.0.0
  - fulltextsearch_elasticsearch: 25.0.0
  - group_everyone: 0.1.12
  - groupfolders: 13.1.1
  - login_notes: 1.1.0
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - mail: 2.2.4
  - maps: 0.2.4
  - nextcloud-aio: 0.3.0
  - nextcloud_announcements: 1.14.0
  - notes: 4.6.0
  - notifications: 2.13.1
  - notify_push: 0.6.0
  - oauth2: 1.13.0
  - occweb: 0.1.0
  - password_policy: 1.15.0
  - passwords: 2023.3.10
  - photos: 2.0.1
  - polls: 4.1.8
  - previewgenerator: 5.2.1
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - quota_warning: 1.15.0
  - recognize: 3.6.2
  - recommendations: 1.4.0
  - registration: 2.1.0
  - related_resources: 1.0.4
  - richdocuments: 7.1.1
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0
  - sociallogin: 5.4.1
  - spreed: 15.0.4
  - support: 1.8.0
  - survey_client: 1.13.0
  - suspicious_login: 4.3.0
  - systemtags: 1.15.0
  - talked: 0.5.0
  - tasks: 0.14.5
  - terms_of_service: 2.1.0
  - text: 3.6.0
  - theming: 2.0.1
  - timemanager: 0.3.6
  - twofactor_backupcodes: 1.14.0
  - twofactor_email: 2.7.2
  - twofactor_gateway: 0.20.0
  - twofactor_nextcloud_notification: 3.6.0
  - twofactor_reminder: 1.0.0
  - twofactor_totp: 7.0.0
  - twofactor_webauthn: 1.1.2
  - unroundedcorners: 1.0.8
  - user_ldap: 1.15.0
  - user_saml: 5.1.2
  - user_status: 1.5.0
  - viewer: 1.9.0
  - weather_status: 1.5.0
  - welcome: 1.0.8
  - workflowengine: 2.7.0
Disabled:
  - files_accesscontrol: 1.15.1

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{
  "reqId": "A5jH1p68JHVxa3TrjQYn",
  "level": 0,
  "time": "2023-03-11T18:56:12+00:00",
  "remoteAddr": "188.192.16.245",
  "user": "admin",
  "app": "user_saml",
  "method": "GET",
  "url": "/core/preview?fileId=1240931&x=1920&y=1080&a=true",
  "message": "/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0",
  "version": "25.0.4.1",
  "data": {
    "app": "user_saml"
  }
}
{
  "reqId": "A5jH1p68JHVxa3TrjQYn",
  "level": 0,
  "time": "2023-03-11T18:56:12+00:00",
  "remoteAddr": "188.192.16.245",
  "user": "admin",
  "app": "encryption",
  "method": "GET",
  "url": "/core/preview?fileId=1240931&x=1920&y=1080&a=true",
  "message": "/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0",
  "version": "25.0.4.1",
  "data": {
    "app": "encryption"
  }
}
{
  "reqId": "A5jH1p68JHVxa3TrjQYn",
  "level": 0,
  "time": "2023-03-11T18:56:12+00:00",
  "remoteAddr": "188.192.16.245",
  "user": "admin",
  "app": "files_mindmap",
  "method": "GET",
  "url": "/core/preview?fileId=1240931&x=1920&y=1080&a=true",
  "message": "/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0",
  "version": "25.0.4.1",
  "data": {
    "app": "files_mindmap"
  }
}
{
  "reqId": "A5jH1p68JHVxa3TrjQYn",
  "level": 1,
  "time": "2023-03-11T18:56:12+00:00",
  "remoteAddr": "188.192.16.245",
  "user": "admin",
  "app": "no app in context",
  "method": "GET",
  "url": "/core/preview?fileId=1240931&x=1920&y=1080&a=true",
  "message": "Deprecated event type for OCP\\IPreview:PreviewRequested: Symfony\\Component\\EventDispatcher\\GenericEvent is used",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0",
  "version": "25.0.4.1",
  "data": []
}




{
  "reqId": "jPDpyM8aB9D22gNeDjkd",
  "level": 0,
  "time": "2023-03-11T18:56:16+00:00",
  "remoteAddr": "188.192.16.245",
  "user": "admin",
  "app": "user_saml",
  "method": "GET",
  "url": "/core/preview?fileId=1240931&x=1920&y=1080&a=true",
  "message": "/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0",
  "version": "25.0.4.1",
  "data": {
    "app": "user_saml"
  }
}
{
  "reqId": "jPDpyM8aB9D22gNeDjkd",
  "level": 0,
  "time": "2023-03-11T18:56:16+00:00",
  "remoteAddr": "188.192.16.245",
  "user": "admin",
  "app": "encryption",
  "method": "GET",
  "url": "/core/preview?fileId=1240931&x=1920&y=1080&a=true",
  "message": "/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0",
  "version": "25.0.4.1",
  "data": {
    "app": "encryption"
  }
}
{
  "reqId": "jPDpyM8aB9D22gNeDjkd",
  "level": 0,
  "time": "2023-03-11T18:56:16+00:00",
  "remoteAddr": "188.192.16.245",
  "user": "admin",
  "app": "files_mindmap",
  "method": "GET",
  "url": "/core/preview?fileId=1240931&x=1920&y=1080&a=true",
  "message": "/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0",
  "version": "25.0.4.1",
  "data": {
    "app": "files_mindmap"
  }
}
{
  "reqId": "jPDpyM8aB9D22gNeDjkd",
  "level": 1,
  "time": "2023-03-11T18:56:16+00:00",
  "remoteAddr": "188.192.16.245",
  "user": "admin",
  "app": "no app in context",
  "method": "GET",
  "url": "/core/preview?fileId=1240931&x=1920&y=1080&a=true",
  "message": "Deprecated event type for OCP\\IPreview:PreviewRequested: Symfony\\Component\\EventDispatcher\\GenericEvent is used",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0",
  "version": "25.0.4.1",
  "data": []
}

Additional info

No response

sHHHk avatar Mar 11 '23 19:03 sHHHk

Same idea of : https://github.com/nextcloud/server/issues/36013 ?

EricThi avatar Mar 17 '23 11:03 EricThi

@sHHHk sorry for the late reponse. Could you elaborate on how to reproduce the issue? Or what you mean with "preview image link doesn't work"? Do you mean that a file shared with another user doesn't display the preview in their file list?

Please provide a screenshot of what you consider broken.

mejo- avatar Jun 19 '24 14:06 mejo-

@sHHHk You describe error with talk app. (on my side, same issue, via web ou mobile app(android and ios)) => if you click on picture ; you can see it

Have you tested on files app ? (web and mobile ?) thumbnail are not created and on : web : you can see picture mobile : get error "No resized image available. Download full image?" => if Yes, picture(or video) is downloaded and can be watch locally.

Example : If folder his not shared : Screenshot 2024-06-20 at 09-06-35 Files - Nextcloud

If folder his shared by other(here user S) : Screenshot 2024-06-20 at 08-58-15 Files - Nextcloud

=> via web app, click on file and you see it => via app : you can see it

If share via link : no preview too I have configure preview, generate all, systemd generate all preview for all new files : no change

EricThi avatar Jun 20 '24 07:06 EricThi

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

nextcloud-command avatar Jul 21 '24 00:07 nextcloud-command

As @mejo- stated: please elaborate on how to reproduce this. Please be as step-by-step as possible. If we cannot reproduce, it'll be very challenging to sort out what is going on.

How are you creating the initial share?

Are you opening the file details/sharing tab and selecting Share link to generate a shareable link?

Or are you using the Talk paperclip then selecting Share from Nextcloud?

It sounds more like you're trying to use an Internal link to share with someone, but they don't actually have access to the share. So this would be expected behavior.

In my example the user who uploaded the image can view it with both of these URLs. Whereas the user who the file was shared with can only view it in his Nextcloud Talk Folder under the second URL. The server throws a 404 for the first URL.

Example for a preview URL: https://example.com/core/preview?fileId=1240931

This would be an Internal Link (well it's what it gets transformed to after the shorter one is generated). It won't work unless the destination party already has share access to this file (i.e. you've shared the folder or file previously with them with appropriate rights).

Example for https://example.com/remote.php/dav/files/user/Talk/20210908_091635.jpg

This second was likely shared using the Talk paperclip then selecting Share from Nextcloud. Because shareable links don't generate files here since they're not attachments.

joshtrichards avatar Oct 11 '24 19:10 joshtrichards

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

nextcloud-command avatar Nov 12 '24 00:11 nextcloud-command

Hello @joshtrichards Sorry for the delay, I missed notification to add more log/debug if needed.

For resume the situation (for me, it's the same for all has report the problem) : it's appear after a major upgrade. In my memory, for me, it's after upgrade 22.x to 23.0.1

(Another case has been fixed with another update 26.x or 27.x which break share link with download button mask)

Here, this case has for me already present : share will not correctly work since how it's opened.

Reproduce on my side :

  • create a folder (same for file) : github_37186
  • put files on it : archlinux-logo-300x300.png & archlinux-fond_ecran.png
  • create shares : link and user on nextcloud
  • open link or folder (via Nextcloud app or Web client)

Results via user received the sahre link or via user share : via Web client :
Logs on nextcloud.log with log_level => 1 :

{"reqId":"899fYIFdLskZciJzPzce","level":0,"time":"2025-02-27T15:40:55+00:00","remoteAddr":"172.16.0.9","user":"Eric","app":"activity","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"OCA\Files_Sharing\Activity\Providers\Downloads::parse() threw \InvalidArgumentException which is deprecated. Throw \OCP\Activity\Exceptions\UnknownActivityException when the event is not known to your provider and otherwise handle all \InvalidArgumentException yourself.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0","version":"30.0.6.2","data":{"app":"activity"}} {"reqId":"899fYIFdLskZciJzPzce","level":0,"time":"2025-02-27T15:40:55+00:00","remoteAddr":"172.16.0.9","user":"Eric","app":"activity","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"OCA\Files_Sharing\Activity\Providers\Groups::parse() threw \InvalidArgumentException which is deprecated. Throw \OCP\Activity\Exceptions\UnknownActivityException when the event is not known to your provider and otherwise handle all \InvalidArgumentException yourself.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0","version":"30.0.6.2","data":{"app":"activity"}} {"reqId":"899fYIFdLskZciJzPzce","level":0,"time":"2025-02-27T15:40:55+00:00","remoteAddr":"172.16.0.9","user":"Eric","app":"activity","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"OCA\Files_Sharing\Activity\Providers\PublicLinks::parse() threw \InvalidArgumentException which is deprecated. Throw \OCP\Activity\Exceptions\UnknownActivityException when the event is not known to your provider and otherwise handle all \InvalidArgumentException yourself.","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0","version":"30.0.6.2","data":{"app":"activity"}}

nginx logs :

==> example.com_access.log <== 172.16.0.9 - - [27/Feb/2025:16:43:23 +0100] "GET /apps/files/files/3339032?dir=/Share/github_37186 HTTP/2.0" 200 15976 "-" "Mozilla/5.0 (X11; Linux x86_64; rv :135.0) Gecko/20100101 Firefox/135.0" 172.16.0.9 - - [27/Feb/2025:16:43:23 +0100] "GET /apps/contacts/css/contacts-index.css?v=1ebaba34-1 HTTP/2.0" 200 22515 "-" "Mozilla/5.0 (X11; Linux x86_64; r v:135.0) Gecko/20100101 Firefox/135.0" 172.16.0.9 - - [27/Feb/2025:16:43:23 +0100] "GET /js/core/merged-template-prepend.js?v=aebad255-1 HTTP/2.0" 200 2811 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:1 35.0) Gecko/20100101 Firefox/135.0" 172.16.0.9 - - [27/Feb/2025:16:43:24 +0100] "REPORT /remote.php/dav/files/Eric/ HTTP/2.0" 207 4495 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0" 172.16.0.9 - - [27/Feb/2025:16:43:24 +0100] "GET /ocs/v2.php/apps/files/api/v1/folder-tree?path=%2F&depth=1 HTTP/2.0" 200 302 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0" 172.16.0.3 - - [27/Feb/2025:16:43:24 +0100] "GET /apps/richdocuments/settings/fonts.json HTTP/1.1" 304 0 "-" "COOLWSD HTTP Agent 24.04.11.2" 172.16.0.9 - - [27/Feb/2025:16:43:24 +0100] "GET /apps/theming/icon/files?v=af733f09 HTTP/2.0" 200 10282 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0" 172.16.0.9 - - [27/Feb/2025:16:43:24 +0100] "GET /apps/theming/favicon/files?v=af733f09 HTTP/2.0" 200 3662 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0" 172.16.0.9 - - [27/Feb/2025:16:43:24 +0100] "PROPFIND /remote.php/dav/files/Eric/Share/github_37186/ HTTP/2.0" 207 1051 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0" 172.16.0.9 - - [27/Feb/2025:16:43:28 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 200 556 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0" 172.16.0.9 - - [27/Feb/2025:16:43:28 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 200 556 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0" 172.16.0.9 - - [27/Feb/2025:16:43:28 +0100] "GET /apps/recommendations/api/recommendations HTTP/2.0" 200 387 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0" 172.16.0.9 - - [27/Feb/2025:16:43:28 +0100] "PROPFIND /remote.php/dav/files/Eric/Share/github_37186/ HTTP/2.0" 207 1051 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0" 172.16.0.9 - - [27/Feb/2025:16:43:28 +0100] "GET /core/preview?fileId=3339033&x=32&y=32&mimeFallback=true&v=ef0cbc&a=0 HTTP/2.0" 303 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0" 172.16.0.9 - - [27/Feb/2025:16:43:28 +0100] "GET /core/preview?fileId=3339034&x=32&y=32&mimeFallback=true&v=15bae8&a=0 HTTP/2.0" 303 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0"

and I see that : Image and if click on one file : Image

It's only break preview (same for video)

If use android app (same on apple) : nextcloud.log :

{"reqId":"wrRh4YwusbG539DSnYK2","level":0,"time":"2025-02-27T15:50:37+00:00","remoteAddr":"Public_IP","user":"Eric","app":"no app in context","method":"GET" ,"url":"/ocs/v2.php/apps/files_sharing/api/v1/shares?path=%2FShare%2Fgithub_37186%2F&reshares=true&subfiles=true","message":"Calling OCP\DB\QueryBuilder\IQ ueryBuilder::orX without parameters is deprecated and will throw soon.","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.30.8","version":"30.0.6.2","exc eption":{"Exception":"Exception","Message":"No parameters in call to OC\DB\QueryBuilder\ExpressionBuilder\ExpressionBuilder::orX","Code":0,"Trace":[{"file ":"/var/cloud/apps/circles/lib/Tools/Db/ExtendedQueryBuilder.php","line":488,"function":"orX","class":"OC\DB\QueryBuilder\ExpressionBuilder\ExpressionBuil der","type":"->"},{"file":"/var/cloud/apps/circles/lib/Tools/Db/ExtendedQueryBuilder.php","line":325,"function":"exprLimitNull","class":"OCA\Circles\Tools\ Db\ExtendedQueryBuilder","type":"->"},{"file":"/var/cloud/apps/circles/lib/Db/ShareWrapperRequest.php","line":352,"function":"limitNull","class":"OCA\Circle s\Tools\Db\ExtendedQueryBuilder","type":"->"},{"file":"/var/cloud/apps/circles/lib/Service/ShareWrapperService.php","line":253,"function":"getSharesBy","cl ass":"OCA\Circles\Db\ShareWrapperRequest","type":"->"},{"file":"/var/cloud/apps/circles/lib/ShareByCircleProvider.php","line":435,"function":"getSharesBy", "class":"OCA\Circles\Service\ShareWrapperService","type":"->"},{"file":"/var/cloud/lib/private/Share20/Manager.php","line":1249,"function":"getSharesBy","c lass":"OCA\Circles\ShareByCircleProvider","type":"->"},{"file":"/var/cloud/apps/files_sharing/lib/Controller/ShareAPIController.php","line":1981,"function": "getSharesBy","class":"OC\Share20\Manager","type":"->"},{"file":"/var/cloud/apps/files_sharing/lib/Controller/ShareAPIController.php","line":861,"function": "getAllShares","class":"OCA\Files_Sharing\Controller\ShareAPIController","type":"->"},{"function":"OCA\Files_Sharing\Controller\{closure}","class":"OCA
\Files_Sharing\Controller\ShareAPIController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/cloud/apps/files_sharing/lib/Contr oller/ShareAPIController.php","line":860,"function":"array_reduce"},{"file":"/var/cloud/apps/files_sharing/lib/Controller/ShareAPIController.php","line":1039, "function":"getSharesInDir","class":"OCA\Files_Sharing\Controller\ShareAPIController","type":"->"},{"file":"/var/cloud/apps/files_sharing/lib/Controller/Sh areAPIController.php","line":936,"function":"getFormattedShares","class":"OCA\Files_Sharing\Controller\ShareAPIController","type":"->"},{"file":"/var/cloud /lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"getShares","class":"OCA\Files_Sharing\Controller\ShareAPIController","type":"->"},{"f ile":"/var/cloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":" ->"},{"file":"/var/cloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file": "/var/cloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/var/cloud/ocs/v1.php","line":43, "function":"match","class":"OC\Route\Router","type":"->"},{"file":"/var/cloud/ocs/v2.php","line":7,"args":["/var/cloud/ocs/v1.php"],"function":"require_once "}],"File":"/var/cloud/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php","Line":87,"message":"Calling OCP\DB\QueryBuilder\IQueryBuilder: :orX without parameters is deprecated and will throw soon.","exception":{},"CustomMessage":"Calling OCP\DB\QueryBuilder\IQueryBuilder::orX without paramete rs is deprecated and will throw soon."}}

{"reqId":"wrRh4YwusbG539DSnYK2","level":0,"time":"2025-02-27T15:50:37+00:00","remoteAddr":"Public_IP","user":"Eric","app":"no app in context","method":"GET" ,"url":"/ocs/v2.php/apps/files_sharing/api/v1/shares?path=%2FShare%2Fgithub_37186%2F&reshares=true&subfiles=true","message":"Calling OCP\DB\QueryBuilder\IQ ueryBuilder::orX without parameters is deprecated and will throw soon.","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.30.8","version":"30.0.6.2","exc eption":{"Exception":"Exception","Message":"No parameters in call to OC\DB\QueryBuilder\ExpressionBuilder\ExpressionBuilder::orX","Code":0,"Trace":[{"file ":"/var/cloud/apps/circles/lib/Tools/Db/ExtendedQueryBuilder.php","line":488,"function":"orX","class":"OC\DB\QueryBuilder\ExpressionBuilder\ExpressionBuil der","type":"->"},{"file":"/var/cloud/apps/circles/lib/Tools/Db/ExtendedQueryBuilder.php","line":325,"function":"exprLimitNull","class":"OCA\Circles\Tools\Db\ExtendedQueryBuilder","type":"->"},{"file":"/var/cloud/apps/circles/lib/Db/ShareWrapperRequest.php","line":352,"function":"limitNull","class":"OCA\Circles\Tools\Db\ExtendedQueryBuilder","type":"->"},{"file":"/var/cloud/apps/circles/lib/Service/ShareWrapperService.php","line":253,"function":"getSharesBy","class":"OCA\Circles\Db\ShareWrapperRequest","type":"->"},{"file":"/var/cloud/apps/circles/lib/ShareByCircleProvider.php","line":435,"function":"getSharesBy","class":"OCA\Circles\Service\ShareWrapperService","type":"->"},{"file":"/var/cloud/lib/private/Share20/Manager.php","line":1249,"function":"getSharesBy","class":"OCA\Circles\ShareByCircleProvider","type":"->"},{"file":"/var/cloud/apps/files_sharing/lib/Controller/ShareAPIController.php","line":1981,"function":"getSharesBy","class":"OC\Share20\Manager","type":"->"},{"file":"/var/cloud/apps/files_sharing/lib/Controller/ShareAPIController.php","line":861,"function":"getAllShares","class":"OCA\Files_Sharing\Controller\ShareAPIController","type":"->"},{"function":"OCA\Files_Sharing\Controller\{closure}","class":"OCA\Files_Sharing\Controller\ShareAPIController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/cloud/apps/files_sharing/lib/Controller/ShareAPIController.php","line":860,"function":"array_reduce"},{"file":"/var/cloud/apps/files_sharing/lib/Controller/ShareAPIController.php","line":1039,"function":"getSharesInDir","class":"OCA\Files_Sharing\Controller\ShareAPIController","type":"->"},{"file":"/var/cloud/apps/files_sharing/lib/Controller/ShareAPIController.php","line":936,"function":"getFormattedShares","class":"OCA\Files_Sharing\Controller\ShareAPIController","type":"->"},{"file":"/var/cloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"getShares","class":"OCA\Files_Sharing\Controller\ShareAPIController","type":"->"},{"file":"/var/cloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/cloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/cloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/var/cloud/ocs/v1.php","line":43,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/var/cloud/ocs/v2.php","line":7,"args":["/var/cloud/ocs/v1.php"],"function":"require_once"}],"File":"/var/cloud/lib/private/DB/QueryBuilder/ExpressionBuilder/ExpressionBuilder.php","Line":87,"message":"Calling OCP\DB\QueryBuilder\IQueryBuilder::orX without parameters is deprecated and will throw soon.","exception":{},"CustomMessage":"Calling OCP\DB\QueryBuilder\IQueryBuilder::orX without parameters is deprecated and will throw soon."}}

nginx.log (see error 404 with same folder and files see previously on web client) :

=> example.com_access.log <== 172.16.0.10 - eric [27/Feb/2025:16:54:22 +0100] "PROPFIND /remote.php/dav/files/Eric/Share/github_37186/ HTTP/1.0" 207 1444 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.30.8" 172.16.0.10 - eric [27/Feb/2025:16:54:22 +0100] "GET /ocs/v2.php/apps/files_sharing/api/v1/shares?path=%2FShare%2Fgithub_37186%2F&reshares=true&subfiles=true HTTP/1.0" 200 138 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.30.8" 172.16.0.10 - eric [27/Feb/2025:16:55:03 +0100] "GET /index.php/core/preview?fileId=3339034&x=540&y=1129&a=1&mode=cover&forceIcon=0 HTTP/1.0" 404 2 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.30.8" 172.16.0.10 - eric [27/Feb/2025:16:55:03 +0100] "GET /ocs/v2.php/cloud/user?format=json HTTP/1.0" 200 544 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.30.8"

Screeshot from android app : Image Same view of web client

Image Cannot be view and it's linked to 404 of preview !

Just, preview it's present and work well via web client => not a problem. of course, work well for user which share !

I don't know exactly when this server it's installed (20 or 21). I haved already to test to create new server, push config to recreate "same" server with apps/config/etc and it's works.

For me, it's linked to a lock or bad info in DB, possible ? I can share more informations if needed I will probably migrate to 31.0.1 (yes, not to fresh 31.0.0 ;) ) and too, it's works for many years before the case appear, because we use a share folder between users to share pictures/videos and we start it april 2020 with tree : year => month (same has auto upload in nextcloud app)

Regards, Eric.

EricThi avatar Feb 27 '25 16:02 EricThi