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

[Bug]: 24.0.0 beta 2, InvalidArgumentException: Column "oc_fulltextsearch_indexes"."message" is type String, but exceeding the 4.000 length limit. #31791

Closed
5 of 8 tasks
SDuesterhaupt opened this issue Apr 1, 2022 · 26 comments
Labels
1. to develop Accepted and waiting to be taken care of bug
Milestone

Comments

@SDuesterhaupt
Copy link

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

Within the update process (version 24.0.0 beta 2) I receive this exception:

InvalidArgumentException: Column "oc_fulltextsearch_indexes"."message" is type String, but exceeding the 4.000 length limit.

The upgrade procedure cannot be accomplished.

Steps to reproduce

$ sudo -u apache php /var/www/<***>/updater/updater.phar

Current version is 24.0.0 beta 2.

Update to Nextcloud 24.0.0 beta 2 available. (channel: "beta")
Following file will be downloaded automatically: https://download.nextcloud.com/server/prereleases/nextcloud-24.0.0beta2.zip

Steps that will be executed:
[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Continue update? [y/N] y

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[✔] Delete old files
[✔] Move new files in place
[✔] Done

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n]
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
2022-04-01T17:27:02+02:00 Setting log level to debug
2022-04-01T17:27:02+02:00 Repair step: Repair MySQL collation
2022-04-01T17:27:02+02:00 Repair info: All tables already have the correct collation -> nothing to do
2022-04-01T17:27:02+02:00 Repair step: Repair SQLite autoincrement
2022-04-01T17:27:02+02:00 Repair step: Copy data from accounts table when migrating from ownCloud
2022-04-01T17:27:02+02:00 Repair step: Drop account terms table when migrating from ownCloud
2022-04-01T17:27:02+02:00 Updating database schema
2022-04-01T17:27:02+02:00 Updated database
2022-04-01T17:27:02+02:00 Updating <files_external> ...
2022-04-01T17:27:03+02:00 InvalidArgumentException: Column "oc_fulltextsearch_indexes"."message" is type String, but exceeding the 4.000 length limit.
2022-04-01T17:27:03+02:00 Update failed
2022-04-01T17:27:03+02:00 Maintenance mode is kept active
2022-04-01T17:27:03+02:00 Resetting log level

Expected behavior

The upgrade procedure should be finished successfully.

Installation method

Manual installation

Operating system

RHEL/CentOS

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Updated from a minor version (ex. 22.2.3 to 22.2.4)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Enabled:
  - accessibility: 1.10.0
  - activity: 2.16.0
  - admin_audit: 1.14.0
  - calendar: 3.2.2
  - circles: 24.0.0-alpha1
  - cloud_federation_api: 1.7.0
  - comments: 1.14.0
  - contactsinteraction: 1.5.0
  - dashboard: 7.4.0
  - dav: 1.22.0
  - federatedfilesharing: 1.14.0
  - federation: 1.14.0
  - files: 1.19.0
  - files_external: 1.16.0
  - files_pdfviewer: 2.5.0
  - files_rightclick: 1.3.0
  - files_sharing: 1.16.0
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - firstrunwizard: 2.13.0
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - mail: 1.11.7
  - nextcloud_announcements: 1.13.0
  - notifications: 2.12.0
  - oauth2: 1.12.0
  - password_policy: 1.14.0
  - photos: 1.6.0
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - recommendations: 1.3.0
  - serverinfo: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - support: 1.7.0
  - survey_client: 1.12.0
  - systemtags: 1.14.0
  - text: 3.5.1
  - theming: 1.15.0
  - twofactor_backupcodes: 1.13.0
  - updatenotification: 1.14.0
  - user_status: 1.4.0
  - viewer: 1.8.0
  - workflowengine: 2.6.0
Disabled:
  - encryption
  - files_fulltextsearch: 23.0.0
  - files_fulltextsearch_tesseract: 22.0.0
  - files_markdown: 2.3.5
  - fulltextsearch: 23.0.0
  - fulltextsearch_elasticsearch: 23.0.0
  - user_ldap
  - weather_status: 1.0.0

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

@SDuesterhaupt SDuesterhaupt added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Apr 1, 2022
@SDuesterhaupt
Copy link
Author

As temporary workarround I simply dropped the tables with

drop table oc_fulltextsearch_indexes;
drop table oc_fulltextsearch_ticks;

Currently the apps 'fulltextsearch' are disabled. In the case of need the index can be rebuild.

@danir-de
Copy link

danir-de commented Apr 1, 2022

Same thing with the app forms.

# occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Updating database schema
Updated database
Updating <files_external> ...
InvalidArgumentException: Column "oc_forms_v2_answers"."text" is type String, but exceeding the 4.000 length limit.
Update failed

Seems to be happening in all app tables, where there is a VARCHAR field with more then 4000 length.

InvalidArgumentException: Column "oc_forms_v2_answers"."text" is type String, but exceeding the 4.000 length limit.
Update failed
InvalidArgumentException: Column "oc_ldap_group_mapping"."ldap_dn" is type String, but exceeding the 4.000 length limit.
Update failed
InvalidArgumentException: Column "oc_forms_v2_forms"."description" is type String, but exceeding the 4.000 length limit.
Update failed

