Repository navigation
Update to NC 19.0.1: Internal server error after login #21885
Copy link
Copy link
Closed
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmapbug
Description
Steps to reproduce
- Updated from NC 19.0.0 to 19.0.1 without problem using web installer
- After update login screen shows up
- Try to login, after successful login it switches to page with internal server error
Expected behaviour
after successful login switch to files
Actual behaviour
internal server error
Server configuration
Operating system: linux debian 10 buster
Web server: Apache 2.4.38
Database: MariaDB 10.3.22
PHP version: 7.4.8
Nextcloud version: 19.0.1
Updated from an older Nextcloud/ownCloud or fresh install: update from 19.0.0
Where did you install Nextcloud from: web installer
Signing status:
Signing status
cannot get to this page due to internal server error
List of activated apps:
App list
Enabled:
- accessibility: 1.5.0
- activity: 2.12.0
- admin_audit: 1.9.0
- calendar: 2.0.3
- cloud_federation_api: 1.2.0
- comments: 1.9.0
- contacts: 3.3.0
- contactsinteraction: 1.0.0
- dav: 1.15.0
- encryption: 2.7.0
- federatedfilesharing: 1.9.0
- federation: 1.9.0
- files: 1.14.0
- files_external: 1.10.0
- files_pdfviewer: 1.8.0
- files_rightclick: 0.16.0
- files_sharing: 1.11.0
- files_trashbin: 1.9.0
- files_versions: 1.12.0
- files_videoplayer: 1.8.0
- logreader: 2.4.0
- lookup_server_connector: 1.7.0
- mail: 1.4.1
- news: 14.1.11
- nextcloud_announcements: 1.8.0
- notes: 3.6.0
- notifications: 2.7.0
- oauth2: 1.7.0
- ocsms: 2.1.8
- password_policy: 1.9.1
- photos: 1.1.0
- privacy: 1.3.0
- provisioning_api: 1.9.0
- qownnotesapi: 20.1.0
- recommendations: 0.7.0
- serverinfo: 1.9.0
- settings: 1.1.0
- sharebymail: 1.9.0
- spreed: 9.0.1
- support: 1.2.1
- systemtags: 1.9.0
- tasks: 0.13.2
- text: 3.0.1
- theming: 1.10.0
- twofactor_backupcodes: 1.8.0
- twofactor_totp: 4.1.3
- updatenotification: 1.9.0
- viewer: 1.3.0
- workflowengine: 2.1.0
Disabled:
- firstrunwizard
- survey_client
- user_ldap
Nextcloud configuration:
Config report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"10.0.0.10"
],
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"log_type": "owncloud",
"logfile": "\/var\/log\/nextcloud.log",
"loglevel": 2,
"log_rotate_size": 104857600,
"dbtype": "mysql",
"version": "19.0.1.1",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"logtimezone": "UTC",
"installed": true,
"mail_smtpmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtpsecure": "tls",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"appstoreenabled": true,
"appstore.experimental.enabled": true,
"theme": "",
"maintenance": false,
"memcache.local": "\\OC\\Memcache\\APCu",
"cache_path": "\/data\/ownclouddata\/ocd\/cache",
"mail_smtpport": "587",
"app.mail.server-side-cache.enabled": true,
"htaccess.RewriteBase": "\/owncloud",
"updater.release.channel": "stable",
"mysql.utf8mb4": true,
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0,
"timeout": 0
},
"filelocking.enabled": true,
"activity_expire_days": 14,
"auth.bruteforce.protection.enabled": true,
"blacklisted_files": [
".htaccess",
"Thumbs.db",
"thumbs.db",
"DS_Store"
],
"cron_log": true,
"enable_previews": true,
"enabledPreviewProviders": [
"OC\\Preview\\PNG",
"OC\\Preview\\JPEG",
"OC\\Preview\\GIF",
"OC\\Preview\\BMP",
"OC\\Preview\\XBitmap",
"OC\\Preview\\Movie",
"OC\\Preview\\PDF",
"OC\\Preview\\MP3",
"OC\\Preview\\TXT",
"OC\\Preview\\MarkDown"
],
"preview_max_x": 1024,
"preview_max_y": 768,
"preview_max_scale_factor": 1,
"filesystem_check_changes": 0,
"integrity.check.disabled": false,
"knowledgebaseenabled": false,
"overwriteprotocol": "https",
"quota_include_external_storage": false,
"trashbin_retention_obligation": "auto, 7",
"app_install_overwrite": [
"ocsms",
"contacts",
"qownnotesapi"
],
"updater.secret": "***REMOVED SENSITIVE VALUE***"
}
}
Are you using external storage, if yes which one: smb
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
LDAP configuration (delete this part if not used)
LDAP config
no LDAP
Client configuration
Browser:
Operating system:
Logs
Web server error log
Web server error log
no error in apache2/error.log
Nextcloud log (data/nextcloud.log)
Nextcloud log
same error over and over again
"Exception":"TypeError: Return value of OC\\Group\\Database::getDisplayName() must be of the type string, null returned at /data/ownclouddata/www/owncloud/lib/private/Group/Database.php#444"
Browser log
Browser log
no browser log
Reacted by D, Krzysztof and Markus Pöschl
Metadata
Metadata
Assignees
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmapbug
Activity
dh-connect commentedon Jul 18, 2020
Info: downgraded back to NC 19.0.0.12, and NC works again without internal server error.
especially-relative commentedon Jul 20, 2020
Same issue;
That code block was added in 5ebb535; commenting it out seems to be a workaround. I am able to browse groups, in the admin UI once I've logged in, so I am not sure why the error is thrown on login.
dh-connect commentedon Jul 20, 2020
thank you so much, workaround worked.
rolandixor commentedon Jul 21, 2020
Is it specifically line 444 that you commented out? I tried this and it didn't seem to work for me.
It would be helpful if you could be more specific about what you commented out, as there are multiple things listed in the commit.
especially-relative commentedon Jul 21, 2020
robinelfrink commentedon Sep 7, 2020
Same issue here, upgrading from 18.0.8 to 19.0.2. Commenting the three lines in
getDisplayNameas a workaround does the trick.dh-connect commentedon Sep 8, 2020
instead of commenting it out, you can also handle the null value of displayname like this:
cnaumer commentedon Sep 8, 2020
We have the same Problem. NC 19.0.2 and LDAP backend. However, until now I only got one user not working the rest (~100) have not complained. As we are using an AD as LDAP backend and there are no displaynames set on any groups I am not sure what makes this user different.
I am waiting for feedback if the comment from dh-connect works as a fix.
kbzowski commentedon Sep 10, 2020
I can confirm that problem still exists in 19.0.2 (pure local user storage).
My solution: comment lines 455-457 (if condition) in /var/www/html/lib/private/Group/Database.php. Browse list of users in nextcloud (this will populate cache), and uncommnent previously commented code. After that operation it works fine. I believed something is wrong with not populated properly cache.
cnaumer commentedon Sep 11, 2020
I can also confirm that the Problem still exists in 19.0.3 and the comment from dh-connect works as a fix with that version also.
vascowhite commentedon Sep 13, 2020
I have three instances of NC running, all on Debian/Apache. This is happening on just one of the instances. I'm trying to upgrade to 19.03 from 18.9. Success on two instances, but failed with this error on one.
I have noticed that error message below gives the
argsasonboard, but the group name is actuallyOnboard. So maybe the issue is elsewhere?Here's the error formatted for easier reading.
vascowhite commentedon Sep 22, 2020
No further movement on fixing this?
Fix null displayname crash as described in nextcloud#21885
7 remaining items
antondollmaier commentedon Jan 11, 2021
Issue is still present in 20.0.4. Haven't yet searched how the groupcache is wrongly populated.
thoro commentedon Jan 21, 2021
Also with 20.0.5 ... maybe someone cares about checking that?
the oc_ldap_group_mapping table has the owncloud_name the same as the CN, but cn is all lower case, and owncloud_name is correctly typed (i.e. mixed case)
For me it seems to always affect only a single user at a time so far.
soerpoers commentedon Feb 1, 2021
Seems that it's also the same with 20.0.6
I don't use ldap so there isn't a table of that there.
All users except admins have this problem.
soerpoers commentedon Feb 1, 2021
So I just solved the problem for me by deleting some records of users in the oc_group_user table, whose groups I had actually deleted in the frontend some time ago. But the records of the users associated with the groups were still there in the database and thus probably triggered the problem after each update.
dh-connect commentedon Feb 2, 2021
thank you for the hint, I did the same, had users assigned to a group GID "users", but in table oc_groups is no GID "users", tried it out without the fix and it works now, so guess the issue was a GID used that's not in the oc_groups table
robinelfrink commentedon Feb 8, 2021
List user/group combinations with non-existing group:
Remove user/group combinations with non-existing group:
vascowhite commentedon Feb 8, 2021
@robinelfrink @soerpoers
Thank you, that worked perfectly.
Fix null displayname crash as described in #21885
Merge pull request #23065 from TomG736/FixEmptyDisplayName
szaimen commentedon Jun 23, 2021
Looks like this was fixed with #23065
Fix null displayname crash as described in #21885
Fix null displayname crash as described in #21885
Merge pull request #28789 from nextcloud/backport/23065/stable20
Merge pull request #28790 from nextcloud/backport/23065/stable21