Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User cannot open settings page #10813

Closed
JMBokhorst opened this issue Aug 22, 2018 · 10 comments
Closed

User cannot open settings page #10813

JMBokhorst opened this issue Aug 22, 2018 · 10 comments
Labels

Comments

@JMBokhorst
Copy link

Steps to reproduce

  1. Login with user (Users-name is with a capital)
  2. Click on Settings -> error occurs.

Expected behaviour

Setting page should open.

Actual behaviour

We get an internal server error with a require ID.

Server configuration

Operating system:
Ubuntu 16.04
Web server:
Apache v2.4.29
Database:
MySQL
PHP version:
7.2.7
Nextcloud version: (see Nextcloud admin page)
13.0.5.2
Updated from an older Nextcloud/ownCloud or fresh install:
Updated from an older version
Where did you install Nextcloud from:
Via the nextcloud server manual on the website.

Signing status:

Signing status

No errors have been found.

Enabled:

  • activity: 2.6.1
  • admin_audit: 1.3.0
  • bruteforcesettings: 1.1.0
  • calendar: 1.6.1
  • checksum: 0.4.0
  • comments: 1.3.0
  • contacts: 2.1.5
  • dav: 1.4.7
  • drawio: 0.9.0
  • encryption: 2.0.0
  • federatedfilesharing: 1.3.1
  • federation: 1.3.0
  • files: 1.8.0
  • files_accesscontrol: 1.3.0
  • files_downloadactivity: 1.2.0
  • files_pdfviewer: 1.2.1
  • files_reader: 1.2.3
  • files_sharing: 1.5.0
  • files_texteditor: 2.5.1
  • files_trashbin: 1.3.0
  • files_versions: 1.6.0
  • files_videoplayer: 1.2.0
  • firstrunwizard: 2.2.1
  • flowupload: 0.0.7
  • gallery: 18.0.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.1.0
  • nextcloud_announcements: 1.2.0
  • notes: 2.4.0
  • notifications: 2.1.2
  • oauth2: 1.1.1
  • onlyoffice: 2.0.2
  • passman: 2.1.4
  • password_policy: 1.3.0
  • provisioning_api: 1.3.0
  • quota_warning: 1.2.0
  • ransomware_protection: 1.1.1
  • serverinfo: 1.3.0
  • sharebymail: 1.3.0
  • survey_client: 1.1.0
  • systemtags: 1.3.0
  • tasks: 0.9.6
  • theming: 1.4.5
  • twofactor_backupcodes: 1.2.3
  • updatenotification: 1.3.0
  • workflowengine: 1.3.0
    Disabled:
  • files_external
  • richdocuments
  • user_external
  • user_ldap

Nextcloud configuration:

Config report

{
"system": {
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"nextcloud.bokhorst.info",
"owncloud.bokhorst.info"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"overwrite.cli.url": "http://nextcloud.bokhorst.info",
"dbtype": "mysql",
"version": "13.0.5.2",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"memcache.local": "\OC\Memcache\APCu",
"memcache.locking": "\OC\Memcache\Redis",
"filelocking.enabled": "true",
"redis": {
"host": "REMOVED SENSITIVE VALUE",
"port": 0,
"timeout": 0
},
"mail_smtpmode": "php",
"mail_smtpauthtype": "LOGIN",
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_smtpauth": 1,
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "587",
"mail_smtpname": "REMOVED SENSITIVE VALUE",
"mail_smtppassword": "REMOVED SENSITIVE VALUE",
"maintenance": false,
"theme": "",
"log_type": "owncloud",
"logfile": "/var/log/nextcloud.log",
"loglevel": "0",
"log_rotate_size": "104857600",
"updater.release.channel": "stable",
"updater.secret": "REMOVED SENSITIVE VALUE"
}
}

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no
Yes I am using encryption
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
Not using LDAP or any other external user-backend.

Client configuration

Browser:
Firefox
Operating system:
Windows

Logs

Web server error log

Web server error log Apache error log doesn't give any other information.

Nextcloud log (data/nextcloud.log)

Nextcloud log

