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

Setup page for stable10 / 10.0.9beta broken, chicken-egg problem #31741

Closed
PVince81 opened this issue Jun 12, 2018 · 5 comments · Fixed by #31757
Closed

Setup page for stable10 / 10.0.9beta broken, chicken-egg problem #31741

PVince81 opened this issue Jun 12, 2018 · 5 comments · Fixed by #31757
Assignees
Labels
p2-high Escalation, on top of current planning, release blocker regression sev1-critical Type:Bug
Milestone

Comments

@PVince81
Copy link
Contributor

Steps

  1. Extract OC 10.0.9 beta tarball
  2. Run web UI setup

Expected result

Setup page can be displayed

Actual result

Internal server error

{"reqId":"yKtlzrlF0piZbdby9pK3","level":3,"time":"2018-06-12T20:36:16+00:00","remoteAddr":"127.0.0.1","user":"--","app":"index","method":"GET","url":"\/owncloudtest\/","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\TableNotFoundException\",\"Message\":\"An exception occurred while executing 'SELECT * FROM \\\"oc_appconfig\\\"':\\n\\nSQLSTATE[HY000]: General error: 1 no such table: oc_appconfig\",\"Code\":0,\"Trace\":\"#0 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractSQLiteDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(855): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOSqlite\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'SELECT * FROM \\\"...', Array)\\n#2 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/private\\\/DB\\\/Connection.php(189): Doctrine\\\\DBAL\\\\Connection->executeQuery('SELECT * FROM \\\"...', Array, Array, NULL)\\n#3 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Query\\\/QueryBuilder.php(206): OC\\\\DB\\\\Connection->executeQuery('SELECT * FROM \\\"...', Array, Array)\\n#4 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/private\\\/DB\\\/QueryBuilder\\\/QueryBuilder.php(141): Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder->execute()\\n#5 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/private\\\/AppConfig.php(301): OC\\\\DB\\\\QueryBuilder\\\\QueryBuilder->execute()\\n#6 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/private\\\/AppConfig.php(122): OC\\\\AppConfig->loadConfigValues()\\n#7 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/private\\\/AllConfig.php(185): OC\\\\AppConfig->getValue('core', 'legal.imprint_u...', '')\\n#8 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/private\\\/legacy\\\/defaults.php(307): OC\\\\AllConfig->getAppValue('core', 'legal.imprint_u...', '')\\n#9 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/private\\\/legacy\\\/defaults.php(254): OC_Defaults->getImprintUrl()\\n#10 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/private\\\/legacy\\\/defaults.php(274): OC_Defaults->getShortFooter()\\n#11 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/core\\\/templates\\\/layout.guest.php(51): OC_Defaults->getLongFooter()\\n#12 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/private\\\/Template\\\/Base.php(221): include('\\\/srv\\\/www\\\/htdocs...')\\n#13 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/private\\\/Template\\\/Base.php(196): OC\\\\Template\\\\Base->load('\\\/srv\\\/www\\\/htdocs...', NULL)\\n#14 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/private\\\/legacy\\\/template.php(233): OC\\\\Template\\\\Base->fetchPage(NULL)\\n#15 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/private\\\/legacy\\\/template.php(255): OC_Template->fetchPage()\\n#16 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/private\\\/Template\\\/Base.php(177): OC_Template->fetchPage()\\n#17 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/private\\\/legacy\\\/template.php(321): OC\\\\Template\\\\Base->printPage()\\n#18 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/core\\\/Controller\\\/SetupController.php(95): OC_Template::printGuestPage('', 'installation', Array)\\n#19 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/core\\\/Controller\\\/SetupController.php(75): OC\\\\Core\\\\Controller\\\\SetupController->display(Array)\\n#20 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/base.php(856): OC\\\\Core\\\\Controller\\\\SetupController->run(Array)\\n#21 \\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/index.php(55): OC::handleRequest()\\n#22 {main}\",\"File\":\"\\\/srv\\\/www\\\/htdocs\\\/owncloudtest\\\/lib\\\/composer\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractSQLiteDriver.php\",\"Line\":58}"}

Version

ownCloud 10.0.9beta

The bug is likely introduce by #31704. The setup page is using the regular footer in which the imprint / privacy policy URL must be injected. For these, the DB is required for accessing the appconfig settings. However the DB hasn't been setup yet...

@PVince81 PVince81 added Type:Bug regression sev1-critical p2-high Escalation, on top of current planning, release blocker labels Jun 12, 2018
@PVince81 PVince81 added this to the development milestone Jun 12, 2018
@PVince81 PVince81 self-assigned this Jun 12, 2018
@ownclouders
Copy link
Contributor

GitMate.io thinks possibly related issues are #13402 (... broken), #30329 ([stable10] hotfix 10.0.6 commits), #30535 (Merge Hotfix 10.0.7 back to stable10), and #27476 (Cannot migrate from 9.1.4 to daily master, oc_accounts table does not exist).

@PVince81
Copy link
Contributor Author

We need to detect whether OC is installed before reading the config.

I wonder if it would be possible and safe to add code in the IAppConfig implementation to return a dummy object that returns empty for any settings. This would cover any other code paths that might try to access app config settings when DB was not setup.

@VicDeo can you have a look ?

@PVince81
Copy link
Contributor Author

@DeepDiver1975 any thoughts on the above approach or would it be too dangerous ?

@PVince81 PVince81 assigned VicDeo and unassigned PVince81 Jun 13, 2018
@DeepDiver1975
Copy link
Member

LBS:

	public function getImprintUrl() {
		try {
			return $this->config->getAppValue('core', 'legal.imprint_url', '');
		} catch (Exception $ex) {
			return '';
		}
	}

@lock
Copy link

lock bot commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p2-high Escalation, on top of current planning, release blocker regression sev1-critical Type:Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants