SQL Issue with Talk : "Table 'nextcloud.oc_talk_participants' doesn't exist"

After an update, I was unable to connect to my nextcloud. After investigating for 2 days I found out that this is the Talk app which is broken. When I desactivate it, I can connect again.

Nextcloud version :
Talk version : 10.0.6
Distribution : nextcloudpi
SQL database server : mariadb

Here’s the logs (from nextcloud>settings>admin>logging ) :

[index] Error: Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT `r`.*, `p`.* FROM `oc_talk_rooms` `r` LEFT JOIN `oc_talk_participants` `p` ON (`p`.`user_id` = ?) AND (`p`.`room_id` = `r`.`id`) WHERE `p`.`user_id` IS NOT NULL' with params ["ncp"]:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_talk_participants' doesn't exist at <<closure>>

 0. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 169
    Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exception oc ... t", Doctrine\DBAL\Dr ... ]})
 1. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 149
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... t")
 2. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 914
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "SELECT `r`.*, ` ... L", {1: "ncp"})
 3. /var/www/nextcloud/lib/private/DB/Connection.php line 202
    Doctrine\DBAL\Connection->executeQuery("SELECT `r`.*, ` ... L", ["ncp"], [2], null)
 4. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 206
    OC\DB\Connection->executeQuery("SELECT `r`.*, ` ... L", {dcValue1: "ncp"}, {dcValue1: 2})
 5. /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php line 217
 6. /var/www/nextcloud/apps/spreed/lib/Manager.php line 294
 7. /var/www/nextcloud/apps/spreed/lib/Share/RoomShareProvider.php line 779
 8. /var/www/nextcloud/lib/private/Share20/Manager.php line 1332
    OCA\Talk\Share\RoomShareProvider->getSharedWith("ncp", 10, null, -1, 0)
 9. /var/www/nextcloud/apps/files_sharing/lib/MountProvider.php line 80
    OC\Share20\Manager->getSharedWith("ncp", 10, null, -1)
10. /var/www/nextcloud/lib/private/Files/Config/MountProviderCollection.php line 119
    OCA\Files_Sharing\MountProvider->getMountsForUser(OC\User\User {}, OC\Files\Storage\StorageFactory {})
11. /var/www/nextcloud/lib/private/Files/Filesystem.php line 452
    OC\Files\Config\MountProviderCollection->addMountForUser(OC\User\User {}, OC\Files\Mount\Manager {})
12. /var/www/nextcloud/lib/private/Files/Filesystem.php line 377
13. /var/www/nextcloud/lib/private/legacy/OC_Util.php line 322
    OC\Files\Filesystem::init("ncp", "/ncp/files")
14. /var/www/nextcloud/lib/base.php line 1007
15. /var/www/nextcloud/index.php line 37

GET /apps/theming/image/logo?useSvg=1&v=2
from by ncp at 2021-03-02T16:00:46+00:00

I have no such oc_talk_participants table. I have (almost) no knowledge of mysql/mariadb.

So far I tried to uninstall/reinstall Talk but I got the same error.
I also tried to manually delete every entry of occ config:app:delete spreed ENTRY before reinstalling without success.

Of course I checked this and all the github issues linked in this post. But I didn’t find the solution there (I can’t install a new nexctloud instance).

I tried to know how to completely remove the talk app to proceed to a clean install but I din’t find the information.

I hope somebody can help :slightly_smiling_face:

note : I created a new post about the same issue I was facing because I first went to a bad direction (thinking it was a php-redis issue). Sorry about this but it will be more clear like this.

I have exactly the same problem as you, and have tried the same. solution so far is to disable the spreed app.

After upgrading from 20.0.7 to the log file was filled with this:
|Warning|Temporary directory /var/www/nextcloud/data/tmp is not present or writable.

That’s fine, because I do not have the tmp folder located there. My data is located in another place, where the tmp folder is.
Had to change /var/www/nextcloud/config/config.php and /etc/php/7.3/fpm/php.ini
upload_tmp_dir =

Why did this happen, after the upgrade to I have not changed anything and the server has worked excellently since 2018.

Good to have the search function of this forum, which provides fast access to already answered questions :wink:

Have read “SQL Issues with Talk / Spread App” and the solution to our problem is?

Thank you @j-ed but as I said in my post, I already found out this ticket (and many more on github) but needed help to know the exact procedure to solve the problem. I have no knowledge in mysql so I needed to be guided a bit.

Luckily I met great people who helped me with this, I wouldn’t be able to do it by myself.

So here’s the procedure to recreate the missing SQL table (for noobs like me):

As root, write the following commands :

occ app:install spreed
occ app:enable spreed
mysql nextcloud <<'EOF'
CREATE TABLE `oc_talk_participants` (
  `user_id` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `room_id` int(10) unsigned NOT NULL DEFAULT 0,
  `last_ping` int(10) unsigned NOT NULL DEFAULT 0,
  `session_id` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '0',
  `participant_type` smallint(5) unsigned NOT NULL DEFAULT 0,
  `favorite` tinyint(1) NOT NULL DEFAULT 0,
  `in_call` int(11) NOT NULL DEFAULT 0,
  `notification_level` int(11) DEFAULT 0,
  `last_joined_call` datetime DEFAULT NULL,
  `last_read_message` bigint(20) DEFAULT 0,
  `last_mention_message` bigint(20) DEFAULT 0,
  UNIQUE KEY `tp_ident` (`room_id`,`user_id`,`session_id`),
  KEY `tp_room` (`room_id`),
  KEY `tp_last_ping` (`last_ping`),
  KEY `tp_in_call` (`in_call`),
  KEY `tp_uid` (`user_id`),
  KEY `tp_session_id` (`session_id`)

(you may have to replace the occ command by something like php /var/www/nextcloud/occ)

If it doesn’t work you can disable the talk app with occ app:disable spreed.

1 Like

thank you! I dont know but i had version 10.1.2 and its no longer available now it just shows 10.0.6 im not sure what nextcloud is doing but today i update from Nextcloud 20.0.8 to 20.0.9 and nothing but errors.