spreed icon indicating copy to clipboard operation
spreed copied to clipboard

Cannot enable Talk on Nextcloud 13 Beta 3

Open hukoeth opened this issue 8 years ago • 7 comments

Steps to reproduce

  1. Update to or install Nextcloud 13
  2. Download and enable the Talk app
  3. SQL error is thrown

Expected behaviour

App should be enabled.

Actual behaviour

Error is thrown: An exception occurred while executing 'UPDATE "oc_spreedme_room_participants" SET "participantType" = ? WHERE "roomId" IN (NULL)' with params [1]: SQLSTATE[42703]: Undefined column: 7 ERROR: column "roomId" does not exist LINE 1: ...om_participants" SET "participantType" = $1 WHERE "roomId" I... ^ HINT: Perhaps you meant to reference the column "oc_spreedme_room_participants.roomid".

Browser

Microphone available: n/a

Camera available: n/a

Operating system: n/a

Browser name: n/a

Browser version: n/a

Browser log

n/a

Spreed app

Spreed app version: 2.9.0

Custom TURN server configured: n/a

Custom STUN server configured: n/a

Server configuration

Operating system: Ubuntu (Linux 4.13.0-16-lowlatency #19-Ubuntu SMP PREEMPT Wed Oct 11 19:51:52 UTC 2017 x86_64)

Web server: Apache (apache2handler)

Database: pgsql PostgreSQL 9.6.6 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0, 64-bit

PHP version: 7.1.11-0ubuntu0.17.10.1 Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, apache2handler, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gnupg, iconv, igbinary, imagick, imap, intl, json, exif, mcrypt, msgpack, mysqli, pdo_mysql, pdo_pgsql, pgsql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, memcached, Zend OPcache

Nextcloud Version: 13.0.0 Beta 3 - 13.0.0.8

List of activated apps:

``` - bruteforcesettings: 1.0.3 - calendar: 1.5.7 - contacts: 2.0.1 - dav: 1.4.5 - federatedfilesharing: 1.3.1 - files: 1.8.0 - files_pdfviewer: 1.2.0 - 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 - issuetemplate: 0.3.0 - logreader: 2.0.0 - lookup_server_connector: 1.1.0 - nextcloud_announcements: 1.2.0 - notifications: 2.1.2 - oauth2: 1.1.0 - passman: 2.1.4 - password_policy: 1.3.0 - provisioning_api: 1.3.0 - sharebymail: 1.3.0 - shorten: 0.0.15 - theming: 1.4.1 - twofactor_backupcodes: 1.2.3 - twofactor_totp: 1.4.0 - updatenotification: 1.3.0 - workflowengine: 1.3.0 ```

Server log (data/nextcloud.log)

``` Insert your server log here
Error core An exception occurred while executing 'UPDATE "oc_spreedme_room_participants" SET "participantType" = ? WHERE "roomId" IN (NULL)' with params [1]: SQLSTATE[42703]: Undefined column: 7 ERROR: column "roomId" does not exist LINE 1: ...om_participants" SET "participantType" = $1 WHERE "roomId" I... ^ HINT: Perhaps you meant to reference the column "oc_spreedme_room_participants.roomid".
</details>

hukoeth avatar Dec 17 '17 09:12 hukoeth

Exact same behaviour here, with previously installed and active app, on postgresql too : An exception occurred while executing 'UPDATE "oc_spreedme_room_participants" SET "participantType" = ? WHERE "roomId" IN (NULL)' with params [1]: SQLSTATE[42703]: Undefined column: 7 ERROR: column "roomId" does not exist LINE 1: ...om_participants" SET "participantType" = $1 WHERE "roomId" I... ^

pierfu avatar Dec 17 '17 12:12 pierfu

I had the same problem as you but after renaming entries in Nextcloud DB in PostgreSQL ex. "roomid" to "roomId" there is a new error message. There were a few more entries with lowercase only but it seems to require the exact name with uppercase characters. Now I get this: An exception occurred while executing 'INSERT INTO "oc_talk_rooms" ("name", "token", "type", "password") VALUES(?, ?, ?, ?)' with params ["", "kvw7", 3, ""]: SQLSTATE[23505]: Unique violation: 7 ERROR: duplicate key value violates unique constraint "tr_room_token" DETAIL: Key (token)=(kvw7) already exists.

My DB was migrated from MariaDB to PostgreSQL in Nextcloud 12 before the upgrade to Nextcloud 13.

svankan avatar Dec 21 '17 14:12 svankan

I can confirm that renaming the columns fixes the issue. Since I never used Talk before and the installation creates some/all of these columns I still assume this is a bug?!

hukoeth avatar Dec 27 '17 07:12 hukoeth

I still assume this is a bug?!

Yes, it is ;-) Thanks for the information!

I can confirm trying to enable current master branch of Nextcloud Talk on current master branch of Nextcloud server with PostgreSQL; SQLite and MySQL do not seem affected.

@nickvergessen Any idea?

danxuliu avatar Dec 28 '17 13:12 danxuliu

I found a completely opposite but maybe related issue in DBAL: https://github.com/doctrine/dbal/issues/2710. What I take away from that is that perhaps only fully lowercase object names should be used for maximum compatibility.

jebrosen avatar Dec 28 '17 15:12 jebrosen

The actual issue is, that the oc_spreedme_* tables are not used anymore.

So it would be nice, if you can post the stack-traces of the errors. So we know in which files we have to look for the mistakes. Also WHERE "roomId" IN (NULL) looks very suspicious because it makes no sense to run this query at all ;)

nickvergessen avatar Jan 03 '18 10:01 nickvergessen

Okay, I found the 2 queries and fixed them in https://github.com/nextcloud/spreed/pull/537

nickvergessen avatar Jan 03 '18 10:01 nickvergessen