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

accounts table missing, can't view personal settings page #6078

Closed
ChristophWurst opened this issue Aug 11, 2017 · 9 comments
Closed

accounts table missing, can't view personal settings page #6078

ChristophWurst opened this issue Aug 11, 2017 · 9 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Milestone

Comments

@ChristophWurst
Copy link
Member

After I ran into #5695 last week, I'm now having a similar problem with the (still not existent) accounts table whenever I navigate to the settings page of my dev instance:

Internal Server Error

The server encountered an internal error and was unable to complete your request.

Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.

More details can be found in the server log.

Technical details

    Remote Address: 127.0.0.1
    Request ID: fE1ZFEzwRyY5l6RGdQVz
    Type: Doctrine\DBAL\Exception\TableNotFoundException
    Code: 0
    Message: An exception occurred while executing 'SELECT "data" FROM "oc_accounts" WHERE "uid" = ?' with params ["admin"]: SQLSTATE[HY000]: General error: 1 no such table: oc_accounts
    File: /home/christoph/workspace/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php
    Line: 58


Trace

#0 /home/christoph/workspace/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(128): Doctrine\DBAL\Driver\AbstractSQLiteDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))
#1 /home/christoph/workspace/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(855): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOSqlite\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'SELECT "data" F...', Array)
#2 /home/christoph/workspace/nextcloud/lib/private/DB/Connection.php(193): Doctrine\DBAL\Connection->executeQuery('SELECT "data" F...', Array, Array, NULL)
#3 /home/christoph/workspace/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(206): OC\DB\Connection->executeQuery('SELECT "data" F...', Array, Array)
#4 /home/christoph/workspace/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(213): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /home/christoph/workspace/nextcloud/lib/private/Accounts/AccountManager.php(141): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /home/christoph/workspace/nextcloud/lib/private/Settings/Personal/PersonalInfo.php(104): OC\Accounts\AccountManager->getUser(Object(OC\User\User))
#7 /home/christoph/workspace/nextcloud/settings/Controller/CommonSettingsTrait.php(110): OC\Settings\Personal\PersonalInfo->getForm()
#8 /home/christoph/workspace/nextcloud/settings/Controller/PersonalSettingsController.php(70): OC\Settings\Controller\PersonalSettingsController->formatSettings(Array)
#9 /home/christoph/workspace/nextcloud/settings/Controller/CommonSettingsTrait.php(120): OC\Settings\Controller\PersonalSettingsController->getSettings('personal-info')
#10 /home/christoph/workspace/nextcloud/settings/Controller/PersonalSettingsController.php(60): OC\Settings\Controller\PersonalSettingsController->getIndexResponse('personal', 'personal-info')
#11 [internal function]: OC\Settings\Controller\PersonalSettingsController->index('personal-info')
#12 /home/christoph/workspace/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(160): call_user_func_array(Array, Array)
#13 /home/christoph/workspace/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(90): OC\AppFramework\Http\Dispatcher->executeController(Object(OC\Settings\Controller\PersonalSettingsController), 'index')
#14 /home/christoph/workspace/nextcloud/lib/private/AppFramework/App.php(114): OC\AppFramework\Http\Dispatcher->dispatch(Object(OC\Settings\Controller\PersonalSettingsController), 'index')
#15 /home/christoph/workspace/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php(47): OC\AppFramework\App::main('OC\\Settings\\Con...', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#16 [internal function]: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
#17 /home/christoph/workspace/nextcloud/lib/private/Route/Router.php(297): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
#18 /home/christoph/workspace/nextcloud/lib/base.php(1004): OC\Route\Router->match('/settings/user')
#19 /home/christoph/workspace/nextcloud/index.php(40): OC::handleRequest()
#20 {main}

@nickvergessen should a migration create that table?

@ChristophWurst ChristophWurst added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Aug 11, 2017
@nickvergessen
Copy link
Member

Well if you ran in #5695 you also run in the issue that the table doesn't exist later on.
This should be fixed on master where we use the migration to create the table:
https://github.com/nextcloud/server/blob/master/core/Migrations/Version13000Date20170718121200.php#L873-L884

@ChristophWurst
Copy link
Member Author

Well if you ran in #5695 you also run in the issue that the table doesn't exist later on.
This should be fixed on master where we use the migration to create the table:
https://github.com/nextcloud/server/blob/master/core/Migrations/Version13000Date20170718121200.php#L873-L884