By setting them all to 4000 (from 4096, 8192, etc.) you can finish the update after a few tries.

@szaimen
Copy link
Contributor

szaimen commented Apr 1, 2022

Cc @ArtificialOwl

@leuedaniel
Copy link

Same at "oc_cas_ticket"."service" and "oc_external_config"."value"
Change the length from 4096 to 4000 in the database works for me.

@szaimen
Copy link
Contributor

szaimen commented Apr 2, 2022

cc @PVince81

@sosed213
Copy link

sosed213 commented Apr 2, 2022

InvalidArgumentException: Column "oc_bookmarks_folders_public"."description" is type String, but exceeding the 4.000 length limit.

@DoM1niC
Copy link

DoM1niC commented Apr 2, 2022

I got a similar issue but here is only the files_external App affected, any workaround increase the VARCHAR is not helping here

InvalidArgumentException: Column "oc_ldap_group_mapping"."ldap_dn" is type String, but exceeding the 4.000 length limit.
Update failed

@TheMrApostel
Copy link

I got a similar issue but here is only the files_external App affected, any workaround increase the VARCHAR is not helping here

InvalidArgumentException: Column "oc_ldap_group_mapping"."ldap_dn" is type String, but exceeding the 4.000 length limit.
Update failed

You have to reduce it, not increase it.
Try:
alter table oc_ldap_group_mapping CHANGE COLUMN 'ldap_dn' varchar(4000);

@sosed213
Copy link

sosed213 commented Apr 2, 2022

I was able to find and shorten several fields in tables. After that the update was successful. Here are the steps I followed.

Mini help (step by step):

-- Run psql
sudo -u postgres psql

-- List DB
\l

-- Connect to DB
\connect nextcloud_test_db

-- List Tables (all or by pattern)
\dt oc_bookmarks

-- Get info about a table
\d oc_bookmarks

-- Chenge column leng
ALTER TABLE oc_bookmarks ALTER COLUMN url TYPE varchar(4000);

@DoM1niC
Copy link

DoM1niC commented Apr 2, 2022

alter table oc_ldap_group_mapping CHANGE COLUMN 'ldap_dn' varchar(4000);

grafik
grafik

Mhhh.....

@marcelklehr
Copy link
Member

Since when is 4000 a limit in Nextcloud? Where is this documented? This is a breaking change.

@noci2012
Copy link

noci2012 commented Apr 3, 2022

Another one fir this collection...

Updating <user_ldap> ...
OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column '4000' in 'where clause'
Update failed
Maintenance mode is kept active

@PVince81 PVince81 added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Apr 4, 2022
@PVince81
Copy link
Member

PVince81 commented Apr 8, 2022

@skjnldsv
Copy link
Member

skjnldsv commented Apr 8, 2022

Needs to be tried with beta3. We dispatched some fixes for it
There were false positive in those warnings

@nickvergessen
Copy link
Member

Forms fixed with nextcloud/forms#1149

@nickvergessen
Copy link
Member

Bookmarks opted out of oracle support: https://github.com/nextcloud/bookmarks/blob/master/appinfo/info.xml#L40-L42
That was then fixed with #31872

@nickvergessen
Copy link
Member

"oc_external_config"."value"

That was already fixed with #31679

Small bug fix added in #31903 for I guess owncloud migration case

@nickvergessen
Copy link
Member

"oc_cas_ticket"."service"

Can't find that table. What app is it from?

@nickvergessen
Copy link
Member

full text search: nextcloud/fulltextsearch#678

Fixed in nextcloud/fulltextsearch#679

@DoM1niC
Copy link

DoM1niC commented Apr 9, 2022

alter table oc_ldap_group_mapping CHANGE COLUMN 'ldap_dn' varchar(4000);

grafik grafik

Mhhh.....

my problems are solved now btw but THX anyway

@szaimen
Copy link
Contributor

szaimen commented Apr 25, 2022

Isn't this already solved in the meantime?

@nickvergessen
Copy link
Member

nextcloud/fulltextsearch#679 is still not merged...

@szaimen
Copy link
Contributor

szaimen commented Apr 25, 2022

right

@ArtificialOwl
Copy link
Member

can I get a quick review on nextcloud/fulltextsearch#679 ?

@szaimen
Copy link
Contributor

szaimen commented Apr 25, 2022

can I get a quick review on nextcloud/fulltextsearch#679 ?

could you ask in the files chat? :)

@szaimen
Copy link
Contributor

szaimen commented Apr 25, 2022

Should be fixed with nextcloud/fulltextsearch#679

@szaimen szaimen closed this as completed Apr 25, 2022
@szaimen szaimen added this to the Nextcloud 24 milestone Apr 25, 2022
Yetangitu pushed a commit to Yetangitu/files_reader that referenced this issue Sep 24, 2022
…me", this undoes the change in 1.5.2.

 - reduce maximum database string column size to 3999 to get around '4000 length limit' (nextcloud/server#31791)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug
Projects
None yet
Development

No branches or pull requests