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

"mail_collected_addr_userid_index" is too long. #1002

Closed
jancborchardt opened this issue Jul 31, 2018 · 10 comments
Closed

"mail_collected_addr_userid_index" is too long. #1002

jancborchardt opened this issue Jul 31, 2018 · 10 comments

Comments

@jancborchardt
Copy link
Member

Expected behavior

An update to Nextcloud 14 Beta 1 works fine.

Actual behavior

I get this issue on the error screen:

InvalidArgumentException: Index name "oc_mail_collected_addresses"."mail_collected_addr_userid_index" is too long.

Mail app

Mail app version: latest master

Mailserver or service: gandi.net and nextcloud.com

Number of accounts: 2

Server configuration

Operating system: Ubuntu 18.04 LTS

Web server: Apache

Database: SQLite (local dev instance)

PHP version: 7.2.8

Nextcloud Version: latest master

Updated from an older version or fresh install:

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your server installation folder

The content of config/config.php:

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or

Insert your config.php content here
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

Client configuration

Browser: (e.g. Firefox 48)

Operating system: (e.g. Arch Linux)

Logs

Server log (data/nextcloud.log)
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":1,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"updater","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"\\OC\\Updater::setDebugLogLevel: Set log level to debug","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":1,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"updater","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"\\OC\\Updater::maintenanceEnabled: Turned on maintenance mode","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":0,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"core","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"starting upgrade from 14.0.0.13 to 14.0.0.13","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":0,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"PHP","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"file_put_contents(\/home\/jan\/nextcloud\/.htaccess): failed to open stream: Permission denied at \/home\/jan\/nextcloud\/lib\/private\/Setup.php#509","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":1,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"updater","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"\\OC\\Repair::step: Repair step: Repair MySQL collation","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":1,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"updater","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"\\OC\\Repair::info: Repair info: Not a mysql database -> nothing to do","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":1,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"updater","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"\\OC\\Repair::step: Repair step: Repair SQLite autoincrement","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":1,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"updater","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"\\OC\\Repair::step: Repair step: Copy data from accounts table when migrating from ownCloud","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":1,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"updater","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"\\OC\\Repair::step: Repair step: Drop account terms table when migrating from ownCloud","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":1,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"updater","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"\\OC\\Updater::dbUpgradeBefore: Updating database schema","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":1,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"updater","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"\\OC\\Updater::dbUpgrade: Updated database","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":1,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"updater","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"\\OC\\Updater::appUpgradeStarted: Updating <spreed> ...","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":3,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"core","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":{"Exception":"InvalidArgumentException","Message":"Index name \"oc_mail_collected_addresses\".\"mail_collected_addr_email_index\" is too long.","Code":0,"Trace":[{"file":"\/home\/jan\/nextcloud\/lib\/private\/DB\/MigrationService.php","line":460,"function":"ensureOracleIdentifierLengthLimit","class":"OC\\DB\\MigrationService","type":"->","args":[{"__class__":"Doctrine\\DBAL\\Schema\\Schema"},3]},{"file":"\/home\/jan\/nextcloud\/lib\/private\/DB\/MigrationService.php","line":392,"function":"executeStep","class":"OC\\DB\\MigrationService","type":"->","args":["3003Date20180718133519",false]},{"file":"\/home\/jan\/nextcloud\/lib\/private\/legacy\/app.php","line":900,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->","args":[]},{"file":"\/home\/jan\/nextcloud\/lib\/private\/Updater.php","line":370,"function":"updateApp","class":"OC_App","type":"::","args":["spreed"]},{"file":"\/home\/jan\/nextcloud\/lib\/private\/Updater.php","line":250,"function":"doAppUpgrade","class":"OC\\Updater","type":"->","args":[]},{"file":"\/home\/jan\/nextcloud\/lib\/private\/Updater.php","line":126,"function":"doUpgrade","class":"OC\\Updater","type":"->","args":["14.0.0.13","14.0.0.13"]},{"file":"\/home\/jan\/nextcloud\/core\/ajax\/update.php","line":214,"function":"upgrade","class":"OC\\Updater","type":"->","args":[]}],"File":"\/home\/jan\/nextcloud\/lib\/private\/DB\/MigrationService.php","Line":490,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":3,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"updater","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"\\OC\\Updater::failure: InvalidArgumentException: Index name \"oc_mail_collected_addresses\".\"mail_collected_addr_email_index\" is too long.","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":3,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"updater","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"\\OC\\Updater::updateEnd: Update failed","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":1,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"updater","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"\\OC\\Updater::maintenanceActive: Maintenance mode is kept active","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
{"reqId":"cMhi3acfZLkTUWaKjHlE","level":1,"time":"2018-07-31T17:51:30+00:00","remoteAddr":"127.0.0.1","user":"--","app":"updater","method":"GET","url":"\/nextcloud\/core\/ajax\/update.php?requesttoken=P5GKx6DDxNq7IFrlJbIp%2BfrzoY7f6vcw%2Bll4gemR%2FmQ%3D%3ARef6nfKh8ovBdhKiHYpirL6F%2BMKPgppWoDI50IbDsQ8%3D","message":"\\OC\\Updater::resetLogLevel: Reset log level to Debug(0)","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"14.0.0.13"}
@rullzer
Copy link
Member

rullzer commented Jul 31, 2018

For a little background: this is the result of a change in server that forces us to be compatible with all supported databases.

@ChristophWurst
Copy link
Member

Really? This is now a hard requirement?

If so, that's a huge deal beacuse IIRC we also have a table that has a long name but the migration system doesn't allow me to rename tables, so fixing this is just PITA 😢

@ChristophWurst
Copy link
Member

php occ app:check-code mail
Database schema error: Name of table *dbprefix*mail_collected_addresses is too long (24), max. 27 characters (21 characters for tables with autoincrement) + *dbprefix* allowed
Database schema error: Name of index mail_collected_addr_userid_index on table *dbprefix*mail_collected_addresses is too long (24), max. 27 characters + *dbprefix* allowed
Database schema error: Name of index mail_collected_addr_email_index on table *dbprefix*mail_collected_addresses is too long (24), max. 27 characters + *dbprefix* allowed
Database schema error: Name of index mail_attachments_userid_index on table *dbprefix*mail_attachments is too long (16), max. 27 characters + *dbprefix* allowed
App is not compliant

Dropping the index and adding a new one should be easy, I assume. But for the table I have no solution other than creating a new table and manually copying data over, having to ensure references (primary and foreign keys) stay consistent.

@jancborchardt
Copy link
Member Author

@ChristophWurst it’s indeed a bummer. But luckily it’s "only" collected addresses. It would still be cool if it’s possible to port.

@rullzer so I guess any other app dev where table names are too long will see this too?

@jancborchardt
Copy link
Member Author

@ChristophWurst also, let me know when there’s a pull request I can test. Will leave my environment as is to confirm a fix.

@juliushaertl
Copy link
Member

See #10518

@ChristophWurst
Copy link
Member

Dup of #784?

@ChristophWurst
Copy link
Member

See #10518

nextcloud/server#10518 😉

@ChristophWurst
Copy link
Member

Fixed via #1002.

@lock
Copy link

lock bot commented Nov 20, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and questions.

@lock lock bot locked and limited conversation to collaborators Nov 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants