Description
openedon Oct 9, 2024
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
I'm running a Nextcloud instance on Debian/bookworm
Last week, I upgraded the old NC-29.0.3.4 instance to (first) 29.0.7.1
and once that looked good enough, continued to upgrade to 30.0.0.14
.
Now one of users reported, that one of their public sharing links no longer works - a link that used to work (according to them) for the last years without any issues whatsoever.
I can confirm their observation that whenever somebody visits the public sharing link, they get an "Internal Server Error":
The file in question is an mp4 video file.
Steps to reproduce
- Have an old public sharing link
- Upgrade to NC-30
- Access the public sharing link
I'm aware that there is more to it. I know of other public sharing links that continue to work.
Expected behavior
I expect that sharing links continue to work across upgrades.
More-over I expect that no "Internal Server Error" is thrown.
Nextcloud Server version
30
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 28 to 29)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"version": "30.0.0.14",
"installed": true,
"maintenance": false,
"maintenance_window_start": 3,
"singleuser": false,
"updatechecker": false,
"name": "iemCloud",
"title": "iemCloud",
"theme": "",
"trusted_domains": [
"cloud.iem.at",
"cloud.iemnet"
],
"log_type": "file",
"logfile": "\/var\/log\/owncloud\/owncloud.log",
"loglevel": 2,
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"trashbin_retention_obligation": "auto",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"lost_password_link": "https:\/\/users.iem.at\/login",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpdebug": false,
"mail_smtpmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"defaultapp": "files,dashboard",
"appstoreenabled": true,
"appstore.experimental.enabled": false,
"appstoreurl": "https:\/\/apps.nextcloud.com\/api\/v1",
"apps_paths": [
{
"path": "\/var\/www\/nextcloud\/apps",
"url": "\/apps",
"writable": true
}
],
"enable_previews": true,
"preview_libreoffice_path": "\/usr\/bin\/libreoffice",
"preview_office_cl_parameters": " --headless --nologo --nofirststartwizard --invisible --norestore -convert-to pdf -outdir ",
"default_phone_region": "AT",
"ldapIgnoreNamingRules": false,
"forcessl": true,
"log_rotate_size": 10485760,
"ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
"overwrite.cli.url": "https:\/\/cloud.iem.at",
"memcache.local": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"filelocking.enabled": "true",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0,
"timeout": 0
},
"memcache.distributed": "\\OC\\Memcache\\Memcached",
"memcached_servers": [
[
"localhost",
11211
]
],
"mail_sendmailmode": "smtp",
"mail_smtpauth": 1,
"mail_smtpport": "587",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***"
}
}
List of activated Apps
Enabled:
- activity: 3.0.0
- admin_audit: 1.20.0
- bruteforcesettings: 3.0.0
- calendar: 5.0.0
- circles: 30.0.0-dev
- cloud_federation_api: 1.13.0
- comments: 1.20.1
- contacts: 6.1.0
- contactsinteraction: 1.11.0
- dashboard: 7.10.0
- dav: 1.31.1
- federatedfilesharing: 1.20.0
- federation: 1.20.0
- files: 2.2.0
- files_downloadlimit: 3.0.0
- files_pdfviewer: 3.0.0
- files_reminders: 1.3.0
- files_sharing: 1.22.0
- files_trashbin: 1.20.1
- files_versions: 1.23.0
- firstrunwizard: 3.0.0
- forms: 4.3.1
- logreader: 3.0.0
- lookup_server_connector: 1.18.0
- nextcloud_announcements: 2.0.0
- notifications: 3.0.0
- oauth2: 1.18.1
- password_policy: 2.0.0
- photos: 3.0.2
- privacy: 2.0.0
- provisioning_api: 1.20.0
- recommendations: 3.0.0
- related_resources: 1.5.0
- richdocuments: 8.5.1
- serverinfo: 2.0.0
- settings: 1.13.0
- sharebymail: 1.20.0
- support: 2.0.0
- survey_client: 2.0.0
- systemtags: 1.20.0
- text: 4.1.0
- theming: 2.5.0
- twofactor_backupcodes: 1.19.0
- updatenotification: 1.20.0
- user_ldap: 1.21.0
- user_status: 1.10.0
- viewer: 3.0.0
- weather_status: 1.10.0
- webhook_listeners: 1.1.0-dev
- workflowengine: 2.12.0
Disabled:
- encryption: 2.18.0
- files_external: 1.22.0 (installed 0.2)
- files_rightclick: 0.15.1 (installed 1.6.0)
- inventory: 0.1.2 (installed 0.1.2)
- suspicious_login: 8.0.0
- tasks: 0.16.1 (installed 0.16.1)
- twofactor_nextcloud_notification: 4.0.0
- twofactor_totp: 12.0.0-dev
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
(note that the remoteAddr
has been obfuscated)
{
"reqId": "VUrnQNQHDu5lb2E9ykT0",
"level": 3,
"time": "2024-10-09T10:54:53+00:00",
"remoteAddr": "1.2.3.4",
"user": "--",
"app": "index",
"method": "GET",
"url": "/index.php/s/BnewRUlh9iPY5sR",
"message": "OCP\\AppFramework\\Http\\Template\\PublicTemplateResponse::setHeaderTitle(): Argument #1 ($title) must be of type string, null given, called in /var/www/nextcloud/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php on line 235 in file '/var/www/nextcloud/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php' line 45",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0.1 Safari/605.1.15",
"version": "30.0.0.14",
"exception": {
"Exception": "Exception",
"Message": "OCP\\AppFramework\\Http\\Template\\PublicTemplateResponse::setHeaderTitle(): Argument #1 ($title) must be of type string, null given, called in /var/www/nextcloud/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php on line 235 in file '/var/www/nextcloud/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php' line 45",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 161,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 302,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/nextcloud/lib/base.php",
"line": 1001,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/nextcloud/index.php",
"line": 24,
"function": "handleRequest",
"class": "OC",
"type": "::"
}
],
"File": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"Line": 146,
"Previous": {
"Exception": "TypeError",
"Message": "OCP\\AppFramework\\Http\\Template\\PublicTemplateResponse::setHeaderTitle(): Argument #1 ($title) must be of type string, null given, called in /var/www/nextcloud/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php on line 235",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php",
"line": 235,
"function": "setHeaderTitle",
"class": "OCP\\AppFramework\\Http\\Template\\PublicTemplateResponse",
"type": "->"
},
{
"file": "/var/www/nextcloud/apps/files_sharing/lib/Controller/ShareController.php",
"line": 308,
"function": "renderPage",
"class": "OCA\\Files_Sharing\\DefaultPublicShareTemplateProvider",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 208,
"function": "showShare",
"class": "OCA\\Files_Sharing\\Controller\\ShareController",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
"line": 114,
"function": "executeController",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
"line": 161,
"function": "dispatch",
"class": "OC\\AppFramework\\Http\\Dispatcher",
"type": "->"
},
{
"file": "/var/www/nextcloud/lib/private/Route/Router.php",
"line": 302,
"function": "main",
"class": "OC\\AppFramework\\App",
"type": "::"
},
{
"file": "/var/www/nextcloud/lib/base.php",
"line": 1001,
"function": "match",
"class": "OC\\Route\\Router",
"type": "->"
},
{
"file": "/var/www/nextcloud/index.php",
"line": 24,
"function": "handleRequest",
"class": "OC",
"type": "::"
}
],
"File": "/var/www/nextcloud/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php",
"Line": 45
},
"message": "OCP\\AppFramework\\Http\\Template\\PublicTemplateResponse::setHeaderTitle(): Argument #1 ($title) must be of type string, null given, called in /var/www/nextcloud/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php on line 235 in file '/var/www/nextcloud/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php' line 45",
"exception": [],
"CustomMessage": "OCP\\AppFramework\\Http\\Template\\PublicTemplateResponse::setHeaderTitle(): Argument #1 ($title) must be of type string, null given, called in /var/www/nextcloud/apps/files_sharing/lib/DefaultPublicShareTemplateProvider.php on line 235 in file '/var/www/nextcloud/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php' line 45"
},
"id": "670676f9e6691"
}
Additional info
if I read the error correctly, setHeaderTitle()
is called with a null
value (rather than a string), and PHP8.2 is a bit more picky about this.
I guess that the share is really old and was not assigned a title/label back then.
I've tried running various maintenance tasks (including maintenance:repair --include-expensive
, db:add-missing-columns
; files:repair
- but really every command that looked like it could fix potential problems), to no avail.