Makes sense. However, the update (it said to 13.0.0 alpha) apparently didn't create the table. Also lowering the version in config.php and re-running php occ upgrade didn't create it.

If this problem only occurs to me due to using unstable feature branches and getting into an invalid db/migration state, then I can also just reset my dev env and ignore the issue. However, I thought it would be better to report it here.

@nickvergessen
Copy link
Member

Whats the content of your migrations table?

@ChristophWurst
Copy link
Member Author

"core"	"13000Date20170705121758"
"core"	"13000Date20170718121200"
"twofactor_backupcodes"	"1002Date20170607104347"
"twofactor_backupcodes"	"1002Date20170607113030"

@ChristophWurst
Copy link
Member Author

ChristophWurst commented Aug 11, 2017

-> so apparently the migration was run 🤔

@nickvergessen
Copy link
Member

Yes it was, it's the second entry....

@ChristophWurst
Copy link
Member Author

Yeah, misread the timestamp. Now I'm pretty sure that I messed up the migration when I was trying to fix #5695 myself. I'm closing this ticket now. Thanks.

@jancborchardt
Copy link
Member

I actually have the same problem. Just updated to latest git master, also git submodule update, and this is my error:
(I didn’t try to fix #5695 myself like @ChristophWurst so I’m pretty sure an error still persists.)

Technical details

    Remote Address: 127.0.0.1
    Request ID: WM73uEkIecMJKb5SiElH
    Type: Doctrine\DBAL\Exception\TableNotFoundException
    Code: 0
    Message: An exception occurred while executing 'SELECT "data" FROM "oc_accounts" WHERE "uid" = ?' with params ["jan"]: SQLSTATE[HY000]: General error: 1 no such table: oc_accounts
    File: /home/jan/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php
    Line: 58


Trace

#0 /home/jan/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(128): Doctrine\DBAL\Driver\AbstractSQLiteDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))
#1 /home/jan/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(855): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOSqlite\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'SELECT "data" F...', Array)
#2 /home/jan/nextcloud/lib/private/DB/Connection.php(193): Doctrine\DBAL\Connection->executeQuery('SELECT "data" F...', Array, Array, NULL)
#3 /home/jan/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(206): OC\DB\Connection->executeQuery('SELECT "data" F...', Array, Array)
#4 /home/jan/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(213): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /home/jan/nextcloud/lib/private/Accounts/AccountManager.php(141): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /home/jan/nextcloud/lib/private/Settings/Personal/PersonalInfo.php(104): OC\Accounts\AccountManager->getUser(Object(OC\User\User))
#7 /home/jan/nextcloud/settings/Controller/CommonSettingsTrait.php(110): OC\Settings\Personal\PersonalInfo->getForm()
#8 /home/jan/nextcloud/settings/Controller/PersonalSettingsController.php(70): OC\Settings\Controller\PersonalSettingsController->formatSettings(Array)
#9 /home/jan/nextcloud/settings/Controller/CommonSettingsTrait.php(120): OC\Settings\Controller\PersonalSettingsController->getSettings('personal-info')
#10 /home/jan/nextcloud/settings/Controller/PersonalSettingsController.php(60): OC\Settings\Controller\PersonalSettingsController->getIndexResponse('personal', 'personal-info')
#11 [internal function]: OC\Settings\Controller\PersonalSettingsController->index('personal-info')
#12 /home/jan/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(160): call_user_func_array(Array, Array)
#13 /home/jan/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(90): OC\AppFramework\Http\Dispatcher->executeController(Object(OC\Settings\Controller\PersonalSettingsController), 'index')
#14 /home/jan/nextcloud/lib/private/AppFramework/App.php(114): OC\AppFramework\Http\Dispatcher->dispatch(Object(OC\Settings\Controller\PersonalSettingsController), 'index')
#15 /home/jan/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php(47): OC\AppFramework\App::main('OC\\Settings\\Con...', 'index', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#16 [internal function]: OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)
#17 /home/jan/nextcloud/lib/private/Route/Router.php(297): call_user_func(Object(OC\AppFramework\Routing\RouteActionHandler), Array)
#18 /home/jan/nextcloud/lib/base.php(1004): OC\Route\Router->match('/settings/user')
#19 /home/jan/nextcloud/index.php(40): OC::handleRequest()
#20 {main}

It only happens on the user settings page, everything else works.

@tcitworld
Copy link
Member

Had the same too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

5 participants