nextcloud / fulltextsearch

🔍 Core of the full-text search framework for Nextcloud
https://apps.nextcloud.com/apps/fulltextsearch
GNU Affero General Public License v3.0
216 stars 51 forks source link

Upgrade of fulltextsearch to NC 24 fails #713

Open gvansanden opened 2 years ago

gvansanden commented 2 years ago

I tried to upgrade my Nextcloud 23 server on Ubuntu 20.04 to Nextcloud 24 Note that I use Postgres as the DB backend (which I think is the issue)

The stage where fulltextsearch is upgrade breaks with this error:

Update app fulltextsearch from App Store An unhandled exception has been thrown: Error: Undefined class constant 'MIGRATION_24' in /var/www/nextcloud/apps/fulltextsearch/lib/Migration/Version2400Date202201301329.php:159 Stack trace:

0 /var/www/nextcloud/lib/private/DB/MigrationService.php(547): OCA\FullTextSearch\Migration\Version2400Date202201301329->postSchemaChange()

1 /var/www/nextcloud/lib/private/DB/MigrationService.php(425): OC\DB\MigrationService->executeStep()

2 /var/www/nextcloud/lib/private/legacy/OC_App.php(1022): OC\DB\MigrationService->migrate()

3 /var/www/nextcloud/lib/private/Installer.php(201): OC_App::updateApp()

4 /var/www/nextcloud/lib/private/Updater.php(415): OC\Installer->updateAppstoreApp()

5 /var/www/nextcloud/lib/private/Updater.php(277): OC\Updater->upgradeAppStoreApps()

6 /var/www/nextcloud/lib/private/Updater.php(133): OC\Updater->doUpgrade()

7 /var/www/nextcloud/core/Command/Upgrade.php(235): OC\Updater->upgrade()

8 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute()

9 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()

10 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()

11 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()

12 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()

13 /var/www/nextcloud/console.php(100): OC\Console\Application->run()

14 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')

15 {main}

hashworks commented 2 years ago

I solved this by disabling the app, re-running the upgrade, enabling the app again and calling fulltextsearch:migration:24 afterwards.

occ app:disable fulltextsearch
occ upgrade
occ maintenance:mode --off
occ app:enable fulltextsearch
occ fulltextsearch:migration:24

But yeah, the update process isn't pretty.

level420 commented 2 years ago

@gvansanden it's not postgres. It also occurs with mariadb 10.

level420 commented 2 years ago

@gvansanden do you use the official nextcloud docker image from docker hub or php 8.1?

gvansanden commented 2 years ago

@level420 No, manual install on Ubuntu 20.04. I still need to upgrade the server to 22.04, that will pull in php 8.1

Aquariu commented 2 years ago

I also got this error with a different setup :

Applying what hashworks proposed, I got this restults: occ app:disable fulltextsearch The system responded that there was no such app to disable (I understood it as meaning that the app was already disabled And indeed, the upgrader.phar action led to several apps to be disabled including this one. (although they were not marked as incompatible with NC24 before the upgrade) The rest went smoothly.

joshtrichards commented 8 months ago

Duplicate of #698