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

NC 20.0.0 - Index name "oc_reader_preferences"."reader_preferences_file_id_index" is too long. #22

Closed
frankbootmaker opened this issue Oct 19, 2020 · 6 comments
Labels
duplicate This issue or pull request already exists

Comments

@frankbootmaker
Copy link

Hi,

I was trying to install the 1.4.3 version on the NC 20.0.0 but got the error message of:
Index name "oc_reader_preferences"."reader_preferences_file_id_index" is too long.

MySQL server: Server version: 10.5.6-MariaDB-1:10.5.6+maria~focal

Do you have any hints how to fix it?

Cheers,
Ferenc

@ChappIO
Copy link

ChappIO commented Oct 19, 2020

I am experiencing the same problem on PostgreSQL.

@ChristianKuehnel
Copy link

Same on NextCloud 18.0.10. The log output is:

[settings] Error: InvalidArgumentException: Index name "oc_reader_preferences"."reader_preferences_file_id_index" is too long. at <<closure>>

 0. /var/www/html/lib/private/DB/MigrationService.php line 484
    OC\DB\MigrationService->ensureOracleIdentifierLengthLimit(Doctrine\DBAL\Schema\Schema {}, Doctrine\DBAL\Schema\Schema {}, 3)
 1. /var/www/html/lib/private/DB/MigrationService.php line 414
    OC\DB\MigrationService->executeStep("010402Date20200508180941", false)
 2. /var/www/html/lib/private/Installer.php line 157
    OC\DB\MigrationService->migrate()
 3. /var/www/html/apps/settings/lib/Controller/AppSettingsController.php line 443
    OC\Installer->installApp("epubreader")
 4. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Settings\Controller\AppSettingsController->enableApps(["epubreader"], [])
 5. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Settings\Con ... {}, "enableApps")
 6. /var/www/html/lib/private/AppFramework/App.php line 125
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Settings\Con ... {}, "enableApps")
 7. /var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\Settings\\ ... r", "enableApps", OC\AppFramework\ ... {}, {_route: "settin ... "})
 8. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "settin ... "})
 9. /var/www/html/lib/private/Route/Router.php line 299
    call_user_func(OC\AppFramework\ ... {}, {_route: "settin ... "})
10. /var/www/html/lib/base.php line 1012
    OC\Route\Router->match("/settings/apps/enable")
11. /var/www/html/index.php line 38
    OC::handleRequest()

@StephenCYang
Copy link

Same on NC 19.
Index name "oc_reader_preferences"."reader_preferences_file_id_index" is too long.

@Jawn78
Copy link

Jawn78 commented Oct 21, 2020

Same for me on 20

InvalidArgumentException: Index name "oc_reader_preferences"."reader_preferences_file_id_index" is too long.
/var/www/html/nextcloud/lib/private/DB/MigrationService.php - line 484:

OC\DB\MigrationService->ensureOracleIdentifierLengthLimit()

/var/www/html/nextcloud/lib/private/DB/MigrationService.php - line 414:

OC\DB\MigrationService->executeStep()

/var/www/html/nextcloud/lib/private/Installer.php - line 157:

OC\DB\MigrationService->migrate()

/var/www/html/nextcloud/apps/settings/lib/Controller/AppSettingsController.php - line 448:

OC\Installer->installApp()

/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 169:

OCA\Settings\Controller\AppSettingsController->enableApps()

/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 100:

OC\AppFramework\Http\Dispatcher->executeController()

/var/www/html/nextcloud/lib/private/AppFramework/App.php - line 152:

OC\AppFramework\Http\Dispatcher->dispatch()

/var/www/html/nextcloud/lib/private/Route/Router.php - line 308:

OC\AppFramework\App::main()

/var/www/html/nextcloud/lib/base.php - line 1009:

OC\Route\Router->match()

/var/www/html/nextcloud/index.php - line 37:

OC::handleRequest()

@aszlig
Copy link

aszlig commented Oct 22, 2020

Apparently the maximum length of index names that Nextcloud allows is 27 and reader_preferences_file_id_index has 32 characters.

I wonder how this limit came to be, since the supported database system with the lowest limit (Oracle) still apparently allows 30 characters. The upstream commit message that introduced this limit also don't give an explanation.

Nevertheless, the length used by epubreader certainly is even bigger than 30 characters, so maybe use a name like reader_prefs_file_id_index (just abbreviated the preferences) instead?

aszlig added a commit to aszlig/avonc that referenced this issue Oct 22, 2020
This currently causes our test to fail with the followivg error while
enabling the app:

  Index name "oc_reader_preferences"."reader_preferences_file_id_index"
  is too long.

The issue has been reported upstream[1] and I also added an assertion on
the current version so that we can re-add the app to our upgrade test
once a fixed upstream version is available.

[1]: e-alfred/epubreader#22

Signed-off-by: aszlig <aszlig@nix.build>
@e-alfred
Copy link
Owner

Thanks for your report, but this is a duplicate of #18. Please add any additional information there.

@e-alfred e-alfred added the duplicate This issue or pull request already exists label Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

7 participants