9.0.4 patch doesn't work for me

help

#1

Steps to reproduce
1. Apply patch from here;
2. Restart the server;
3. Bump into error on the update page.

Expected behaviour
Update to 9.0.5

Actual behaviour
1. Core inegrity check fails;
2. ee[GuzzleHttp\Exception\RequestException] e
e cURL error 51: SSL: no alternative certificate subject name matches target host name 'localhost' e

Server configuration
Operating system: Ubuntu 16.04.1 LTS
Web server: Caddy 0.8.3
Database: PostgreSQL 9.6.1
PHP version: 7.0.8 (system default)
ownCloud version (see ownCloud admin page): 9.0.4
Updated from an older ownCloud or fresh install: updated from 9.0.2, 9.0.2 - clean install
Special configuration: external ftp

ownCloud log (data/owncloud.log)

{"reqId":"4dc1kXsAcn5VRV0fWoC2","remoteAddr":"","app":"PHP","message":"Error: Call to a member function getPath() on null at \/etc\/caddy\/site\/owncloud\/lib\/private\/files\/filesystem.php#911","level":3,"time":"2016-10-28T12:45:02+00:00","method":"--","url":"--","user":"--"}
{"reqId":"KVGOFq1EInDwEA52MyxK","remoteAddr":"128.68.54.107","app":"PHP","message":"OCP\\AutoloadNotAllowedException: Autoload path not allowed: \/etc\/caddy\/site\/owncloud\/apps\/dav\/lib\/connector\/sabre\/exceptionloggerplugin.php at \/etc\/caddy\/site\/owncloud\/lib\/autoloader.php#152","level":3,"time":"2016-10-28T13:32:35+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"8EoAnYbUXVIvp2kpf8Kd","remoteAddr":"128.68.54.107","app":"PHP","message":"OCP\\AutoloadNotAllowedException: Autoload path not allowed: \/etc\/caddy\/site\/owncloud\/apps\/dav\/lib\/connector\/sabre\/exceptionloggerplugin.php at \/etc\/caddy\/site\/owncloud\/lib\/autoloader.php#152","level":3,"time":"2016-10-28T13:32:48+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/","user":"--"}
{"reqId":"toCmnq1\/XHoVCyn0qgoI","remoteAddr":"193.124.178.6","app":"index","message":"Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\QueryException\",\"Message\":\"Could not resolve OCA\\\\Core\\\\Controller\\\\OccController! Class OCA\\\\Core\\\\Controller\\\\OccController does not exist\",\"Code\":0,\"Trace\":\"#0 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(104): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OCA\\\\\\\\Core\\\\\\\\Contro...')\\n#1 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/app.php(97): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\Core\\\\\\\\Contro...')\\n#2 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/routing\\\/routeactionhandler.php(45): OC\\\\AppFramework\\\\App::main('OCA\\\\\\\\Core\\\\\\\\Contro...', 'execute', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#3 [internal function]: OC\\\\AppFramework\\\\routing\\\\RouteActionHandler->__invoke(Array)\\n#4 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/route\\\/router.php(276): call_user_func(Object(OC\\\\AppFramework\\\\routing\\\\RouteActionHandler), Array)\\n#5 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/base.php(907): OC\\\\Route\\\\Router->match('\\\/occ\\\/config:lis...')\\n#6 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/index.php(39): OC::handleRequest()\\n#7 {main}\",\"File\":\"\\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php\",\"Line\":89}","level":3,"time":"2016-10-28T15:08:06+00:00","method":"POST","url":"\/index.php\/occ\/config:list","user":"--"}
{"reqId":"3OydQdy8nVQtWkAzuXxt","remoteAddr":"193.124.178.6","app":"index","message":"Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\QueryException\",\"Message\":\"Could not resolve OCA\\\\Core\\\\Controller\\\\OccController! Class OCA\\\\Core\\\\Controller\\\\OccController does not exist\",\"Code\":0,\"Trace\":\"#0 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(104): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OCA\\\\\\\\Core\\\\\\\\Contro...')\\n#1 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/app.php(97): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\Core\\\\\\\\Contro...')\\n#2 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/routing\\\/routeactionhandler.php(45): OC\\\\AppFramework\\\\App::main('OCA\\\\\\\\Core\\\\\\\\Contro...', 'execute', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#3 [internal function]: OC\\\\AppFramework\\\\routing\\\\RouteActionHandler->__invoke(Array)\\n#4 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/route\\\/router.php(276): call_user_func(Object(OC\\\\AppFramework\\\\routing\\\\RouteActionHandler), Array)\\n#5 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/base.php(907): OC\\\\Route\\\\Router->match('\\\/occ\\\/config:lis...')\\n#6 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/index.php(39): OC::handleRequest()\\n#7 {main}\",\"File\":\"\\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php\",\"Line\":89}","level":3,"time":"2016-10-28T15:08:09+00:00","method":"POST","url":"\/index.php\/occ\/config:list","user":"--"}
{"reqId":"zvdOCgQIUCPc2FJ7mOqW","remoteAddr":"193.124.178.6","app":"index","message":"Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\QueryException\",\"Message\":\"Could not resolve OCA\\\\Core\\\\Controller\\\\OccController! Class OCA\\\\Core\\\\Controller\\\\OccController does not exist\",\"Code\":0,\"Trace\":\"#0 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(104): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OCA\\\\\\\\Core\\\\\\\\Contro...')\\n#1 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/app.php(97): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\Core\\\\\\\\Contro...')\\n#2 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/routing\\\/routeactionhandler.php(45): OC\\\\AppFramework\\\\App::main('OCA\\\\\\\\Core\\\\\\\\Contro...', 'execute', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#3 [internal function]: OC\\\\AppFramework\\\\routing\\\\RouteActionHandler->__invoke(Array)\\n#4 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/route\\\/router.php(276): call_user_func(Object(OC\\\\AppFramework\\\\routing\\\\RouteActionHandler), Array)\\n#5 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/base.php(907): OC\\\\Route\\\\Router->match('\\\/occ\\\/config:lis...')\\n#6 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/index.php(39): OC::handleRequest()\\n#7 {main}\",\"File\":\"\\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php\",\"Line\":89}","level":3,"time":"2016-10-28T15:08:17+00:00","method":"POST","url":"\/index.php\/occ\/config:list","user":"--"}
{"reqId":"ksjEKbCz2B9Vz0ux+VHK","remoteAddr":"193.124.178.6","app":"index","message":"Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\QueryException\",\"Message\":\"Could not resolve OCA\\\\Core\\\\Controller\\\\OccController! Class OCA\\\\Core\\\\Controller\\\\OccController does not exist\",\"Code\":0,\"Trace\":\"#0 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(104): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OCA\\\\\\\\Core\\\\\\\\Contro...')\\n#1 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/app.php(97): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\Core\\\\\\\\Contro...')\\n#2 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/routing\\\/routeactionhandler.php(45): OC\\\\AppFramework\\\\App::main('OCA\\\\\\\\Core\\\\\\\\Contro...', 'execute', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#3 [internal function]: OC\\\\AppFramework\\\\routing\\\\RouteActionHandler->__invoke(Array)\\n#4 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/route\\\/router.php(276): call_user_func(Object(OC\\\\AppFramework\\\\routing\\\\RouteActionHandler), Array)\\n#5 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/base.php(907): OC\\\\Route\\\\Router->match('\\\/occ\\\/config:lis...')\\n#6 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/index.php(39): OC::handleRequest()\\n#7 {main}\",\"File\":\"\\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php\",\"Line\":89}","level":3,"time":"2016-10-28T15:08:22+00:00","method":"POST","url":"\/index.php\/occ\/config:list","user":"--"}
{"reqId":"YOUbmLU0mx\/vTbRnTJEn","remoteAddr":"193.124.178.6","app":"index","message":"Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\QueryException\",\"Message\":\"Could not resolve OCA\\\\Core\\\\Controller\\\\OccController! Class OCA\\\\Core\\\\Controller\\\\OccController does not exist\",\"Code\":0,\"Trace\":\"#0 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(104): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OCA\\\\\\\\Core\\\\\\\\Contro...')\\n#1 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/app.php(97): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\Core\\\\\\\\Contro...')\\n#2 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/routing\\\/routeactionhandler.php(45): OC\\\\AppFramework\\\\App::main('OCA\\\\\\\\Core\\\\\\\\Contro...', 'execute', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#3 [internal function]: OC\\\\AppFramework\\\\routing\\\\RouteActionHandler->__invoke(Array)\\n#4 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/route\\\/router.php(276): call_user_func(Object(OC\\\\AppFramework\\\\routing\\\\RouteActionHandler), Array)\\n#5 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/base.php(907): OC\\\\Route\\\\Router->match('\\\/occ\\\/config:lis...')\\n#6 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/index.php(39): OC::handleRequest()\\n#7 {main}\",\"File\":\"\\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php\",\"Line\":89}","level":3,"time":"2016-10-28T15:08:25+00:00","method":"POST","url":"\/index.php\/occ\/config:list","user":"--"}
{"reqId":"5HqHUKHcueycs76CDrbY","remoteAddr":"193.124.178.6","app":"index","message":"Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\QueryException\",\"Message\":\"Could not resolve OCA\\\\Core\\\\Controller\\\\OccController! Class OCA\\\\Core\\\\Controller\\\\OccController does not exist\",\"Code\":0,\"Trace\":\"#0 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php(104): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OCA\\\\\\\\Core\\\\\\\\Contro...')\\n#1 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/app.php(97): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OCA\\\\\\\\Core\\\\\\\\Contro...')\\n#2 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/routing\\\/routeactionhandler.php(45): OC\\\\AppFramework\\\\App::main('OCA\\\\\\\\Core\\\\\\\\Contro...', 'execute', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#3 [internal function]: OC\\\\AppFramework\\\\routing\\\\RouteActionHandler->__invoke(Array)\\n#4 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/route\\\/router.php(276): call_user_func(Object(OC\\\\AppFramework\\\\routing\\\\RouteActionHandler), Array)\\n#5 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/base.php(907): OC\\\\Route\\\\Router->match('\\\/occ\\\/config:lis...')\\n#6 \\\/etc\\\/caddy\\\/site\\\/owncloud\\\/index.php(39): OC::handleRequest()\\n#7 {main}\",\"File\":\"\\\/etc\\\/caddy\\\/site\\\/owncloud\\\/lib\\\/private\\\/appframework\\\/utility\\\/simplecontainer.php\",\"Line\":89}","level":3,"time":"2016-10-28T15:08:25+00:00","method":"POST","url":"\/index.php\/occ\/config:list","user":"--"}

Integrity status for oC9+

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.
Results
=======
- core
	- INVALID_HASH
		- core/application.php
		- core/controller/occcontroller.php
		- core/routes.php
	- EXTRA_FILE
		- core/application.php.rej
		- core/routes.php.rej
		- core/controller/occcontroller.php.rej
		- updater-904-905.patch
Raw output
==========
Array
(
    [core] => Array
        (
            [INVALID_HASH] => Array
                (
                    [core/application.php] => Array
                        (
                            [expected] => 24d6ccdb10deb0245a5a3eed6a175278a1470ac65e33968ee3c0dfbdbf87bbb696d1c5357672b01e67c1fadd288a41dac73d7171e3b4dd39e8fc8964c96bdbe2
                            [current] => 245fd3078236f219bf2044b05ab6b725a9e8dc26460ffc43758022ef22c2e71016a63fbc5b1ab21609e8ceb8f80719e685cc49361a1de48091847ec6187fb1f4
                        )
                    [core/controller/occcontroller.php] => Array
                    (
                        [expected] => 2e373acef32cdca473ac3f01282ad2f52901f36a9daa8457f1e368805e5184d1b8f6f9c3f1bb1548823a8cbeb9c1ded92ec0f9b37ac83fad585276492ca8cb63
                        [current] => 173619becc129ae7e3eefefd8d3b66e5f7c6602bbe46d030b55f8be23f08eaa7b34397b9fa5fdeb8e31a333cac8f1f9f3220566859c12f11ad0dc0c7aae44da7
                    )

                [core/routes.php] => Array
                    (
                        [expected] => 14dfd494a129d0c2e02ce7abe2c52d462d3235da88f8c2b2643fe41ebcdf987fdbeb9c90716ada826a0b2fc0affc8e8ebbd5c5d4eb1f93ee617c4ea8f68eee2c
                        [current] => 0e3e2a768b41fd4fd8f9dd46218d6c3fe27aa080992de9cab0052a434524782261fdce45d614be74049b94aef7e6872d3fd59c9451fa92eb37046e5b3a73c1ac
                    )

            )

        [EXTRA_FILE] => Array
            (
                [core/application.php.rej] => Array
                    (
                        [expected] => 
                        [current] => c95c0b1cfc8a29288f6446e61ce4e838068b325b30b9fbac8a04fa2b860b69661e09b577826bc706230fceb3fccaa20aa2a8f9a6fc143b1b5106505303e13db1
                    )

                [core/routes.php.rej] => Array
                    (
                        [expected] => 
                        [current] => d9913b981abb68db6ed14fa15052320656a3e10dea63d1d8c7684c217b8fba5fa900e86af673f5654fd066943043475ccefbc48ffad6ece4bb32a8ef337de23a
                    )

                [core/controller/occcontroller.php.rej] => Array
                    (
                        [expected] => 
                        [current] => ed027a46864dec4b7512c1bb57cbc959dead6f59d9add47a9dde973ea0bce529285d418ee5ea2b4208c82a2ee9ecb218dfd1d92d2ed95ab19a112579a881d569
                    )

                [updater-904-905.patch] => Array
                    (
                        [expected] => 
                        [current] => fa7b63ce4223b9d9b139bb2c69cc4c66d06fd3abc5a890def397ade9dea92e9748383489e2acd5e7ef7fb2511b052b6d1c899a562948deea84be2fd8bdd04eda
                    )

            )

    )
)

Updater Bug Version 9.0.4 to 9.0.5
#2

Hi,

just don't rely on the updater app. In the time you're fiddling around with the patch and the updater app you could have done a manual update to 9.0.5


#3

The problem is:
# sudo -u caddy php occ upgrade
ownCloud is already latest version


#4

occ upgrade will never check for updates or install updated files for you. It just runs the final database upgrade routines as explained at various documentations.

See the documentation available here how to do the manual steps:

https://doc.owncloud.org/server/latest/admin_manual/maintenance/manual_upgrade.html