spreed icon indicating copy to clipboard operation
spreed copied to clipboard

Doctrine DriverExceptions after upgrading to NC 20

Open doobry-systemli opened this issue 6 years ago • 20 comments

After upgrading to NC 20 (and the latest NC Spreed/Talk app version), we keep getting Exceptions of type Doctrine\DBAL\Exception\DriverException due to broken SQL INSERT statements triggered by apps/spreed/lib/Chat/Changelog/Manager.php trying to submit the emoji support message:

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\\\\xF0\\\\x9F\\\\x98\\\\x8D' for column `nextcloud`.`comments`.`message` at row 1

There's several strange things to notice:

  • It seems pretty obvious that the two hex-escaped bytes representing the emoji cause the problem. Still, manually INSERTing a string with the very same emoji via MariaDB console works without problems. So I'm pretty sure that it's not the database charset/collation settings, that are wrong.
  • Table structure of the comments table is exactly the same as on a fresh Nextcloud installation, so I'm sure that it's correct.
  • "Invalid datetime format" sounds like it's about a wrong value to the comments.creation_timestamp field, but the error message is clear that it's about a wrong value to comments.message.
  • occ migrations:status spreed shows 8000Date20200407115318 as current version. Even after manually running migration steps 10000Date20200819121721 and 11000Date20200922161218, it stays that way.

My current assumption is that the emoji bytes are escaped in a wrong way in the doctrine insert statement, but I don't have clue why this should happen and why others don't run into the same problem :thinking:

Talk app

Talk app version: 10.0.1

Server configuration

Operating system: Debian Buster

Web server: Apache

Database: MariaDB 10.3.25-0+deb10u1

PHP version: 7.3

Nextcloud Version: 20.0.1

List of activated apps:

``` [...] comments [...] spreed [...] ```

Server log (data/nextcloud.log)

``` Oct 24 23:37:38 cloud1 NextCloud[18066]: {"reqId":"dgK9P4glNdHQTby3PrAl","level":3,"time":"2020-10-24 21:37:38.021900","remoteAddr":"0.0.0.0","user":"alice","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/spreed/api/v2/room","message":"{\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'INSERT INTO `comments` (`parent_id`, `topmost_parent_id`, `children_count`, `actor_type`, `actor_id`, `message`, `verb`, `creation_timestamp`, `latest_child_timestamp`, `object_type`, `object_id`, `reference_id`) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [\\\"0\\\", \\\"0\\\", 0, \\\"guests\\\", \\\"changelog\\\", \\\"- Spice up your messages with emojis from the emoji picker \\\\ud83d\\\\ude0d\\\", \\\"comment\\\", \\\"2020-10-24 21:37:38\\\", null, \\\"chat\\\", \\\"380\\\", null]:\\n\\nSQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\\\\xF0\\\\x9F\\\\x98\\\\x8D' for column `nextcloud`.`comments`.`message` at row 1\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/cloud.exampl.org/nextcloud-20.0.1/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php\",\"line\":169,\"function\":\"convertException\",\"class\":\"Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver\",\"type\":\"->\",\"args\":[\"An exception occurred while executing 'INSERT INTO `comments` (`parent_id`, `topmost_parent_id`, `children_count`, `actor_type`, `actor_id`, `message`, `verb`, `creation_timestamp`, `latest_child_timestamp`, `object_type`, `object_id`, `reference_id`) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [\\\"0\\\", \\\"0\\\", 0, \\\"guests\\\", \\\"changelog\\\", \\\"- Spice up your messages with emojis from the emoji picker \\\\ud83d\\\\ude0d\\\", \\\"comment\\\", \\\"2020-10-24 21:37:38\\\", null, \\\"chat\\\", \\\"380\\\", null]:\\n\\nSQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\\\\xF0\\\\x9F\\\\x98\\\\x8D' for column `nextcloud`.`comments`.`message` at row 1\",{\"errorInfo\":[\"22007\",1366,\"Incorrect string value: '\\\\xF0\\\\x9F\\\\x98\\\\x8D' for column `nextcloud`.`comments`.`message` at row 1\"],\"__class__\":\"Doctrine\\\\DBAL\\\\Driver\\\\PDOException\"}]},{\"file\":\"/var/www/cloud.exampl.org/nextcloud-20.0.1/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php\",\"line\":149,\"function\":\"wrapException\",\"class\":\"Doctrine\\\\DBAL\\\\DBALException\",\"type\":\"0:0:0:0:0:0:0:0\",\"args\":[{\"__class__\":\"Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver\"},{\"errorInfo\":[\"22007\",1366,\"Incorrect string value: '\\\\xF0\\\\x9F\\\\x98\\\\x8D' for column `nextcloud`.`comments`.`message` at row 1\"],\"__class__\":\"Doctrine\\\\DBAL\\\\Driver\\\\PDOException\"},\"An exception occurred while executing 'INSERT INTO `comments` (`parent_id`, `topmost_parent_id`, `children_count`, `actor_type`, `actor_id`, `message`, `verb`, `creation_timestamp`, `latest_child_timestamp`, `object_type`, `object_id`, `reference_id`) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params [\\\"0\\\", \\\"0\\\", 0, \\\"guests\\\", \\\"changelog\\\", \\\"- Spice up your messages with emojis from the emoji picker \\\\ud83d\\\\ude0d\\\", \\\"comment\\\", \\\"2020-10-24 21:37:38\\\", null, \\\"chat\\\", \\\"380\\\", null]:\\n\\nSQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\\\\xF0\\\\x9F\\\\x98\\\\x8D' for column `nextcloud`.`comments`.`message` at row 1\"]},{\"file\":\"/var/www/cloud.example.org/nextcloud-20.0.1/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php\",\"line\":1071,\"function\":\"driverExceptionDuringQuery\",\"class\":\"Doctrine\\\\DBAL\\\\DBALException\",\"type\":\"0:0:0:0:0:0:0:0\",\"args\":[{\"__class__\":\"Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver\"},{\"errorInfo\":[\"22007\",1366,\"Incorrect string value: '\\\\xF0\\\\x9F\\\\x98\\\\x8D' for column `nextcloud`.`comments`.`message` at row 1\"],\"__class__\":\"Doctrine\\\\DBAL\\\\Driver\\\\PDOException\"},\"INSERT INTO `comments` (`parent_id`, `topmost_parent_id`, `children_count`, `actor_type`, `actor_id`, `message`, `verb`, `creation_timestamp`, `latest_child_timestamp`, `object_type`, `object_id`, `reference_id`) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\",{\"1\":\"0\",\"2\":\"0\",\"3\":0,\"4\":\"guests\",\"5\":\"changelog\",\"6\":\"- Spice up your messages with emojis from the emoji picker \\ud83d\\ude0d\",\"7\":\"comment\",\"8\":\"2020-10-24 21:37:38\",\"9\":null,\"10\":\"chat\",\"11\":\"380\",\"12\":null}]},{\"file\":\"/var/www/cloud.example.org/nextcloud-20.0.1/lib/private/DB/Connection.php\",\"line\":214,\"function\":\"executeUpdate\",\"class\":\"Doctrine\\\\DBAL\\\\Connection\",\"type\":\"->\",\"args\":[\"INSERT INTO `comments` (`parent_id`, `topmost_parent_id`, `children_count`, `actor_type`, `actor_id`, `message`, `verb`, `creation_timestamp`, `latest_child_timestamp`, `object_type`, `object_id`, `reference_id`) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\",[\"0\",\"0\",0,\"guests\",\"changelog\",\"- Spice up your messages with emojis from the emoji picker \\ud83d\\ude0d\",\"comment\",{\"date\":\"2020-10-24 21:37:38.020662\",\"timezone_type\":3,\"timezone\":\"UTC\",\"__class__\":\"DateTime\"},null,\"chat\",\"380\",null],[2,2,2,2,2,2,2,\"datetime\",\"datetime\",2,2,2]]},{\"file\":\"/var/www/cloud.example.org/nextcloud-20.0.1/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php\",\"line\":209,\"function\":\"executeUpdate\",\"class\":\"OC\\\\DB\\\\Connection\",\"type\":\"->\",\"args\":[\"INSERT INTO `comments` (`parent_id`, `topmost_parent_id`, `children_count`, `actor_type`, `actor_id`, `message`, `verb`, `creation_timestamp`, `latest_child_timestamp`, `object_type`, `object_id`, `reference_id`) VALUES(:dcValue1, :dcValue2, :dcValue3, :dcValue4, :dcValue5, :dcValue6, :dcValue7, :dcValue8, :dcValue9, :dcValue10, :dcValue11, :dcValue12)\",{\"dcValue1\":\"0\",\"dcValue2\":\"0\",\"dcValue3\":0,\"dcValue4\":\"guests\",\"dcValue5\":\"changelog\",\"dcValue6\":\"- Spice up your messages with emojis from the emoji picker \\ud83d\\ude0d\",\"dcValue7\":\"comment\",\"dcValue8\":{\"date\":\"2020-10-24 21:37:38.020662\",\"timezone_type\":3,\"timezone\":\"UTC\",\"__class__\":\"DateTime\"},\"dcValue9\":null,\"dcValue10\":\"chat\",\"dcValue11\":\"380\",\"dcValue12\":null},{\"dcValue1\":2,\"dcValue2\":2,\"dcValue3\":2,\"dcValue4\":2,\"dcValue5\":2,\"dcValue6\":2,\"dcValue7\":2,\"dcValue8\":\"datetime\",\"dcValue9\":\"datetime\",\"dcValue10\":2,\"dcValue11\":2,\"dcValue12\":2}]},{\"file\":\"/var/www/cloud.example.org/nextcloud-20.0.1/lib/private/DB/QueryBuilder/QueryBuilder.php\",\"line\":217,\"function\":\"execute\",\"class\":\"Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder\",\"type\":\"->\",\"args\":[]},{\"file\":\"/var/www/cloud.example.org/nextcloud-20.0.1/lib/private/Comments/Manager.php\",\"line\":786,\"function\":\"execute\",\"class\":\"OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder\",\"type\":\"->\",\"args\":[]},{\"file\":\"/var/www/cloud.example.org/nextcloud-20.0.1/lib/private/Comments/Manager.php\",\"line\":749,\"function\":\"insertQuery\",\"class\":\"OC\\\\Comments\\\\Manager\",\"type\":\"->\",\"args\":[{\"__class__\":\"OC\\\\Comments\\\\Comment\"},true]},{\"file\":\"/var/www/cloud.example.org/nextcloud-20.0.1/lib/private/Comments/Manager.php\",\"line\":725,\"function\":\"insert\",\"class\":\"OC\\\\Comments\\\\Manager\",\"type\":\"->\",\"args\":[{\"__class__\":\"OC\\\\Comments\\\\Comment\"}]},{\"file\":\"/var/www/cloud.example.org/nextcloud-20.0.1/apps/spreed/lib/Chat/ChatManager.php\",\"line\":151,\"function\":\"save\",\"class\":\"OC\\\\Comments\\\\Manager\",\"type\":\"->\",\"args\":[{\"__class__\":\"OC\\\\Comments\\\\Comment\"}]},{\"file\":\"/var/www/cloud.example.org/nextcloud-20.0.1/apps/spreed/lib/Chat/Changelog/Manager.php\",\"line\":80,\"function\":\"addChangelogMessage\",\"class\":\"OCA\\\\Talk\\\\Chat\\\\ChatManager\",\"type\":\"->\",\"args\":[{\"__class__\":\"OCA\\\\Talk\\\\Room\"},\"- Spice up your messages with emojis from the emoji picker \\ud83d\\ude0d\"]},{\"file\":\"/var/www/cloud.example.org/nextcloud-20.0.1/apps/spreed ```

doobry-systemli avatar Oct 24 '20 22:10 doobry-systemli

also seen in the server logs here https://github.com/nextcloud/spreed/issues/4462

PVince81 avatar Oct 26 '20 08:10 PVince81

@doobry-systemli did you upgrade from NC 20.0.0 and Talk 10.0.0 or did you have earlier versions ? Just to find out whether emojis were working correctly before your upgrade

PVince81 avatar Oct 26 '20 08:10 PVince81

@PVince81 The last upgrade was from NC 20.0.0, where the problem started arising. But I could imagine that the problem existed beforehands, we just didn't notice. We enabled 4-byte support in the database some time back (probably something like a year ago) but to be honest I'm not 100% certain that writing emojis (or whatever multibyte characters) from Nextcloud to the database worked anywhere in the past.

doobry-systemli avatar Oct 26 '20 08:10 doobry-systemli

I double-checked everything from the docs about Enabling MySQL 4-byte support. Also, as written above, writing multibyte characters directly to the database (from mysql console) works:

INSERT INTO `comments` (`parent_id`, `topmost_parent_id`, `children_count`, `actor_type`, `actor_id`, `message`, `verb`, `creation_timestamp`, `latest_child_timestamp`, `object_type`, `object_id`, `reference_id`) VALUES(0, 0, 0, "guests", "changelog", "a string with multibyte character emoji: 😍", "comment", NOW(), NULL, "chat", 195, NULL);

That's why I asume that not the database itself is the problem but instead the way how Nextcloud (respectively Doctrine) escapes the multibyte characters in the INSERT statement is somehow broken (on our setup).

doobry-systemli avatar Oct 26 '20 08:10 doobry-systemli

I just tested and even trying to add a comment with 😍 to a file triggers the same error, while adding ❤️ (which isn't multi-byte) works. So it's definitely about writing multi-byte emojis to the database. Still INSERTing them directly (as written in the last comment) works as expected.

doobry-systemli avatar Oct 26 '20 09:10 doobry-systemli

The code in question is here for the changelog: https://github.com/nextcloud/spreed/blob/master/lib/Chat/Changelog/Manager.php#L88

Strangely it is already checking if the connection supports mb4, and skips that message if it doesn't. Not sure why the CLI one works.

As far as I remember, MariaDB 10.3 supports mb4 by default since 10.3.1

PVince81 avatar Oct 26 '20 09:10 PVince81

It seems the check only verifies if the charset was set on the connection: https://github.com/nextcloud/server/blob/v20.0.0/lib/private/DB/Connection.php#L427

Not sure if this guarantees that support is there. There's another function that can check it, you could try with the following patch:

diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php
index 24b241b78f..ad7bebff3d 100644
--- a/lib/private/DB/Connection.php
+++ b/lib/private/DB/Connection.php
@@ -453,7 +453,15 @@ class Connection extends ReconnectWrapper implements IDBConnection {
                if (!$this->getDatabasePlatform() instanceof MySqlPlatform) {
                        return true;
                }
-               return $this->getParams()['charset'] === 'utf8mb4';
+               if ($this->getParams()['charset'] !== 'utf8mb4') {
+                       return false;
+               }
+
+               $tools = new MySqlTools();
+               if ($tools->supports4ByteCharset($this)) {
+                       return true;
+               }
+               return false;
        }

note: I don't have an environment to reproduce the issue so I can only guess, the above patch might reveal more information ^

if Talk starts working again but without emojis (check the changelog talk conversation to see if it contains an emoji), it means the DB setup itself has some issues. if Talk doesn't work at all, it means mb4 detection is giving false positives and/or DB setup has issues...

so not sure, we'll see...

PVince81 avatar Nov 03 '20 13:11 PVince81

Temporary solution otherwise is to delete the following code: https://github.com/nextcloud/spreed/blob/2c1c050ac29ee10068fc9f181db8dbc904f678fe/lib/Chat/Changelog/Manager.php#L88-L94

nickvergessen avatar Nov 03 '20 18:11 nickvergessen

Thanks, I finally found the issue: it indeed was a missconfiguation of MariaDB. Due to some mistake, character_set_server was set to utf8 (instead of utf8_mb4) and collation_server was set to utf8_general_ci (instead of utf8mb4_general_ci).

So this indeed was a configuration mistake on our side. Big sorry for the noise and many thanks for the debugging hints :heart:

doobry-systemli avatar Nov 03 '20 21:11 doobry-systemli

Can @AisukoWasTaken and @htttito confirm that misconfiguration?

nickvergessen avatar Nov 03 '20 21:11 nickvergessen

Hi, sorry i can not confirm.

  • MYSQL is set to utf8_mb4....
  • I have delete the code without any result...
  • There is always the same error:

`

Error no app in context Exception: Object of class DateTime could not be converted to string/var/www/html/nextcloud/lib/private/AppFramework/App.php - line 157: OC\AppFramework\Http\Dispatcher->dispatch()/var/www/html/nextcloud/lib/private/Route/Router.php - line 308: OC\AppFramework\App::main()/var/www/html/nextcloud/ocs/v1.php - line 88: OC\Route\Router->match()/var/www/html/nextcloud/ocs/v2.php - line 24: require_once("/var/www/ht ... p")Verursacht durchError: Object of class DateTime could not be converted to string/var/www/html/nextcloud/lib/private/Comments/Manager.php - line 786: OC\DB\QueryBuilder\QueryBuilder->execute()/var/www/html/nextcloud/lib/private/Comments/Manager.php - line 749: OC\Comments\Manager->insertQuery()/var/www/html/nextcloud/lib/private/Comments/Manager.php - line 725: OC\Comments\Manager->insert()/var/www/html/nextcloud/apps/spreed/lib/Chat/ChatManager.php - line 117: OC\Comments\Manager->save()/var/www/html/nextcloud/apps/spreed/lib/Chat/SystemMessage/Listener.php - line 282: OCA\Talk\Chat\ChatManager->addSystemMessage()/var/www/html/nextcloud/apps/spreed/lib/Chat/SystemMessage/Listener.php - line 103: OCA\Talk\Chat\SystemMessage\Listener->sendSystemMessage()/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 251: OCA\Talk\Chat\SystemMessage\Listener::OCA\Talk\Chat\SystemMessage{closure}("*** sensiti ... ")/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 73: Symfony\Component\EventDispatcher\EventDispatcher->callListeners()/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php - line 86: Symfony\Component\EventDispatcher\EventDispatcher->dispatch()/var/www/html/nextcloud/apps/spreed/lib/Manager.php - line 664: OC\EventDispatcher\EventDispatcher->dispatch()/var/www/html/nextcloud/apps/spreed/lib/Manager.php - line 616: OCA\Talk\Manager->createRoom()/var/www/html/nextcloud/apps/spreed/lib/Chat/Changelog/Manager.php - line 71: OCA\Talk\Manager->getChangelogRoom()/var/www/html/nextcloud/apps/spreed/lib/Chat/Changelog/Listener.php - line 53: OCA\Talk\Chat\Changelog\Manager->updateChangelog("** sensiti ... ")/var/www/html/nextcloud/apps/spreed/lib/Chat/Changelog/Listener.php - line 37: OCA\Talk\Chat\Changelog\Listener->preGetRooms()/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 251: OCA\Talk\Chat\Changelog\Listener::OCA\Talk\Chat\Changelog{closure}("** sensiti ... *")/var/www/html/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php - line 73: Symfony\Component\EventDispatcher\EventDispatcher->callListeners()/var/www/html/nextcloud/lib/private/EventDispatcher/EventDispatcher.php - line 86: Symfony\Component\EventDispatcher\EventDispatcher->dispatch()/var/www/html/nextcloud/apps/spreed/lib/Controller/RoomController.php - line 164: OC\EventDispatcher\EventDispatcher->dispatch()/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 169: OCA\Talk\Controller\RoomController->getRooms()/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 100: OC\AppFramework\Http\Dispatcher->executeController()/var/www/html/nextcloud/lib/private/AppFramework/App.php - line 157: OC\AppFramework\Http\Dispatcher->dispatch()/var/www/html/nextcloud/lib/private/Route/Router.php - line 308: OC\AppFramework\App::main()/var/www/html/nextcloud/ocs/v1.php - line 88: OC\Route\Router->match()/var/www/html/nextcloud/ocs/v2.php - line 24: require_once("/var/www/ht ... p")
`

htttito avatar Nov 04 '20 08:11 htttito

Enclosed a picture of MYSQL configuration. Is there any mistake? Bildschirmfoto vom 2020-11-04 10-29-14

htttito avatar Nov 04 '20 09:11 htttito

Object of class DateTime could not be converted to string

Turn log_query off. The debug code to log queries does not know how to convert a datetime object to string.

kesselb avatar Nov 05 '20 09:11 kesselb

I turned logging of...... Still the same error

htttito avatar Nov 05 '20 09:11 htttito

In Talk, i can only choose the partner to speak or chat. I can write something in the chat, but when i hit "enter" nothing happens.... Bildschirmfoto vom 2020-11-05 10-46-05

htttito avatar Nov 05 '20 09:11 htttito

Hi Community :-)! It was my mistake, I mean log_query in mysql.... In nextcloud config.php I changed 'log_query' => false, and all works.... Thanks to all...

htttito avatar Nov 06 '20 06:11 htttito

I set log_query to false and I still get the same error :/

AisukoHakumei avatar Nov 11 '20 10:11 AisukoHakumei

@nickvergessen cannot confirm misconfiguration.

I have a fresh install, not an upgrade from a lower version of NC or Talk. Mariadb configured as utf8mb4, and so is the database. Setting 'log_query' to false in nextcloud's config.php has no effect.

Server version: 10.3.25-MariaDB-0+deb10u1 Debian 10
MariaDB [(none)]>  SHOW VARIABLES WHERE Variable_name LIKE 'character_set_%' OR Variable_name LIKE 'collation%';
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8mb4                    |
| character_set_connection | utf8mb4                    |
| character_set_database   | utf8mb4                    |
| character_set_filesystem | binary                     |
| character_set_results    | utf8mb4                    |
| character_set_server     | utf8mb4                    |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
| collation_connection     | utf8mb4_general_ci         |
| collation_database       | utf8mb4_general_ci         |
| collation_server         | utf8mb4_general_ci         |
+--------------------------+----------------------------+

Database changed
MariaDB [nextcloud]> SELECT @@character_set_database, @@collation_database;
+--------------------------+----------------------+
| @@character_set_database | @@collation_database |
+--------------------------+----------------------+
| utf8mb4                  | utf8mb4_general_ci   |
+--------------------------+----------------------+

Update: Conversations are not permanent, gone if I load talk again. I also cannot post emojis (endless loading circle)~~, and I cannot upload files (this might be a separate issue).~~

working-name avatar Nov 16 '20 15:11 working-name

That the Talk app does not work after an upgrade to NC20 is probably due to the wrong column formatting in oc_comments.reference_id. I had to add the column manually after an upgrade and looked for the right query here in the forum. Unfortunately, I can't find the entry anymore, it was definitely wrong. After a comparison with a fresh NC20 installation, in which the Talk app worked and the files were not different, the column was created incorrectly and the collation was e.g. not on utf8mb4_bin. After I changed the column correctly, Talk worked again. This does not fix the error with the log_query, but the error with the not starting Talk-App. Hope it helps!

ALTER TABLE oc_comments CHANGE reference_id reference_id VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL;

CUPredator avatar Dec 05 '20 23:12 CUPredator

Fixed with #4730

So will be solved with the next update.

nickvergessen avatar Dec 11 '20 07:12 nickvergessen