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

Manual upgrade with occ command from 13.0.6 to 14.0.3 throws unhandled exception #12516

Closed
lentidas opened this issue Nov 18, 2018 · 6 comments
Closed
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: install and update

Comments

@lentidas
Copy link

Steps to reproduce

  1. Perform manual upgrade from 13.0.6 to 14.0.3 using sudo -u www-data php /var/www/nextcloud/occ upgrade

Expected behaviour

Upgrade should run and complete (this has been my upgrade method for the past year without any issue!).

Actual behaviour

occ command throws an unhandled exception

An unhandled exception has been thrown:
TypeError: Argument 4 passed to OCA\Theming\ThemingDefaults::__construct() must implement interface OCP\Files\IAppData, instance of OC\Memcache\Factory given, called in /var/www/nextcloud/lib/private/Server.php on line 952 and defined in /var/www/nextcloud/apps/theming/lib/ThemingDefaults.php:93
Stack trace:
#0 /var/www/nextcloud/lib/private/Server.php(952): OCA\Theming\ThemingDefaults->__construct(Object(OC\AllConfig), Object(OC\L10N\L10N), Object(OC\URLGenerator), Object(OC\Memcache\Factory), Object(OCA\Theming\Util), Object(OCA\Theming\ImageManager), Object(OC\App\AppManager))
#1 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#2 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet('ThemingDefaults')
#3 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('ThemingDefaults')
#4 /var/www/nextcloud/lib/private/Server.php(1857): OC\ServerContainer->query('ThemingDefaults')
#5 /var/www/nextcloud/lib/private/Console/Application.php(71): OC\Server->getThemingDefaults()
#6 /var/www/nextcloud/console.php(93): OC\Console\Application->__construct(Object(OC\AllConfig), Object(Symfony\Component\EventDispatcher\EventDispatcher), Object(OC\AppFramework\Http\Request), Object(OC\Log), Object(OC\MemoryInfo))
#7 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#8 {main}

Server configuration

Operating system: Debian 9.6

Web server: 2.4.25

Database: MariaDB 10.1.26-MariaDB-0+deb9u1

PHP version: 7.0.30-0+deb9u1

Nextcloud version: 14.0.3

Updated from an older Nextcloud/ownCloud or fresh install: Update process from 13.0.6 to 14.0.3

Where did you install Nextcloud from: Nextcloud website

Signing status: Can't login right now.

List of activated apps: occ command also won't run when trying to get app:list

App list
An unhandled exception has been thrown:
TypeError: Argument 4 passed to OCA\Theming\ThemingDefaults::__construct() must implement interface OCP\Files\IAppData, instance of OC\Memcache\Factory given, called in /var/www/nextcloud/lib/private/Server.php on line 952 and defined in /var/www/nextcloud/apps/theming/lib/ThemingDefaults.php:93
Stack trace:
#0 /var/www/nextcloud/lib/private/Server.php(952): OCA\Theming\ThemingDefaults->__construct(Object(OC\AllConfig), Object(OC\L10N\L10N), Object(OC\URLGenerator), Object(OC\Memcache\Factory), Object(OCA\Theming\Util), Object(OCA\Theming\ImageManager), Object(OC\App\AppManager))
#1 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC\{closure}(Object(OC\Server))
#2 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet('ThemingDefaults')
#3 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query('ThemingDefaults')
#4 /var/www/nextcloud/lib/private/Server.php(1857): OC\ServerContainer->query('ThemingDefaults')
#5 /var/www/nextcloud/lib/private/Console/Application.php(71): OC\Server->getThemingDefaults()
#6 /var/www/nextcloud/console.php(93): OC\Console\Application->__construct(Object(OC\AllConfig), Object(Symfony\Component\EventDispatcher\EventDispatcher), Object(OC\AppFramework\Http\Request), Object(OC\Log), Object(OC\MemoryInfo))
#7 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#8 {main}

Nextcloud configuration:

config.php
<?php
$CONFIG = array (
  'instanceid' => 'ID',
  'passwordsalt' => 'SALT',
  'secret' => 'SECRET',
  'trusted_domains' => 
  array (
    0 => 'DOMAIN0',
    1 => 'DOMAIN1',
  ),
  'datadirectory' => '/mnt/nextcloud_data',
  'overwrite.cli.url' => 'https://DOMAIN',
  'htaccess.RewriteBase' => '/',
  'dbtype' => 'mysql',
  'version' => '13.0.6.1',
  'dbname' => 'nextclouddb',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'SQLPASSWORD',
  'installed' => true,
  'default_language' => 'en',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpsecure' => 'ssl',
  'mail_from_address' => 'no-reply',
  'mail_domain' => 'DOMAIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'MAILPROVIDER',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'ADDRESS',
  'mail_smtppassword' => 'PASSWORD',
  'loglevel' => 2,
  'maintenance' => false,
);

Are you using external storage, if yes which one: No

Are you using encryption: No

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Doesn't apply.

Operating system: Doesn't apply.

Logs

Web server error log

Web server error log
No relevant server log.

Nextcloud log (data/nextcloud.log)

Nextcloud log
...
...
...

{"reqId":"848iPZk8VzHUitiG5dVA","level":3,"time":"2018-11-18T09:47:45+00:00","remoteAddr":"172.16.20.12","user":"--","app":"PHP","method":"OPTIONS","url":"\/remote.php\/dav\/principals\/users\/goncaloheleno\/","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"iOS\/12.0 (16A366) dataaccessd\/1.0","version":"13.0.6.1"}
{"reqId":"eJNT6CeaGS0pYXP4scId","level":4,"time":"2018-11-18T09:47:45+00:00","remoteAddr":"172.16.20.12","user":"--","app":"webdav","method":"PROPFIND","url":"\/remote.php\/dav\/principals\/users\/goncaloheleno\/","message":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952","Code":0,"Trace":[{"function":"{closure}","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[{"__class__":"Closure"},["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":466,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["beforeMethod",["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]]},{"file":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameter replaced ***","*** sensitive parameter replaced ***"]},{"file":"\/var\/www\/nextcloud\/remote.php","line":72,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/remote.php","line":168,"function":"handleException","args":[{"__class__":"TypeError"}]}],"File":"\/var\/www\/nextcloud\/remote.php","Line":70,"CustomMessage":"--"},"userAgent":"iOS\/12.0 (16A366) dataaccessd\/1.0","version":"13.0.6.1"}
{"reqId":"iAYM3Fcmsc9dIWaVZjJ2","level":3,"time":"2018-11-18T09:48:01+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"e68ZvUqAityaS8ZCmXmD","level":3,"time":"2018-11-18T09:48:33+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"YNcJsgjvOIz1mQAEDMX3","level":3,"time":"2018-11-18T09:49:05+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"UgH5ijpiCr5S0QzgDNhD","level":3,"time":"2018-11-18T09:49:37+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"tyDrLyvJRN6TXtAiYDBm","level":3,"time":"2018-11-18T09:50:09+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"aQW2AKlqCEWbgcBvOb2d","level":3,"time":"2018-11-18T09:50:41+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"U5pS1fBQXUlfbnf9hICB","level":3,"time":"2018-11-18T09:51:13+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"fEFB4B5NwqD7RMnvP2Qp","level":3,"time":"2018-11-18T09:51:45+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"f6ynwOLWLjERJfrBbS0R","level":3,"time":"2018-11-18T09:52:17+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"MHEIIxkeDhZWjg0D67ue","level":3,"time":"2018-11-18T09:52:49+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"vPSIOnP50NMxPS5Vtd6l","level":3,"time":"2018-11-18T09:53:21+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"0tPSnst7q6pyQUb6LL5m","level":3,"time":"2018-11-18T09:53:53+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"VgUXsUjYtulfy6dyzDCl","level":3,"time":"2018-11-18T09:54:25+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"6dN3ehe7lFPjW61LxWp0","level":3,"time":"2018-11-18T09:54:57+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"yFpIiYPHXJ2FD0aHuuSX","level":3,"time":"2018-11-18T09:55:29+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"zAa4aXUplhTry02fcYaU","level":3,"time":"2018-11-18T09:56:01+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"BixdYfK10yc3JnrojswS","level":3,"time":"2018-11-18T09:56:33+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}
{"reqId":"7ShLVlzCgxFtzBjpjoMb","level":3,"time":"2018-11-18T09:57:05+00:00","remoteAddr":"172.16.20.11","user":"--","app":"PHP","method":"GET","url":"\/status.php","message":"TypeError: Argument 4 passed to OCA\\Theming\\ThemingDefaults::__construct() must implement interface OCP\\Files\\IAppData, instance of OC\\Memcache\\Factory given, called in \/var\/www\/nextcloud\/lib\/private\/Server.php on line 952 at \/var\/www\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php#93","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.6.1"}

Browser log

Browser log
Doesn't apply.
@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #4573 (occ upgrade from 11.0.2 to 11.0.3 showing no upgrade), #10954 (OCC upgrade throws unhandled exception), #11784 (14.0.3), #10932 (13.0.6), and #11239 (occ command throws exception: TypeError: realpath() null given).

@lentidas
Copy link
Author

Tried updating from 13.0.6 to 13.0.7 using the same method and that was successful. I will try to update to version 14.0.3 from 13.0.7 to see if that will work.

@MorrisJobke
Copy link
Member

Let' close this for now. We can reopen it if this happens again.

@lentidas
Copy link
Author

lentidas commented Dec 1, 2018

Let' close this for now. We can reopen it if this happens again.

Could you please reopen this issue?

Only this weekend I had another chance to try upgrading my server and the error persists when upgrading from 13.0.x to 14.0.x. Every log and setting is the same.

For what it's worth, upgrading from 13.0.7 to 13.0.8 went smoothly! The problem only happens with versions >= 14.0.0.

To complement the information above, my upgrade routine is based on Nextcloud documentation and is the following:

service apache2 stop

rm -Rv /root/nextcloud/backups/nextcloud-*
cd /root/nextcloud/backups && rsync -Aaxv /var/www/nextcloud/ /root/nextcloud/backups/nextcloud-dirbkp_`date +"%Y%m%d"`/ && mysqldump --single-transaction -h localhost -u nextcloud -p[password] nextclouddb > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak && history -c

cd /root/nextcloud/downloads && wget https://download.nextcloud.com/server/releases/nextcloud-X.X.X.zip

unzip nextcloud-X.X.X.zip

rm -Rv /var/www/nextcloud-old && mv -v /var/www/nextcloud /var/www/nextcloud-old

mv -v /root/nextcloud/downloads/nextcloud /var/www

cp /var/www/nextcloud-old/config/config.php /var/www/nextcloud/config/config.php

cp -Rv /var/www/nextcloud-old/apps /var/www/nextcloud/

chown www-data:www-data /var/www/nextcloud/ -R

service apache2 start && sudo -u www-data php /var/www/nextcloud/occ upgrade

@MorrisJobke MorrisJobke reopened this Dec 3, 2018
@MorrisJobke MorrisJobke added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Dec 3, 2018
@sebastian-orlowski
Copy link

sebastian-orlowski commented Dec 21, 2018

I get exactly the same stacktrace while upgrading from Nextcloud 13.0.8 to either 14.0.0 or 14.0.4 with the official docker image of Nextcloud, enhanced by some modifications to run cron as recommended in the Nextcloud documentation.

I also tried disabling all apps before calling "occ upgrade" using "sudo -u www-data ./occ app:disable", but this command triggered the same error and stacktrace.

Update: By deactivating the theming app in the old instance before shutting it down and starting the upgrade, the database conversion worked without problems for me. I simply re-activated the theming app afterwards, and everything was fine.

@MorrisJobke
Copy link
Member

cp -Rv /var/www/nextcloud-old/apps /var/www/nextcloud/

You copied over the old apps. You only should copy over non-shipped apps and not all apps. That is the reason for this breakage. The theming app is shipped inside the release under apps/theming and needs to be as of the version in the release tar ball. This is also the reason why we recommend to user the built-in updater - it takes care of all of those tiny steps.

See https://docs.nextcloud.com/server/stable/admin_manual/maintenance/update.html for more details.

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 feature: install and update
Projects
None yet
Development

No branches or pull requests

5 participants