User list "everyone" empty

Hello everyone,

I am running a fresh Nextcloud 14.0.4 install on a shared hosting server (automatic installation through my webhoster).
I imported the database from a nextcloud installation (updated to 14.0.4) on another server and copied the data directory.

Everything seems to work fine, except for the users list.
“Everyone” can’t be displayed, all other user groups are listed as expected (I am logged in as admin).
When I click on “Everyone” (which has the correct number of users displayed next to it in the side bar), it says “No user available” and I get an error message on the top “There has been an error with your request. It can’t be continued” (rough translation from German “Es ist ein Fehler bei der Anfrage aufgetreten. Es kann nicht fortgefahren werden.”)

While this error message is not exactly specific, maybe someone here has encountered (and solved?) something similar or can point me in the right direction?

As I said, I am using a webhoster, I have access via FTP and phpMyAdmin.

Many thanks in advance for your help!
Per
Hamburg, Germany

No idea so far, but could you check if there is something in the logs (nextcloud, webserver, …) which might help to find the root cause?
Additionally, you could check the browser debug console.

Oh, thanks for the hint. I found out two things (I can’t yet make any sense of myself, though):

In the Nextloud log:

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'SELECT `uid`, `displayname` FROM `oc_users` `u` LEFT JOIN `oc_preferences` `p` ON (`userid` = `uid`) AND (`appid` = 'settings') AND (`configkey` = 'email') WHERE (`uid` COLLATE utf8mb4_general_ci LIKE ?) OR (`displayname` COLLATE utf8mb4_general_ci LIKE ?) OR (`configvalue` COLLATE utf8mb4_general_ci LIKE ?) ORDER BY `uid_lower` ASC LIMIT 25 OFFSET 0' with params ["%%", "%%", "%%"]: SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8mb4_general_ci' is not valid for CHARACTER SET 'utf8'

In the browser console:

GET https://domain.tld/ocs/v2.php/cloud/users/details?offset=0&limit=25&search= 404 (Not Found)

When I try to open that URL in the browser, I get a message “Access denied. CSRF check failed”.
That file has the access permissions 644.

Is there something you can make sense of?
Many thanks for your help!

This seems to be the root cause. I don’t understand that collation stuff myself (don’t know to much about databases), but I read something about that in the forum and in the admin guide.
If I’m not mistaken, your old database (and therefor your DB backup) was created/ setup with utf8mb4, but the new database uses UTF8 only. So the database requires some configuration changes I guess.

The admin guide doesn’t load/ open right now, so I searched the forum. What I found is the following, but stop doing anything unless you are absolutely sure what you are doing:

My suggestion is: find out your DB configuration regarding “utf8” and “utf8mb4…” to be sure which of both applies to your backed up database and which to your current database. From there we figure what which way of conversion is the best. And maybe someone else in the forum has more expertise in databases than me and can advise what to do exactly :slight_smile:

Oh, thanks for your help.
In phpMyAdmin, there are 71 tables with collation “utf8_bin” and 26 tables with “utf8mb4_bin”.

I think I will try the following:

  1. copy the contents of the database to another database on a server by the same webhoster, so I will still have a database should this not work.
  2. Run the command
ALTER TABLE
    `oc_users`
    CONVERT TO CHARACTER SET utf8mb4
    COLLATE utf8mb4_unicode_ci;

That would convert all entries to utf8mb4_general_ci, so all content should match with the assigned character set, did I understand that part correctly?

If everything goes as planned, I perform the same operation on the running system.
Does that make sense?

Sounds good to me.

That did not have any apparent effect.

But changing the collation for all tables under
phpMyAdmin -> Operations -> Collation -> “uft8mb4_unicode_ci” -> Change all collum collations
(ineptly translated from German interface) did.

Now it appears to work as expected, neither the Nextcloud log nor the browser console throws an error.

Thanks for giving the helpful hint and hanging in with me. :slight_smile:

1 Like

Awesome, you did it!
Glad it’s working now.

Dear perdittmann, I have the same problem like you.
Unfortunately I have no idea how to change these settings.
My nextcloud is installed on an Ubuntu 18.04 server who’s based in VMware
I’m using the apache2 webserver.
Can you tell me how to access the settings “side”?

I am not sure what you mean – and after months, I don’t exactly remember what the issue even was. But I will try to help you.

What I changed back then, can be found in phpMyAdmin, under “Operations”. Are you still with me? :slight_smile: Then we can progress with the next step.

So I need to install phpmyadmin first to got under the “options” categorie right?
Currently I have only installed apache2 and MariaDB and nothing else for php.

So, phpmyadmin is installed now, and I really found the operations tab, but, it sounds a little bit other than you said.
05-09-_2019_18-47-12

Also it gave me the this error message, when I select “change all tables columns collations”
05-09-_2019_18-47-23

ALTER Table 'oc_activity' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_gerneral_ci

Any idea? I’m absolute nextcloud an Linux newbie sorry…

The failure code ist here: https://pastebin.com/7H3BUbrJ

And I have no idea what to do with this… :smiley:

Hey,
sorry to see that didn’t work out for you. I am beyond newbie when it comes to Linux, I run Nextcloud on a hosted webserver …

You did this for the table “oc_activity” – maybe try “oc_users” instead (if you have the same problem I had – no users displayed).
But I am already a bit out of my depth here myself. So take all this with a grain of salt …

Hey together,

Thanks for sharing @perdittmann!
For me the error was connected to the wrong collation as well and the fix worked.

Following this guide on enabling MySQL 4-bit support helped me a lot!
@UltraFancy it might help you to.
https://docs.nextcloud.com/server/18/admin_manual/configuration_database/mysql_4byte_support.html

2 Likes

This guide on enabling MySQL 4-bit support helps me too. On a fresh installed Nextcloud 18 with apache2 and MariaDB on Ubuntu 18.04 LTS, I had the same problem with empty userlist and it is working now! :wink:

1 Like