Two Factor admin support on NC 14.0.4 broken

vm
nc14

#1

Brand new install from https://www.hanssonit.se/nextcloud-vm/ of the 40gb vm.

Trying to install Two-Factor Admin Support 0.1.0. It downloads ok but then errors out with the error below when trying to enable.

Two Factor TOTP Provider 1.5.0 is installed and an account is configured with 2FA.


An error occured during the request. Unable to proceed.
An exception occurred while executing ‘DROP INDEX “primary”’: SQLSTATE[42704]: Undefined object: 7 ERROR: index “primary” does not exist

Not quite sure how to proceed considering this is a very stock set up. Any advice? Thanks!

error log

|Error|no app in context|Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'DROP INDEX "primary"': SQLSTATE[42704]: Undefined object: 7 ERROR: index "primary" does not exist

0. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php - line 128:Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException("An exceptio ... t", Doctrine\DBA ... ]})
1. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 964:Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBA ... {}, Doctrine\DBA ... ]}, "DROP INDEX \"primary\"")
2. /var/www/nextcloud/lib/private/DB/Migrator.php - line 260:Doctrine\DBAL\Connection->query("DROP INDEX \"primary\"")
3. /var/www/nextcloud/lib/private/DB/Migrator.php - line 83:OC\DB\Migrator->applySchema(Doctrine\DBAL\Schema\Schema {})
4. /var/www/nextcloud/lib/private/DB/Connection.php - line 446:OC\DB\Migrator->migrate(Doctrine\DBAL\Schema\Schema {})
5. /var/www/nextcloud/lib/private/DB/MigrationService.php - line 462:OC\DB\Connection->migrateToSchema(Doctrine\DBAL\Schema\Schema {})
6. /var/www/nextcloud/lib/private/DB/MigrationService.php - line 392:OC\DB\MigrationService->executeStep("1Date20180907092152", false)
7. /var/www/nextcloud/lib/private/Installer.php - line 138:OC\DB\MigrationService->migrate()
8. /var/www/nextcloud/settings/Controller/AppSettingsController.php - line 441:OC\Installer->installApp("twofactor_admin")
9. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 166:OC\Settings\Controller\AppSettingsController->enableApps([ "twofactor_admin"], [])
10. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 99:OC\AppFramework\Http\Dispatcher->executeController(OC\Settings\ ... {}, "enableApps")
11. /var/www/nextcloud/lib/private/AppFramework/App.php - line 118:OC\AppFramework\Http\Dispatcher->dispatch(OC\Settings\ ... {}, "enableApps")
12. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:OC\AppFramework\App::main("OC\\Setting ... r", "enableApps", OC\AppFramew ... {}, { _route: "s ... "})
13. OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "s ... "})
14. /var/www/nextcloud/lib/private/Route/Router.php - line 297:call_user_func(OC\AppFramew ... {}, { _route: "s ... "})
15. /var/www/nextcloud/lib/base.php - line 987:OC\Route\Router->match("/settings/apps/enable")
16. /var/www/nextcloud/index.php - line 42:OC::handleRequest()

Cased by Doctrine\DBAL\Driver\PDOException: SQLSTATE[42704]: Undefined object: 7 ERROR: index "primary" does not exist

0. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 954:Doctrine\DBAL\Driver\PDOConnection->query("DROP INDEX \"primary\"")
1. /var/www/nextcloud/lib/private/DB/Migrator.php - line 260:Doctrine\DBAL\Connection->query("DROP INDEX \"primary\"")
2. /var/www/nextcloud/lib/private/DB/Migrator.php - line 83:OC\DB\Migrator->applySchema(Doctrine\DBAL\Schema\Schema {})
3. /var/www/nextcloud/lib/private/DB/Connection.php - line 446:OC\DB\Migrator->migrate(Doctrine\DBAL\Schema\Schema {})
4. /var/www/nextcloud/lib/private/DB/MigrationService.php - line 462:OC\DB\Connection->migrateToSchema(Doctrine\DBAL\Schema\Schema {})
5. /var/www/nextcloud/lib/private/DB/MigrationService.php - line 392:OC\DB\MigrationService->executeStep("1Date20180907092152", false)
6. /var/www/nextcloud/lib/private/Installer.php - line 138:OC\DB\MigrationService->migrate()
7. /var/www/nextcloud/settings/Controller/AppSettingsController.php - line 441:OC\Installer->installApp("twofactor_admin")
8. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 166:OC\Settings\Controller\AppSettingsController->enableApps([ "twofactor_admin"], [])
9. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 99:OC\AppFramework\Http\Dispatcher->executeController(OC\Settings\ ... {}, "enableApps")
10. /var/www/nextcloud/lib/private/AppFramework/App.php - line 118:OC\AppFramework\Http\Dispatcher->dispatch(OC\Settings\ ... {}, "enableApps")
11. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:OC\AppFramework\App::main("OC\\Setting ... r", "enableApps", OC\AppFramew ... {}, { _route: "s ... "})
12. OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "s ... "})
13. /var/www/nextcloud/lib/private/Route/Router.php - line 297:call_user_func(OC\AppFramew ... {}, { _route: "s ... "})
14. /var/www/nextcloud/lib/base.php - line 987:OC\Route\Router->match("/settings/apps/enable")
15. /var/www/nextcloud/index.php - line 42:OC::handleRequest()

Cased by PDOException: SQLSTATE[42704]: Undefined object: 7 ERROR: index "primary" does not exist

0. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php - line 104:PDO->query("DROP INDEX \"primary\"")
1. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 954:Doctrine\DBAL\Driver\PDOConnection->query("DROP INDEX \"primary\"")
2. /var/www/nextcloud/lib/private/DB/Migrator.php - line 260:Doctrine\DBAL\Connection->query("DROP INDEX \"primary\"")
3. /var/www/nextcloud/lib/private/DB/Migrator.php - line 83:OC\DB\Migrator->applySchema(Doctrine\DBAL\Schema\Schema {})
4. /var/www/nextcloud/lib/private/DB/Connection.php - line 446:OC\DB\Migrator->migrate(Doctrine\DBAL\Schema\Schema {})
5. /var/www/nextcloud/lib/private/DB/MigrationService.php - line 462:OC\DB\Connection->migrateToSchema(Doctrine\DBAL\Schema\Schema {})
6. /var/www/nextcloud/lib/private/DB/MigrationService.php - line 392:OC\DB\MigrationService->executeStep("1Date20180907092152", false)
7. /var/www/nextcloud/lib/private/Installer.php - line 138:OC\DB\MigrationService->migrate()
8. /var/www/nextcloud/settings/Controller/AppSettingsController.php - line 441:OC\Installer->installApp("twofactor_admin")
9. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 166:OC\Settings\Controller\AppSettingsController->enableApps([ "twofactor_admin"], [])
10. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 99:OC\AppFramework\Http\Dispatcher->executeController(OC\Settings\ ... {}, "enableApps")
11. /var/www/nextcloud/lib/private/AppFramework/App.php - line 118:OC\AppFramework\Http\Dispatcher->dispatch(OC\Settings\ ... {}, "enableApps")
12. /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:OC\AppFramework\App::main("OC\\Setting ... r", "enableApps", OC\AppFramew ... {}, { _route: "s ... "})
13. OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "s ... "})
14. /var/www/nextcloud/lib/private/Route/Router.php - line 297:call_user_func(OC\AppFramew ... {}, { _route: "s ... "})
15. /var/www/nextcloud/lib/base.php - line 987:OC\Route\Router->match("/settings/apps/enable")
16. /var/www/nextcloud/index.php - line 42:OC::handleRequest()|
| --- | --- |

#2

See https://github.com/ChristophWurst/twofactor_admin/issues/20 https://github.com/ChristophWurst/twofactor_admin/issues/24