{"reqId":"q3k7VPXOh3w7HVxbE6TF","level":3,"time":"2018-08-22T20:20:36+00:00","remoteAddr":"xx.xx.xx.xx","user":"User-test","app":"index","method":"GET","url":"/index.php/settings/user","message":"Exception: {"Exception":"TypeError","Message":"Argument 1 passed to OC\\Accounts\\AccountManager::addMissingDefaultValues() must be of the type array, null given, called in \/var\/www\/nextcloud\/lib\/private\/Accounts\/AccountManager.php on line 155","Code":0,"Trace":"#0 \/var\/www\/nextcloud\/lib\/private\/Accounts\/AccountManager.php(155): OC\\Accounts\\AccountManager->addMissingDefaultValues(NULL)\n#1 \/var\/www\/nextcloud\/lib\/private\/Settings\/Personal\/PersonalInfo.php(104): OC\\Accounts\\AccountManager->getUser(Object(OC\\User\\User))\n#2 \/var\/www\/nextcloud\/settings\/Controller\/CommonSettingsTrait.php(115): OC\\Settings\\Personal\\PersonalInfo->getForm()\n#3 \/var\/www\/nextcloud\/settings\/Controller\/PersonalSettingsController.php(67): OC\\Settings\\Controller\\PersonalSettingsController->formatSettings(Array)\n#4 \/var\/www\/nextcloud\/settings\/Controller\/CommonSettingsTrait.php(126): OC\\Settings\\Controller\\PersonalSettingsController->getSettings('personal-info')\n#5 \/var\/www\/nextcloud\/settings\/Controller\/PersonalSettingsController.php(57): OC\\Settings\\Controller\\PersonalSettingsController->getIndexResponse('personal', 'personal-info')\n#6 [internal function]: OC\\Settings\\Controller\\PersonalSettingsController->index('personal-info')\n#7 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(161): call_user_func_array(Array, Array)\n#8 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(91): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OC\\Settings\\Controller\\PersonalSettingsController), 'index')\n#9 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/App.php(115): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OC\\Settings\\Controller\\PersonalSettingsController), 'index')\n#10 \/var\/www\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php(47): OC\\AppFramework\\App::main('OC\\\\Settings\\\\Con...', 'index', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#11 [internal function]: OC\\AppFramework\\Routing\\RouteActionHandler->__invoke(Array)\n#12 \/var\/www\/nextcloud\/lib\/private\/Route\/Router.php(297): call_user_func(Object(OC\\AppFramework\\Routing\\RouteActionHandler), Array)\n#13 \/var\/www\/nextcloud\/lib\/base.php(999): OC\\Route\\Router->match('\/settings\/user')\n#14 \/var\/www\/nextcloud\/index.php(42): OC::handleRequest()\n#15 {main}","File":"\/var\/www\/nextcloud\/lib\/private\/Accounts\/AccountManager.php","Line":192}","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0","version":"13.0.5.2"}

Browser log

Browser log The browser also doesn't give any other error
@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #2568 (user can't change language in personal settings), #2743 (Personal Settings - User cannot change language. Missing file.), #6078 (accounts table missing, can't view personal settings page), #2284 (Admins cannot change passwords anymore on Users page), and #6033 (Security-icon is not fitting on Personal-settings page).

@jookk
Copy link

jookk commented Aug 27, 2018

Maybe I have similar issue #10863 I cant open Apps because internal server error...

@pauleve
Copy link

pauleve commented Sep 26, 2018

I'm having the same issue with NC14

@pauleve
Copy link

pauleve commented Sep 26, 2018

Log say:

TypeError: Argument 1 passed to OC\\Accounts\\AccountManager::addMissingDefaultValues() must be of the type array, null given, called in /var/www/localhost/htdocs/nextcloud/lib/private/Accounts/AccountManager.php on line 156 at /var/www/localhost/htdocs/nextcloud/lib/private/Accounts/AccountManager.php#193

@lshv
Copy link

lshv commented Oct 18, 2018

I have a similar issue after upgrading from 12 to 13 - when I click on Settings (with debug enabled) receive:
Internal Server Error
The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log.
Technical details
Remote Address: 192.168.111.103
Request ID: btnb7jEnIOPKhP1nHdqK
Type: TypeError
Code: 0
Message: Argument 1 passed to OC\Accounts\AccountManager::addMissingDefaultValues() must be of the type array, null given, called in /var/www/nextcloud/lib/private/Accounts/AccountManager.php on line 155
File: /var/www/nextcloud/lib/private/Accounts/AccountManager.php
Line: 192

Trace
#0 /var/www/nextcloud/lib/private/Accounts/AccountManager.php(155): OC\Accounts\AccountManager->addMissingDefaultValues(NULL)
#1 /var/www/nextcloud/lib/private/Settings/Personal/PersonalInfo.php(104): OC\Accounts\AccountManager->getUser(Object(OC\User\User))
#2 /var/www/nextcloud/settings/Controller/CommonSettingsTrait.php(115): OC\Settings\Personal\PersonalInfo->getForm()
#3 /var/www/nextcloud/settings/Controller/PersonalSettingsController.php(67): OC\Settings\Controller\PersonalSettingsController->formatSettings(Array)
#4 /var/www/nextcloud/settings/Controller/CommonSettingsTrait.php(126): OC\Settings\Controller\PersonalSettingsController->getSettings('personal-info')
#5 /var/www/nextcloud/settings/Controller/PersonalSettingsController.php(57): OC\Settings\Controller\PersonalSettingsController->getIndexResponse('personal', 'personal-info')
#6 [internal function]: OC\Settings\Controller\PersonalSettingsController->index('personal-info')
#7 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(161): call_user_func_array(Array, Array)
#8 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(91): OC\AppFramework\Http\Dispatcher->executeController(Object(OC\Settings\Controller\PersonalSettingsController), 'index')
#9 /var/www/nextcloud/lib/private/AppFramework/App.php(115): OC\AppFramework\Http\Dispatcher->dispatch(Object(OC\Settings\Controller\PersonalSettingsController), 'index')
#10 /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php(47): OC\AppFramework\App::main('OC\Settings\Con...', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#11 [internal function]: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
#12 /var/www/nextcloud/lib/private/Route/Router.php(297): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
#13 /var/www/nextcloud/lib/base.php(999): OC\Route\Router->match('/settings/user')
#14 /var/www/nextcloud/index.php(42): OC::handleRequest()
#15 {main}

@164165
Copy link

164165 commented Oct 22, 2018

I had the same problem, Check if the field 'data' is a valid JSON for each row in the table (oc_accounts). If you have mariaDB 10.x run:

select uid, JSON_VALID(data) from oc_accounts ;

Good luck

@JMBokhorst
Copy link
Author

JMBokhorst commented Dec 2, 2018

Currently running the latest version of Nextcloud: 14.0.4 but still I have the same error. Currently it got a little bit worse because one user cannot login via de android app anymore.

I have fixed the invalid JSON, howerever I still have this issue. When I open oc_accounts I get a lot off errors ( a lot of values are NULL, see below). Not sure how to fix those errors, is there a way to repair the database?

Warning in ./libraries/sql.lib.php#613
 count(): Parameter must be an array or an object that implements Countable

Backtrace

./libraries/sql.lib.php#2128: PMA_isRememberSortingOrder(array)
./libraries/sql.lib.php#2079: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'nextcloud',
string 'oc_accounts',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `oc_accounts`',
NULL,
NULL,
)
./sql.php#221: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'nextcloud',
string 'oc_accounts',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `oc_accounts`',
NULL,
NULL,
)

