Internal server error, when i go to settings/user/app

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 22.2.3
Operating system and version (eg, Ubuntu 20.04): Centos 8.5
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.37
PHP version (eg, 7.4): v7.4.27

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. log in on nextclolud, with admin or another user
  2. click on cicle on richt top
  3. click on settings (for normale users) or with admin also click on apps or users.

The output of your Nextcloud log in Admin > Logging:

{"reqId":"YfAyP5AvvrVGUnZGGjvrgAAAAI4","level":2,"time":"2022-01-25T17:24:15+00:00","remoteAddr":"93.63.223.37","user":"admtscaereoporti","app":"user_ldap","method":"GET","url":"/index.php/settings/user","message":"Bind failed: 49: Invalid credentials","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0","version":"22.2.3.0"}
{"reqId":"YfAyP5AvvrVGUnZGGjvrgAAAAI4","level":3,"time":"2022-01-25T17:24:15+00:00","remoteAddr":"93.63.223.37","user":"admtscaereoporti","app":"PHP","method":"GET","url":"/index.php/settings/user","message":"ldap_search(): Search: Operations error at /var/www/html/nextcloud/apps/user_ldap/lib/LDAP.php#336","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0","version":"22.2.3.0","exception":{"Exception":"Error","Message":"ldap_search(): Search: Operations error at /var/www/html/nextcloud/apps/user_ldap/lib/LDAP.php#336","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/LDAP.php","line":224,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"function":"OCA\\User_LDAP\\{closure}","class":"OCA\\User_LDAP\\LDAP","type":"->","args":["*** sensitive parameters replaced ***"]},{"function":"ldap_search"},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/LDAP.php","line":336,"function":"call_user_func_array"},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/LDAP.php","line":229,"function":"invokeLDAPMethod","class":"OCA\\User_LDAP\\LDAP","type":"->","args":["*** sensitive parameters replaced ***"]},{"function":"search","class":"OCA\\User_LDAP\\LDAP","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/Access.php","line":1113,"function":"call_user_func_array"},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/Access.php","line":1117,"function":"OCA\\User_LDAP\\{closure}","class":"OCA\\User_LDAP\\Access","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/Access.php","line":1175,"function":"invokeLDAPMethod","class":"OCA\\User_LDAP\\Access","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/Access.php","line":1280,"function":"executeSearch","class":"OCA\\User_LDAP\\Access","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/Access.php","line":1026,"function":"count","class":"OCA\\User_LDAP\\Access","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/User_LDAP.php","line":578,"function":"countUsers","class":"OCA\\User_LDAP\\Access","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/User_Proxy.php","line":349,"function":"countUsers","class":"OCA\\User_LDAP\\User_LDAP","type":"->"},{"file":"/var/www/html/nextcloud/apps/support/lib/Service/SubscriptionService.php","line":128,"function":"countUsers","class":"OCA\\User_LDAP\\User_Proxy","type":"->"},{"file":"/var/www/html/nextcloud/apps/support/lib/Service/SubscriptionService.php","line":269,"function":"getUserCount","class":"OCA\\Support\\Service\\SubscriptionService","type":"->"},{"file":"/var/www/html/nextcloud/apps/support/lib/Subscription/SubscriptionAdapter.php","line":51,"function":"getSubscriptionInfo","class":"OCA\\Support\\Service\\SubscriptionService","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Support/Subscription/Registry.php","line":140,"function":"hasValidSubscription","class":"OCA\\Support\\Subscription\\SubscriptionAdapter","type":"->"},{"file":"/var/www/html/nextcloud/apps/settings/lib/Settings/Personal/ServerDevNotice.php","line":103,"function":"delegateHasValidSubscription","class":"OC\\Support\\Subscription\\Registry","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Settings/Manager.php","line":184,"function":"getSection","class":"OCA\\Settings\\Settings\\Personal\\ServerDevNotice","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Settings/Manager.php","line":298,"function":"getSettings","class":"OC\\Settings\\Manager","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Settings/Manager.php","line":259,"function":"getPersonalSettings","class":"OC\\Settings\\Manager","type":"->"},{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":115,"function":"getPersonalSections","class":"OC\\Settings\\Manager","type":"->"},{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":63,"function":"formatPersonalSections","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":147,"function":"getNavigationParameters","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/PersonalSettingsController.php","line":67,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"index","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"YfAyP5AvvrVGUnZGGjvrgAAAAI4","level":3,"time":"2022-01-25T17:24:15+00:00","remoteAddr":"93.63.223.37","user":"admtscaereoporti","app":"index","method":"GET","url":"/index.php/settings/user","message":"LDAP Operations error","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0","version":"22.2.3.0","exception":{"Exception":"Exception","Message":"LDAP Operations error","Code":1,"Trace":[{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/LDAP.php","line":415,"function":"processLDAPError","class":"OCA\\User_LDAP\\LDAP","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/LDAP.php","line":338,"function":"postFunctionCall","class":"OCA\\User_LDAP\\LDAP","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/LDAP.php","line":229,"function":"invokeLDAPMethod","class":"OCA\\User_LDAP\\LDAP","type":"->","args":["*** sensitive parameters replaced ***"]},{"function":"search","class":"OCA\\User_LDAP\\LDAP","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/Access.php","line":1113,"function":"call_user_func_array"},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/Access.php","line":1117,"function":"OCA\\User_LDAP\\{closure}","class":"OCA\\User_LDAP\\Access","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/Access.php","line":1175,"function":"invokeLDAPMethod","class":"OCA\\User_LDAP\\Access","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/Access.php","line":1280,"function":"executeSearch","class":"OCA\\User_LDAP\\Access","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/Access.php","line":1026,"function":"count","class":"OCA\\User_LDAP\\Access","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/User_LDAP.php","line":578,"function":"countUsers","class":"OCA\\User_LDAP\\Access","type":"->"},{"file":"/var/www/html/nextcloud/apps/user_ldap/lib/User_Proxy.php","line":349,"function":"countUsers","class":"OCA\\User_LDAP\\User_LDAP","type":"->"},{"file":"/var/www/html/nextcloud/apps/support/lib/Service/SubscriptionService.php","line":128,"function":"countUsers","class":"OCA\\User_LDAP\\User_Proxy","type":"->"},{"file":"/var/www/html/nextcloud/apps/support/lib/Service/SubscriptionService.php","line":269,"function":"getUserCount","class":"OCA\\Support\\Service\\SubscriptionService","type":"->"},{"file":"/var/www/html/nextcloud/apps/support/lib/Subscription/SubscriptionAdapter.php","line":51,"function":"getSubscriptionInfo","class":"OCA\\Support\\Service\\SubscriptionService","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Support/Subscription/Registry.php","line":140,"function":"hasValidSubscription","class":"OCA\\Support\\Subscription\\SubscriptionAdapter","type":"->"},{"file":"/var/www/html/nextcloud/apps/settings/lib/Settings/Personal/ServerDevNotice.php","line":103,"function":"delegateHasValidSubscription","class":"OC\\Support\\Subscription\\Registry","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Settings/Manager.php","line":184,"function":"getSection","class":"OCA\\Settings\\Settings\\Personal\\ServerDevNotice","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Settings/Manager.php","line":298,"function":"getSettings","class":"OC\\Settings\\Manager","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Settings/Manager.php","line":259,"function":"getPersonalSettings","class":"OC\\Settings\\Manager","type":"->"},{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":115,"function":"getPersonalSections","class":"OC\\Settings\\Manager","type":"->"},{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":63,"function":"formatPersonalSections","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":147,"function":"getNavigationParameters","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/html/nextcloud/apps/settings/lib/Controller/PersonalSettingsController.php","line":67,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"index","class":"OCA\\Settings\\Controller\\PersonalSettingsController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1006,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/apps/user_ldap/lib/LDAP.php","Line":382,"CustomMessage":"--"}}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'xxxxxxxxxxx',
  'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'trusted_domains' =>
  array (
    0 => 'xxxxxx.xxxxxxxxxx.com',
  ),
  'datadirectory' => '/dati',
  'dbtype' => 'mysql',
  'version' => '22.2.3.0',
  'overwrite.cli.url' => 'http://xxxxxx.xxxxxxxxx.com',
  'dbname' => 'nextxxxxxx',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_xxxxxxxxxxxxxxxxxx',
  'dbpassword' => 'xxxxxxxxxxxxxx',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => '1',
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_from_address' => 'office',
  'mail_domain' => 'xxxxxxxxxxxxxxx.com',
  'mail_smtphost' => 'xx.xx.xx.xx',
  'mail_smtpport' => '25',
  'lost_password_link' => 'https://http://xxxxxx.xxxxxxxxx.com',
);

The output of your Apache/nginx/system log in /var/log/access_log:

[25/Jan/2022:18:31:00 +0100] "GET /index.php/settings/user HTTP/1.1" 500 4682 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0"
[25/Jan/2022:18:31:01 +0100] "GET /index.php/apps/theming/icon?v=41 HTTP/1.1" 200 43972 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0"
[25/Jan/2022:18:31:01 +0100] "GET /index.php/apps/theming/favicon?v=41 HTTP/1.1" 200 1150 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0"
[25/Jan/2022:18:31:07 +0100] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0 Waterfox/56.6.2021.10"
[25/Jan/2022:18:31:10 +0100] "GET /index.php/apps/files/ajax/getstoragestats.php?dir=%2F HTTP/1.1" 200 175 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0 Waterfox/56.6.2021.10"

Hi @enrico.landucci

since there is no question or problem description in your post other than the error log, it’s a bit hard to help you out here. But the error message is pretty clear: you seem to have an LDAP server configured to authenticate user accounts against. The credentials you provided to that LDAP server seem to be invalid.

/S

I’m sorry, but in the object and in the section “steps to replicate it”, is clear.

However, when after i log in in the system by a client user or an admin user, and i go to the settings or in the other possibility in the user menu, like “settings, user or app” i received the internal server error.

And i no have any help from logs file.

image

same here…

Ciao @enrico.landucci

as stated in my post above - what you are seeing is a LDAP issue. There is no problem without an LDAP server (which is the regular way of installing it for home-use).

/S