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

problems update #12218

Closed
unitrav opened this issue Nov 2, 2018 · 7 comments
Closed

problems update #12218

unitrav opened this issue Nov 2, 2018 · 7 comments

Comments

@unitrav
Copy link

unitrav commented Nov 2, 2018

Hey there

When I want to update nextcloud I receive the following error.

Any ideas on how to solve it?

Thank you

Tim

Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT class FROM oc_personal_sections WHERE class = ? LIMIT 1' with params ["OCA\FederatedFileSharing\Settings\PersonalSection"]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'timkroeg_next879.oc_personal_sections' doesn't exist

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #9193 (W2G2 update problem), #2403 (Problem updating/enabling apps installed via git in NC 11), #6087 ("Personal Info" update fails), #10664 (Update CRL), and #9356 (problem with updater ).

@kwisatz
Copy link

kwisatz commented Nov 3, 2018

Interesting. I have the same issue with an upgrade I'm attempting from Owncloud 10, major version by major version. Upgrading/Migrating from Owncloud 10 worked almost like a breeze, but then Upgrading from Nextcloud 12.0.12.2 to NC 13.0.x fails with this exact error. You'd think the migrate tool would have added this table if it's been introduced by NC…

And even more interesting, another installation of NC that I have and that already runs version 14 does not have this table either…

For reference, there's also a forum thread (well, only the OP so far) mentioning this: https://help.nextcloud.com/t/upgrade-issues-to-nextcloud-14-on-database/39561

@kwisatz
Copy link

kwisatz commented Nov 3, 2018

Here's a little more verbose material while I'm trying to work around this:

Some context:

2018-11-03T17:02:22+00:00 Updating <federatedfilesharing> ...
2018-11-03T17:02:22+00:00 Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT `class` FROM `oc_personal_sections` WHERE `class` = ? LIMIT 1' with params ["OCA\\FederatedFileSharing\\Settings\\PersonalSection"]:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_personal_sections' doesn't exist
2018-11-03T17:02:22+00:00 Update failed

Exception stack-trace:

{"reqId":"*******************","level":3,"time":"2018-11-03T17:05:28+00:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\TableNotFoundException\",\"Message\":\"An exception occurred while executing 'SELECT `class` FROM `oc_personal_sections` WHERE `class` = ? LIMIT 1' with params [\\\"OCA\\\\\\\\FederatedFileSharing\\\\\\\\Settings\\\\\\\\PersonalSection\\\"]:\\n\\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_personal_sections' doesn't exist\",\"Code\":0,\"Trace\":\"
#0 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n
#1 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(855): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'SELECT `class` ...', Array)\\n
#2 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/DB\\\/Connection.php(195): Doctrine\\\\DBAL\\\\Connection->executeQuery('SELECT `class` ...', Array, Array, NULL)\\n
#3 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Query\\\/QueryBuilder.php(206): OC\\\\DB\\\\Connection->executeQuery('SELECT `class` ...', Array, Array)\\n
#4 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/DB\\\/QueryBuilder\\\/QueryBuilder.php(214): Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder->execute()\\n
#5 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Settings\\\/Mapper.php(177): OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder->execute()\\n
#6 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Settings\\\/Manager.php(286): OC\\\\Settings\\\\Mapper->has('personal_sectio...', 'OCA\\\\\\\\FederatedFi...')\\n
#7 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Settings\\\/Manager.php(233): OC\\\\Settings\\\\Manager->hasSection('OCA\\\\\\\\FederatedFi...', 'personal_sectio...')\\n
#8 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Settings\\\/Manager.php(151): OC\\\\Settings\\\\Manager->setupSectionEntry('OCA\\\\\\\\FederatedFi...', 'personal')\\n
#9 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/app.php(1061): OC\\\\Settings\\\\Manager->setupSettings(Array)\\n
#10 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Updater.php(390): OC_App::updateApp('federatedfilesh...')\\n
#11 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Updater.php(271): OC\\\\Updater->doAppUpgrade()\\n
#12 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Updater.php(139): OC\\\\Updater->doUpgrade('13.0.6.1', '12.0.12.2')\\n
#13 \\\/var\\\/www\\\/nextcloud\\\/core\\\/Command\\\/Upgrade.php(270): OC\\\\Updater->upgrade()\\n
#14 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/symfony\\\/console\\\/Command\\\/Command.php(264): OC\\\\Core\\\\Command\\\\Upgrade->execute(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n
#15 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/symfony\\\/console\\\/Application.php(874): Symfony\\\\Component\\\\Console\\\\Command\\\\Command->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n
#16 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/symfony\\\/console\\\/Application.php(228): Symfony\\\\Component\\\\Console\\\\Application->doRunCommand(Object(OC\\\\Core\\\\Command\\\\Upgrade), Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n
#17 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/symfony\\\/console\\\/Application.php(130): Symfony\\\\Component\\\\Console\\\\Application->doRun(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n#18 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Console\\\/Application.php(173): Symfony\\\\Component\\\\Console\\\\Application->run(Object(Symfony\\\\Component\\\\Console\\\\Input\\\\ArgvInput), Object(Symfony\\\\Component\\\\Console\\\\Output\\\\ConsoleOutput))\\n
#19 \\\/var\\\/www\\\/nextcloud\\\/console.php(90): OC\\\\Console\\\\Application->run()\\n
#20 \\\/var\\\/www\\\/nextcloud\\\/occ(11): require_once('\\\/var\\\/www\\\/nextcl...')\\n
#21 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractMySQLDriver.php\",\"Line\":53}","userAgent":"--","version":"12.0.12.2"}

@kwisatz
Copy link

kwisatz commented Nov 3, 2018

What worked for me (but I'm not sure yet if there won't be issues in the future) was to remove the following apps from the apps folder:

  • federatedfilesharing
  • twofactor_backupcodes
  • firstrunwizard

With these gone, the upgrade succeeds, and also a follow-up upgrade from 13.x to 14.x works. The apps will also be replaced by the upgrade to the next version of NC.

@kwisatz
Copy link

kwisatz commented Nov 3, 2018

IDK, the upgrade process seems to be relatively flaky. There are often values e.g in the appconfig table that are not changed as they should have been, or tables whose migrations aren't running, thus making the tables miss columns.

Eventually, you'll figure it out, but I just think there are so many varying states out there (meaning people, including myself, have messed up their nextcloud or owncloud installations) that the upgrade mechanism just can't cover them all.

@johnsonm
Copy link

The title of the issue I filed turns out to be misleading; Version13000Date20170705121758 is the migration that isn't running here.

@ChristophWurst
Copy link
Member

#13291 (comment)

Closing as I assume this has been resolved by now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants