server
server copied to clipboard
[Bug]: PDF viewer stopped working with v28 unless federated cloud sharing is enabled
⚠️ 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 OR Nextcloud Community Forum (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
I upgraded from 27.1.6.2 to 28.0.2.5 and now the PDF viewer doesn't work for public shares of PDF files.
On my live instance: I upload a PDF or locate an existing PDF no problem, then I create a public share with default options. I leave Download allowed. I get a HTTP 200 fetching the share URL itself and I see the Nextcloud banner at the top of the page with the file name and Download button, but the main part of the page is blank (no PDF preview). In the console I see a failed XHR for SERVER/public.php/webdav/
(HTTP 401 - unauthorized) and an error: Could not open file / Error: Invalid response: 401
. Any ideas? I searched around a bit and it doesn't seem like others are running into this same issue.
https://help.nextcloud.com/t/pdf-dont-open-after-nc-upgrade-to-28-0-2/181260 sounds like a similar symptom but perhaps different cause.
https://github.com/nextcloud/server/issues/5496 is really old, but matches the error I'm seeing.
I have a repro in a production/live instance and in a fresh 28.0.2.5 instance running in a Docker container after disabling all Federated Cloud Sharing options.
Steps to reproduce
-
docker run --rm -it -p 8080:80 nextcloud
- set up instance, skip installing additional apps
- create public link for a PDF -- I used
Nextcloud Manual.pdf
- works -- go to public link and see PDF in viewer as logged-out user
- toggle off all Federated Cloud Sharing options at
http://localhost:8080/settings/admin/sharing
- with browser console open, reload public share link for the PDF
- in console: see PROPFIND request for
/public.php/webdav/
returning HTTP 401 Unauthorized - in browser: see PDF viewer not working
Expected behavior
PDF viewer works with all Federated Cloud Sharing options disabled.
Installation method
Community Docker image
Nextcloud Server version
28
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
SQlite
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- [X] Default user-backend (database)
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Configuration report
{
"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
}
],
"upgrade.disable-web": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost:8080"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "sqlite3",
"version": "28.0.2.5",
"overwrite.cli.url": "http:\/\/localhost:8080",
"installed": true
}
}
List of activated Apps
Enabled:
- activity: 2.20.0
- circles: 28.0.0-dev
- cloud_federation_api: 1.11.0
- comments: 1.18.0
- contactsinteraction: 1.9.0
- dashboard: 7.8.0
- dav: 1.29.1
- federatedfilesharing: 1.18.0
- federation: 1.18.0
- files: 2.0.0
- files_pdfviewer: 2.9.0
- files_reminders: 1.1.0
- files_sharing: 1.20.0
- files_trashbin: 1.18.0
- files_versions: 1.21.0
- firstrunwizard: 2.17.0
- logreader: 2.13.0
- lookup_server_connector: 1.16.0
- nextcloud_announcements: 1.17.0
- notifications: 2.16.0
- oauth2: 1.16.3
- password_policy: 1.18.0
- photos: 2.4.0
- privacy: 1.12.0
- provisioning_api: 1.18.0
- recommendations: 2.0.0
- related_resources: 1.3.0
- serverinfo: 1.18.0
- settings: 1.10.1
- sharebymail: 1.18.0
- support: 1.11.0
- survey_client: 1.16.0
- systemtags: 1.18.0
- text: 3.9.1
- theming: 2.3.0
- twofactor_backupcodes: 1.17.0
- updatenotification: 1.18.0
- user_status: 1.8.1
- viewer: 2.2.0
- weather_status: 1.8.0
- workflowengine: 2.10.0
Disabled:
- admin_audit: 1.18.0
- bruteforcesettings: 2.8.0
- encryption: 2.16.0
- files_external: 1.20.0
- suspicious_login: 6.0.0
- twofactor_totp: 10.0.0-beta.2
- user_ldap: 1.19.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
None.
Additional info
None.
Hi! We are experiencing the same behaviour in our Nextcloud instance. Same version, same issue.
After enabling option Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares) PDF preview in public shares work again.
Thank you!
Hi,
same issue with our Nextcloud Enterprise v28.0.2.
The workaround with the one federated sharing option enabled, works for our customer.
Pushing this to raise the awareness of this issue!
Same Issue for us with V28.0.2. The workaround described by @radasys also works for us.
Cannot reproduce anymore on v28.0.3rc2
Actually duplicate of https://github.com/nextcloud/server/issues/43287
Verified fixed in stable
community Docker image, v28.0.3.2