@164165
Copy link

164165 commented Dec 2, 2018

Hi
The SQl command I gave does not repair anything, it just shows rows with invalid JSON in "data" field .
If yo want to repair this table manually, see below (I use postgresql, but MariaDB is no different):

oc_accounts table structure:

` Table "public.oc_accounts"
Column | Type | Modifiers | Storage | Stats target | Description
--------+-----------------------+----------------------------------------+----------+--------------+-------------
uid | character varying(64) | not null default ''::character varying | extended | |
data | text | not null default ''::text | extended | |
Indexes:
"oc_accounts_pkey" PRIMARY KEY, btree (uid)
Has OIDs: no

Sample row:

uid:
johndoe

data:
{
"displayname":{
"value":"John Doe",
"scope":"contacts",
"verified":"0"
},
"address":{
"value":"",
"scope":"private",
"verified":"0"
},
"website":{
"value":"",
"scope":"private",
"verified":"0"
},
"email":{
"value":"[email protected]",
"scope":"contacts",
"verified":"0"
},
"avatar":{
"scope":"contacts"
},
"phone":{
"value":"",
"scope":"private",
"verified":"0"
},
"twitter":{
"value":"",
"scope":"private",
"verified":"0"
}
}
`

@JMBokhorst
Copy link
Author

JMBokhorst commented Dec 2, 2018

I know, I already manually fixed the table, there are only a couple of users, so I have manually checked all values of the database and they are all set. The command returns that all JSON files are valid. However I still get the error I mentioned.

Sorry that error was related to some other issue with phpmyadmin:
https://stackoverflow.com/questions/48001569/phpmyadmin-count-parameter-must-be-an-array-or-an-object-that-implements-co

Don't have any errors now anymore. I'll do some testing with the user see if it's fixed, thanks!

@JMBokhorst
Copy link
Author

Problem is indeed solved. Issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants