Repository navigation
No preview in public conversations when not logged in (guest) #19247
Description
Tip
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
This looks like a regression of old and closed issues, for example #4471 or #2309.
Steps to reproduce
- In Talk, use "Create a new conversation"
- With default type
- Activate "Allow guest to join by link"
- And "Create the conversation"
- Add a JPEG image from your local disk ("Upload from device") to the conversation
- Connect to the conversation from another browser or from a private window (as a guest)
- The image is there but no preview is available
The following URL (example) gets a 500 error and no other detail:
https://mysite/apps/files_sharing/publicpreview/roL68HA6983KtHw?x=-1&y=384&a=1
Additional steps:
5. Click on the image, it opens a public share where the image is displayed
6. In that new context the preview is visible
The associated URL (example) is:
https://mysite/apps/files_sharing/publicpreview/roL68HA6983KtHw?file=%2FIMG_20260823_190436.jpg&x=32&y=32&mimeFallback=true&v=858990&a=0
7. If I add (using curl) "file=" to the first (failing) URL above, it works
8. All the previews work correctly if the user is logged in. The problem above only occurs for guests
Alternative scenario: same as above but using "Share from Files" (globally this should be checked with all the ways to share items).
Expected behaviour
The previews should work for guests of public conversations.
Actual behaviour
The previews in the public conversations fail when files were shared with "Upload from device"
Alternative scenario: Some of the previews in the public conversations fail when files were shared with "Share from Files"
Talk app
Talk app version: 24.0.4
Custom Signaling server configured: no
Custom TURN server configured: no
Custom STUN server configured: no
Browser
Microphone available: no
Camera available: no
Operating system: Ubuntu
Browser name: Firefox/Chromium
Browser version: Firefox 154/ Chromium 152
Browser log
Failed to load resource: the server responded with a status of 500 ()
GET
https://mysite/apps/files_sharing/publicpreview/roL68HA6983KtHw?x=-1&y=384&a=1
[HTTP/2 500 96ms]
(same kind of log for the alternative scenario)
Server configuration
Operating system: Debian (host that runs nextcloud through helm)
Web server: Apache/Nginx
Database: PostgreSQL
PHP version: 8.5.10
Nextcloud Version: 34.0.3
List of activated apps:
Details
Enabled:
- activity: 7.0.0
- app_api: 34.0.0
- appstore: 1.0.0
- bruteforcesettings: 7.0.0
- circles: 34.0.0
- cloud_federation_api: 1.18.0
- comments: 1.24.0
- contactsinteraction: 1.15.0
- dashboard: 7.14.0
- dav: 1.40.0
- federatedfilesharing: 1.24.0
- federation: 1.24.0
- files: 2.6.0
- files_downloadlimit: 5.2.0
- files_lock: 34.0.1
- files_pdfviewer: 7.0.0-dev.0
- files_reminders: 1.7.0
- files_sharing: 1.26.0
- files_sharing_raw: 0.7.2
- files_trashbin: 1.24.0
- files_versions: 1.27.0
- firstrunwizard: 7.0.0-dev.0
- logreader: 7.0.0
- lookup_server_connector: 1.22.0
- nextcloud_announcements: 6.0.0
- notifications: 7.0.0-dev.1
- oauth2: 1.22.0
- office: 1.0.0
- password_policy: 6.0.0-dev.0
- photos: 7.0.0
- privacy: 6.0.0-dev.1
- profile: 1.3.0
- provisioning_api: 1.24.0
- recommendations: 7.0.0
- related_resources: 5.0.0-dev.0
- richdocuments: 11.1.0
- serverinfo: 6.0.0
- settings: 1.17.0
- sharebymail: 1.24.0
- spreed: 24.0.4
- support: 6.0.0
- survey_client: 6.0.0-dev.0
- systemtags: 1.24.0
- text: 8.0.0
- theming: 2.9.0
- theming_customcss: 1.21.0
- twofactor_backupcodes: 1.23.0
- twofactor_totp: 16.0.0
- updatenotification: 1.24.0
- user_status: 1.14.0
- viewer: 7.0.0-dev.0
- weather_status: 1.14.0
- webhook_listeners: 1.6.0
- workflowengine: 2.16.0
Disabled:
- admin_audit: 1.24.0
- encryption: 2.22.0
- files_external: 1.26.0
- suspicious_login: 12.0.0-dev.0
- twofactor_nextcloud_notification: 8.0.0
- user_ldap: 1.25.0
Nextcloud configuration:
Details
{
"system": {
"htaccess.RewriteBase": "\/",
"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
}
],
"mail_smtpmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpsecure": "tls",
"mail_smtpauth": true,
"mail_smtpauthtype": "LOGIN",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"upgrade.disable-web": true,
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"<my host>"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "34.0.3.2",
"overwrite.cli.url": "https:\/\/<my host>",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"updater.server.url": "***REMOVED SENSITIVE VALUE***",
"loglevel": 2,
"log_type": "syslog",
"mail_smtptimeout": 30,
"overwriteprotocol": "https",
"mail_smtpdebug": false,
"maintenance": false,
"syslog_tag": "Nextcloud",
"logfile": "",
"openmetrics_allowed_clients": [
"127.0.0.1",
"10.42.0.0\/16",
"10.43.0.0\/16"
],
"enabledPreviewProviders": {
"0": "OC\\Preview\\Movie",
"1": "OC\\Preview\\MP4",
"2": "OC\\Preview\\AVI",
"3": "OC\\Preview\\MKV",
"4": "OC\\Preview\\MOV",
"5": "OC\\Preview\\Image",
"6": "OC\\Preview\\PNG",
"7": "OC\\Preview\\JPEG",
"8": "OC\\Preview\\GIF",
"9": "OC\\Preview\\HEIC",
"11": "OC\\Preview\\JPG"
},
"backgroundjobs_mode": "cron",
"update_check": false,
"simpleSignUpLink.shown": false,
"app_install_overwrite": [],
"DB_PORT": "5432"
}
}
Server log (data/nextcloud.log)
Details
{"reqId":"z8P6WciD4t2fhx0WgRaz","level":3,"time":"2026-09-03 07:16:37","remoteAddr":"192.168.193.165","user":"--","app":"index","method":"GET","url":"/apps/files_sharing/publicpreview/roL68HA6983KtHw?x=-1&y=384&a=1","scriptName":"/index.php","message":"OC\\PreviewManager::getPreview(): Argument #1 ($file) must be of type OCP\\Files\\File, OC\\Files\\Node\\Folder given, called in /var/www/html/apps/files_sharing/lib/Controller/PublicPreviewController.php on line 133 in file '/var/www/html/lib/private/PreviewManager.php' line 171","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36","version":"34.0.3.2","exception":{"Exception":"Exception","Message":"OC\\PreviewManager::getPreview(): Argument #1 ($file) must be of type OCP\\Files\\File, OC\\Files\\Node\\Folder given, called in /var/www/html/apps/files_sharing/lib/Controller/PublicPreviewController.php on line 133 in file '/var/www/html/lib/private/PreviewManager.php' line 171","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":137,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files_Sharing\\Controller\\PublicPreviewController"},"getPreview"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":324,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Files_Sharing\\Controller\\PublicPreviewController","getPreview",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"files_sharing.publicpreview.getpreview","token":"roL68HA6983KtHw"}]},{"file":"/var/www/html/lib/base.php","line":1172,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/files_sharing/publicpreview/roL68HA6983KtHw"]},{"file":"/var/www/html/index.php","line":25,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":110,"Previous":{"Exception":"TypeError","Message":"OC\\PreviewManager::getPreview(): Argument #1 ($file) must be of type OCP\\Files\\File, OC\\Files\\Node\\Folder given, called in /var/www/html/apps/files_sharing/lib/Controller/PublicPreviewController.php on line 133","Code":0,"Trace":[{"file":"/var/www/html/apps/files_sharing/lib/Controller/PublicPreviewController.php","line":133,"function":"getPreview","class":"OC\\PreviewManager","type":"->","args":[{"__class__":"OC\\Files\\Node\\Folder"},-1,384,false]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":165,"function":"getPreview","class":"OCA\\Files_Sharing\\Controller\\PublicPreviewController","type":"->","args":["roL68HA6983KtHw",{"__class__":"OC\\Files\\Node\\Folder"},-1,384,true,false]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":78,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files_Sharing\\Controller\\PublicPreviewController"},"getPreview"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":137,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files_Sharing\\Controller\\PublicPreviewController"},"getPreview"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":324,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Files_Sharing\\Controller\\PublicPreviewController","getPreview",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"files_sharing.publicpreview.getpreview","token":"roL68HA6983KtHw"}]},{"file":"/var/www/html/lib/base.php","line":1172,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/files_sharing/publicpreview/roL68HA6983KtHw"]},{"file":"/var/www/html/index.php","line":25,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/PreviewManager.php","Line":171},"message":"OC\\PreviewManager::getPreview(): Argument #1 ($file) must be of type OCP\\Files\\File, OC\\Files\\Node\\Folder given, called in /var/www/html/apps/files_sharing/lib/Controller/PublicPreviewController.php on line 133 in file '/var/www/html/lib/private/PreviewManager.php' line 171","exception":"{\"class\":\"Exception\",\"message\":\"OC\\PreviewManager::getPreview(): Argument #1 ($file) must be of type OCP\\Files\\File, OC\\Files\\Node\\Folder given, called in /var/www/html/apps/files_sharing/lib/Controller/PublicPreviewController.php on line 133 in file '/var/www/html/lib/private/PreviewManager.php' line 171\",\"code\":0,\"file\":\"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php:110\",\"trace\":\"#0 /var/www/html/lib/private/AppFramework/App.php(137): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OCA\\Files_Sharing\\Controller\\PublicPreviewController), 'getPreview')\\n#1 /var/www/html/lib/private/Route/Router.php(324): OC\\AppFramework\\App::main('OCA\\\\Files_Shari...', 'getPreview', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\\n#2 /var/www/html/lib/base.php(1172): OC\\Route\\Router->match('/apps/files_sha...')\\n#3 /var/www/html/index.php(25): OC::handleRequest()\\n#4 {main}\",\"previous\":{\"class\":\"TypeError\",\"message\":\"OC\\PreviewManager::getPreview(): Argument #1 ($file) must be of type OCP\\Files\\File, OC\\Files\\Node\\Folder given, called in /var/www/html/apps/files_sharing/lib/Controller/PublicPreviewController.php on line 133\",\"code\":0,\"file\":\"/var/www/html/lib/private/PreviewManager.php:171\",\"trace\":\"#0 /var/www/html/apps/files_sharing/lib/Controller/PublicPreviewController.php(133): OC\\PreviewManager->getPreview(Object(OC\\Files\\Node\\Folder), -1, 384, false)\\n#1 /var/www/html/lib/private/AppFramework/Http/Dispatcher.php(165): OCA\\Files_Sharing\\Controller\\PublicPreviewController->getPreview('roL68HA6983KtHw', Object(OC\\Files\\Node\\Folder), -1, 384, true, false)\\n#2 /var/www/html/lib/private/AppFramework/Http/Dispatcher.php(78): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OCA\\Files_Sharing\\Controller\\PublicPreviewController), 'getPreview')\\n#3 /var/www/html/lib/private/AppFramework/App.php(137): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OCA\\Files_Sharing\\Controller\\PublicPreviewController), 'getPreview')\\n#4 /var/www/html/lib/private/Route/Router.php(324): OC\\AppFramework\\App::main('OCA\\\\Files_Shari...', 'getPreview', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\\n#5 /var/www/html/lib/base.php(1172): OC\\Route\\Router->match('/apps/files_sha...')\\n#6 /var/www/html/index.php(25): OC::handleRequest()\\n#7 {main}\"}}","CustomMessage":"OC\\PreviewManager::getPreview(): Argument #1 ($file) must be of type OCP\\Files\\File, OC\\Files\\Node\\Folder given, called in /var/www/html/apps/files_sharing/lib/Controller/PublicPreviewController.php on line 133 in file '/var/www/html/lib/private/PreviewManager.php' line 171"}}
When using the alternative scenario:
Activity
[-]No preview as guest in public conversations[/-][+]No preview in public conversations when not logged in (guest)[/+]Antreesy commentedon Sep 3, 2026
Can reproduce for 34+, but I'm getting 400.
Should be a combination of files_sharing API hardening + Talk using conversation subfolders feature now
For 500 error -
SQLSTATE[42702]: Ambiguous column: 7 ERROR: column reference \"file_id\" is ambiguous- that was fixed in nextcloud/server#63347Sabst commentedon Sep 3, 2026
That's strange but maybe related to a nextcloud/talk version difference: I never get 400 in the different error cases.
The status is:
Sabst commentedon Sep 25, 2026
Thanks, it works now 👍