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

[Upgrade 9.0.4=>9.1 error] undefined method OCA\Federation\AppInfo\Application::setupCron() #25552

Closed
buggy82 opened this Issue Jul 21, 2016 · 17 comments

Comments

Projects
None yet
6 participants
@buggy82

buggy82 commented Jul 21, 2016

Steps to reproduce

  1. Upgrade OC 9.0.4 to 9.1 by running ./occ upgrade

Expected behaviour

Upgrade without error

Actual behaviour

Updating ...
An unhandled exception has been thrown:
Error: Call to undefined method OCA\Federation\AppInfo\Application::setupCron() in /var/www/owncloud/apps/federation/appinfo/update.php:23
Stack trace:
#0 /var/www/owncloud/lib/private/legacy/app.php(1192): include()
#1 /var/www/owncloud/lib/private/Updater.php(374): OC_App::updateApp('federation')
#2 /var/www/owncloud/lib/private/Updater.php(251): OC\Updater->doAppUpgrade()
#3 /var/www/owncloud/lib/private/Updater.php(150): OC\Updater->doUpgrade('9.1.0.15', '9.0.4.1')
#4 /var/www/owncloud/core/Command/Upgrade.php(290): OC\Updater->upgrade()
#5 /var/www/owncloud/3rdparty/symfony/console/Command/Command.php(259): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/owncloud/3rdparty/symfony/console/Application.php(844): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/owncloud/3rdparty/symfony/console/Application.php(192): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/owncloud/3rdparty/symfony/console/Application.php(123): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/owncloud/lib/private/Console/Application.php(146): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/owncloud/console.php(94): OC\Console\Application->run()
#11 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#12 {main}root@owncloud:/var/www/owncloud

Server configuration

Operating system:
Debian 8.5
Web server:
Apache 2.4.x
Database:
MariaDB
PHP version:
7.0.8 NTS
ownCloud version: (see ownCloud admin page)

Updated from an older ownCloud or fresh install:
Updated
Where did you install ownCloud from:
Extracted ZIP Archive downloaded from owncloud.org overwriting previous owncloud installation files.
Signing status (ownCloud 9.0 and above):
Not possible:
sudo -uwww-data ./occ maintenance:mode --off
ownCloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Maintenance mode disabled
Running upgrade from WebUI or occ ends in error again.

List of activated apps:

Enabled:

  • activity: 2.2.1
  • comments: 0.2
  • dav: 0.1.6
  • external: 1.2
  • federatedfilesharing: 0.3.0
  • federation: 0.0.4
  • files: 1.4.4
  • files_external: 0.5.2
  • files_pdfviewer: 0.8.1
  • files_sharing: 0.9.1
  • files_trashbin: 0.8.0
  • files_versions: 1.2.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 15.0.0
  • notifications: 0.2.3
  • provisioning_api: 0.5.0
  • systemtags: 0.2
  • updatenotification: 0.2.1

Disabled:

  • announcementcenter
  • bookmarks
  • calendar
  • contacts
  • direct_menu
  • documents
  • documents-8.2
  • encryption
  • files_antivirus
  • files_texteditor
  • ownnote
  • search_lucene
  • shorten
  • storagecharts2
  • templateeditor
  • user_external
  • user_ldap

The content of config/config.php:

{
"system": {
"instanceid": "ocdk1eapk72r",
"passwordsalt": "_REMOVED SENSITIVE VALUE",
"secret": "_REMOVED SENSITIVE VALUE
",
"trusted_domains": [
_REMOVED MULTIPLE DOMAINS_
],
"activity_expire_days": 90,
"datadirectory": "/var/owncloud/data",
"overwrite.cli.url": "https://owncloud.r4apps.com",
"dbtype": "mysql",
"version": "9.0.4.1",
"dbname": "owncloud",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"dbuser": "_REMOVED SENSITIVE VALUE",
"dbpassword": "_REMOVED SENSITIVE VALUE
",
"logtimezone": "UTC",
"installed": true,
"filelocking.enabled": "true",
"memcache.locking": "\OC\Memcache\Redis",
"memcache.local": "\OC\Memcache\Redis",
"redis": {
"host": "/var/run/redis/redis.sock",
"port": 0,
"timeout": 0
},
"maintenance": true,
"loglevel": 0,
"theme": "",
"mail_from_address": "noreply",
"mail_smtpmode": "sendmail",
"mail_domain": "_REMOVED DOMAIN_",
"mail_smtpsecure": "tls",
"updatechecker": false,
"htaccess.RewriteBase": "/"
}
}


**Are you using external storage, if yes which one:** local/smb/sftp/...
no
**Are you using encryption:** yes/no
no
**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...
no

### Logs
#### Web server error log

Insert your webserver log here


#### ownCloud log (data/owncloud.log)
{"reqId":"tKvME+vv3dpANFDEmcFN","remoteAddr":"xxx.xxx.xxx.xxx","app":"index","message":"Exception: {\"Exception\":\"OC\\\\NeedsUpdateException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php(119): OC_App::loadApp('federation')\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(861): OC_App::loadApps(Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/index.php(39): OC::handleRequest()\\n#3 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php\",\"Line\":147}","level":3,"time":"2016-07-21T12:12:52+00:00","method":"GET","url":"\/index.php\/core\/js\/oc.js?v=3512d2f95b1cc5777df0bafa593bb4ac","user":"--"}
{"reqId":"L9B\/zXsLQ81W5nbq9Kim","remoteAddr":"185.28.4.121","app":"core","message":"starting upgrade from 9.0.4.1 to 9.1.0.15","level":0,"time":"2016-07-21T12:12:57+00:00","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=GUhELCYpd3sIcgENFzRKIE0%2BVzRrKgUJGipsC0IqBw4%3D%3AApruaE1NR9oCFb%2FE9dcpDEB9bS4n6Ksb5MhNwkb2rpk%3D","user":"--"}
{"reqId":"L9B\/zXsLQ81W5nbq9Kim","remoteAddr":"185.28.4.121","app":"PHP","message":"Error: Call to undefined method OCA\\Federation\\AppInfo\\Application::setupCron() at \/var\/www\/owncloud\/apps\/federation\/appinfo\/update.php#23","level":3,"time":"2016-07-21T12:14:53+00:00","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=GUhELCYpd3sIcgENFzRKIE0%2BVzRrKgUJGipsC0IqBw4%3D%3AApruaE1NR9oCFb%2FE9dcpDEB9bS4n6Ksb5MhNwkb2rpk%3D","user":"--"}

@ghost

This comment has been minimized.

ghost commented Jul 21, 2016

@buggy82

Extracted ZIP Archive downloaded from owncloud.org overwriting previous owncloud installation files.

This is a wrong done upgrade. Please follow the instructions provided in the documentation:

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

If you do a manual upgrade you need to delete all files and folders except /data/ and /config/ before copying over the new files.

@buggy82

This comment has been minimized.

buggy82 commented Jul 21, 2016

This solved it. An autoloader probably loaded an outdated class file, which wasn´t overwritten in 9.1.
Thanks!

@buggy82 buggy82 closed this Jul 21, 2016

@juliangieseke

This comment has been minimized.

juliangieseke commented Jul 22, 2016

Same problem here - but i renamed the old folder, copied config.php and did 'php occ upgrade' - so no chance for old files…

deleting all (9.1.0) files and restarting the upgrade worked… weird bug.

@ghost

This comment has been minimized.

ghost commented Jul 26, 2016

deleting all (9.1.0) files and restarting the upgrade worked… weird bug.

Probably some caching (like APCu) in place here. Thats why the upgrading manual is suggesting to restart the webserver:

  1. Restart your Web server.

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

@kinsi55

This comment has been minimized.

kinsi55 commented Aug 2, 2016

Had the same issue, eventhough no old files are there.

Workaround to get the upgrade to run though:

Edit apps/dav/appinfo/update.php, comment out the line $app->setupCron();. Start update, and uncomment it after again (Optional i guess since it doesnt exist anways?)

@simogeo

This comment has been minimized.

simogeo commented Oct 17, 2016

@kinsi55 : Same here

@DeepDiver1975

This comment has been minimized.

Member

DeepDiver1975 commented Oct 17, 2016

The file update.php shall not be there.

@j-ed

This comment has been minimized.

Contributor

j-ed commented Nov 25, 2016

@DeepDiver1975 Which update.php do you mean, apps/federation/appinfo/update.php or apps/dav/appinfo/update.php ?

@ghost

This comment has been minimized.

ghost commented Nov 25, 2016

@j-ed the /apps/federation/appinfo/update.php

If people are not doing a correct upgrade by deleting all old files and folders except /data/ and /config/ and just copy over the old files over the new files this issue will appear.

@j-ed

This comment has been minimized.

Contributor

j-ed commented Nov 25, 2016

@RealRancor Thank you, I always delete all legacy files before I install new ones but it seems that not all users are applying an update in the same way.

@kinsi55

This comment has been minimized.

kinsi55 commented Nov 25, 2016

@j-ed @RealRancor i used the built-in (auto) updator and still experienced that error back then.

@ghost

This comment has been minimized.

ghost commented Nov 27, 2016

@j-ed Good way. Thats probably also the reason why i didn't have a single update and upgrade issue in the past (in contrast to other peeps) on my oC instance running since oC 4.0.something

@kinsi55 Are you really sure? IIRC there were no single report about such a behavior of the updater app in the past.

@kinsi55

This comment has been minimized.

kinsi55 commented Nov 27, 2016

@RealRancor yes i am sure, i think though that the updater "crashed" and i had to re-start it which is when this happened from what i remember. After commenting out that line the updater worked fine.

@ghost

This comment has been minimized.

ghost commented Nov 27, 2016

Ah, a crashed updater app might explain that.

In general a "pro-tip": Never do upgrades with the updater app but do the manual upgrade as suggested above: #25552 (comment) and explained in https://doc.owncloud.org/server/latest/admin_manual/maintenance/manual_upgrade.html

With that you're on the "safe side" and don't need to worry about such issues.

@kinsi55

This comment has been minimized.

kinsi55 commented Nov 27, 2016

@RealRancor Well i do not use oC anymore, but thanks for the tip :)

@ghost

This comment has been minimized.

ghost commented Nov 27, 2016

If you have migrated to the OtherCloud then its also valid there :)

@kinsi55

This comment has been minimized.

kinsi55 commented Nov 27, 2016

What Other Cloud? But no, i own a Synology DS now

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