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

cannot install Phone Sync 1.12.7 in nextcloud 13.02 with mariaDB 10.1.29 #239

Closed
roydenyates opened this issue Jun 6, 2018 · 3 comments
Closed

Comments

@roydenyates
Copy link

Steps to reproduce

1.Try to install Phone Sync 1.12.7 using Nextcloud (v13.02) web interface.

Expected behaviour

Should install

Actual behaviour

Generates a DB related error and install fails

Server configuration

Nextcloud version: 13.02

PHP version: 7.0.30

HTTPd server: nginx 1.13.12

Database engine & version: MariaDB 10.1.29

Client configuration

Android version: irrelevant

Phone: n.a.

Nextcloud SMS app version: 1.12.7

I first saw this a while back with an update to Phone Sync. Effectively the same error, reflecting the update rather than install. This issue refers to that situation. I uninstalled Phone Sync as my time was limited and found this when I returned to it,

Logs

error Core:
An exception occurred while executing 'CREATE TABLE oc_ocsms_smsdatas (idBIGINT AUTO_INCREMENT NOT NULL,user_idVARCHAR(64) NOT NULL,addedDATETIME DEFAULT '1970-01-01 00:00:00' NOT NULL,lastmodifiedDATETIME DEFAULT '1970-01-01 00:00:00' NOT NULL,sms_idBIGINT NOT NULL,sms_addressVARCHAR(512) NOT NULL,sms_msgVARCHAR(10240) NOT NULL,sms_dateBIGINT NOT NULL,sms_flagsVARCHAR(2) DEFAULT '00' NOT NULL,sms_mailboxSMALLINT NOT NULL,sms_type SMALLINT NOT NULL, INDEX smsdata_user_mailbox (user_id, sms_mailbox), INDEX smsdata_user_smsid (user_id, sms_id), INDEX smsdata_user_mailbox_date (user_id, sms_mailbox, sms_date), INDEX smsdata_user_mailbox_address (user_id, sms_mailbox, sms_address), INDEX smsdata_user_mailbox_address_date (user_id, sms_mailbox, sms_address, sms_date), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB': SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes.
Fatal core:
Failed to update database structure (PDOException: SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. in /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:104 Stack trace: #0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(104): PDO->query('CREATE TABLE o...') #1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(954): Doctrine\DBAL\Driver\PDOConnection->query('CREATE TABLE o...') #2 /var/www/nextcloud/lib/private/DB/Migrator.php(260): Doctrine\DBAL\Connection->query('CREATE TABLE o...') #3 /var/www/nextcloud/lib/private/DB/Migrator.php(83): OC\DB\Migrator->applySchema(Object(Doctrine\DBAL\Schema\Schema)) #4 /var/www/nextcloud/lib/private/DB/MDB2SchemaManager.php(123): OC\DB\Migrator->migrate(Object(Doctrine\DBAL\Schema\Schema)) #5 /var/www/nextcloud/lib/private/legacy/db.php(187): OC\DB\MDB2SchemaManager->updateDbFromStructure('/var/www/nextcl...') #6 /var/www/nextcloud/lib/private/Installer.php(139): OC_DB::updateDbFromStructure('/var/www/nextcl...') #7 /var/www/nextcloud/lib/private/legacy/app.php(387): OC\Installer->installApp('ocsms') #8 /var/www/nextcloud/settings/ajax/enableapp.php(45): OC_App->enable('ocsms', NULL) #9 /var/www/nextcloud/lib/private/Route/Route.php(155): require_once('/var/www/nextcl...') #10 [internal function]: OC\Route\Route->OC\Route{closure}(NULL) #11 /var/www/nextcloud/lib/private/Route/Router.php(297): call_user_func(Object(Closure), Array) #12 /var/www/nextcloud/lib/base.php(999): OC\Route\Router->match('/settings/ajax/...') #13 /var/www/nextcloud/index.php(37): OC::handleRequest() #14 {main} Next Doctrine\DBAL\Driver\PDOException: SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. in /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:106 Stack trace: #0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(954): Doctrine\DBAL\Driver\PDOConnection->query('CREATE TABLE o...') #1 /var/www/nextcloud/lib/private/DB/Migrator.php(260): Doctrine\DBAL\Connection->query('CREATE TABLE o...') #2 /var/www/nextcloud/lib/private/DB/Migrator.php(83): OC\DB\Migrator->applySchema(Object(Doctrine\DBAL\Schema\Schema)) #3 /var/www/nextcloud/lib/private/DB/MDB2SchemaManager.php(123): OC\DB\Migrator->migrate(Object(Doctrine\DBAL\Schema\Schema)) #4 /var/www/nextcloud/lib/private/legacy/db.php(187): OC\DB\MDB2SchemaManager->updateDbFromStructure('/var/www/nextcl...') #5 /var/www/nextcloud/lib/private/Installer.php(139): OC_DB::updateDbFromStructure('/var/www/nextcl...') #6 /var/www/nextcloud/lib/private/legacy/app.php(387): OC\Installer->installApp('ocsms') #7 /var/www/nextcloud/settings/ajax/enableapp.php(45): OC_App->enable('ocsms', NULL) #8 /var/www/nextcloud/lib/private/Route/Route.php(155): require_once('/var/www/nextcl...') #9 [internal function]: OC\Route\Route->OC\Route{closure}(NULL) #10 /var/www/nextcloud/lib/private/Route/Router.php(297): call_user_func(Object(Closure), Array) #11 /var/www/nextcloud/lib/base.php(999): OC\Route\Router->match('/settings/ajax/...') #12 /var/www/nextcloud/index.php(37): OC::handleRequest() #13 {main} Next Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'CREATE TABLE oc_ocsms_smsdatas (id BIGINT AUTO_INCREMENT NOT NULL, user_id VARCHAR(64) NOT NULL, added DATETIME DEFAULT '1970-01-01 00:00:00' NOT NULL, lastmodified DATETIME DEFAULT '1970-01-01 00:00:00' NOT NULL, sms_id BIGINT NOT NULL, sms_address VARCHAR(512) NOT NULL, sms_msg VARCHAR(10240) NOT NULL, sms_date BIGINT NOT NULL, sms_flags VARCHAR(2) DEFAULT '00' NOT NULL, sms_mailbox SMALLINT NOT NULL, sms_type SMALLINT NOT NULL, INDEX smsdata_user_mailbox (user_id, sms_mailbox), INDEX smsdata_user_smsid (user_id, sms_id), INDEX smsdata_user_mailbox_date (user_id, sms_mailbox, sms_date), INDEX smsdata_user_mailbox_address (user_id, sms_mailbox, sms_address), INDEX smsdata_user_mailbox_address_date (user_id, sms_mailbox, sms_address, sms_date), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB': SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. in /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:115 Stack trace: #0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(128): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException)) #1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(964): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'CREATE TABLE o...') #2 /var/www/nextcloud/lib/private/DB/Migrator.php(260): Doctrine\DBAL\Connection->query('CREATE TABLE o...') #3 /var/www/nextcloud/lib/private/DB/Migrator.php(83): OC\DB\Migrator->applySchema(Object(Doctrine\DBAL\Schema\Schema)) #4 /var/www/nextcloud/lib/private/DB/MDB2SchemaManager.php(123): OC\DB\Migrator->migrate(Object(Doctrine\DBAL\Schema\Schema)) #5 /var/www/nextcloud/lib/private/legacy/db.php(187): OC\DB\MDB2SchemaManager->updateDbFromStructure('/var/www/nextcl...') #6 /var/www/nextcloud/lib/private/Installer.php(139): OC_DB::updateDbFromStructure('/var/www/nextcl...') #7 /var/www/nextcloud/lib/private/legacy/app.php(387): OC\Installer->installApp('ocsms') #8 /var/www/nextcloud/settings/ajax/enableapp.php(45): OC_App->enable('ocsms', NULL) #9 /var/www/nextcloud/lib/private/Route/Route.php(155): require_once('/var/www/nextcl...') #10 [internal function]: OC\Route\Route->OC\Route{closure}(NULL) #11 /var/www/nextcloud/lib/private/Route/Router.php(297): call_user_func(Object(Closure), Array) #12 /var/www/nextcloud/lib/base.php(999): OC\Route\Router->match('/settings/ajax/...') #13 /var/www/nextcloud/index.php(37): OC::handleRequest() #14 {main})`

@roydenyates roydenyates changed the title cannot install Phone Sync in nextcloud with mariaDB cannot install Phone Sync 1.12.7 in nextcloud 13.02 with mariaDB 10.1.29 Jun 6, 2018
@Idix
Copy link
Contributor

Idix commented Jun 28, 2018

Hi @roydenyates,

I'm mostly using the same versions as you, yet I didn't encounter any errors. I'm guessing this is related to your MariaDB configuration.
Could you provide your mariadb configuration ?

Idix

@roydenyates
Copy link
Author

roydenyates commented Jul 27, 2018

A particular problem if using utf8mb4.
This can be fixed by upgrading to MariaDB 10.2, or so I have read.

Alternatively, set a global option innodb_large_prefix = off

Or, you can keep innodb_large_prefix = on, but change your tables to have ROW_FORMAT=DYNAMIC
This last is perhaps what the dev should do as default.

Here is a good discussion of the issue.

@nerzhul
Copy link
Collaborator

nerzhul commented Jul 28, 2018

Thanks for the feedback. Definitively not a ocsms bug :)

@nerzhul nerzhul closed this as completed Jul 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants