server icon indicating copy to clipboard operation
server copied to clipboard

occ issue on upgrading from 12.0.2 to 12.0.3 and 12.0.4RC2

Open Devices opened this issue 9 years ago • 6 comments

Steps to reproduce

I follow this page to upgrade: https://docs.nextcloud.com/server/12/admin_manual/maintenance/manual_upgrade.html When I run sudo -u nginx php occ upgrade I get the following error:

occerror.txt

Server configuration

Operating system: Fedora 27 Web server: nginx 1.12.1 Database: mariadb 10.2.9 PHP version: 7.1.11 Nextcloud version: (see Nextcloud admin page) 12.0.2 Updated from an older Nextcloud/ownCloud or fresh install: updated from 12 or 12.0.1, can't remember exactly Where did you install Nextcloud from: Downloaded it from the website.

php config if it helps: config.txt

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

Journalctl logs if it's useful at all: journalctllogs.txt

I tried it with SELinux disabled (sudo setenforce 0) and it didn't change anything, same error. If you have additional questions or want me to try something, please do. I hope my report is complete enough.

Devices avatar Nov 28 '17 14:11 Devices

$ /v/w/nextcloud> sudo -u nginx php occ upgrade
An unhandled exception has been thrown:
TypeError: Argument 4 passed to OCA\Theming\ThemingDefaults::__construct() must be an instance of OC_Defaults, instance of OC\Files\AppData\AppData given, called in /var/www/nextcloud/lib/private/Server.php on line 881 and defined in /usr/share/nextcloud/apps/theming/lib/ThemingDefaults.php:58
Stack trace:
#0 /var/www/nextcloud/lib/private/Server.php(881): OCA\Theming\ThemingDefaults->__construct(Object(OC\AllConfig), Object(OC\L10N\L10N), Object(OC\URLGenerator), Object(OC\Files\AppData\AppData), Object(OC\Memcache\Factory), Object(OCA\Theming\Util))
#1 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#2 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(115): 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(1672): OC\ServerContainer->query('ThemingDefaults')
#5 /var/www/nextcloud/lib/private/Console/Application.php(59): OC\Server->getThemingDefaults()
#6 /var/www/nextcloud/console.php(98): OC\Console\Application->__construct(Object(OC\AllConfig), Object(Symfony\Component\EventDispatcher\EventDispatcher), Object(OC\AppFramework\Http\Request), Object(OC\Log))
#7 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#8 {main}

cc @nextcloud/theming

But it looks weird :/

MorrisJobke avatar Nov 28 '17 15:11 MorrisJobke

Could you show the content of apps/theming/lib/ThemingDefaults.php?

MorrisJobke avatar Nov 28 '17 15:11 MorrisJobke

The config.php says, that you run that on a 9.1.4.2 which is our version number for 10.0.4. Could you check what is written in version.php?

MorrisJobke avatar Nov 28 '17 15:11 MorrisJobke

@MorrisJobke

Content of ThemingDefaults.php

ThemingDefaults.txt

version.php

<?php                                                
$OC_Version = array(12,0,4,1);                       
$OC_VersionString = '12.0.4 RC2';                    
$OC_Edition = '';                                    
$OC_Channel = 'stable';                              
$OC_VersionCanBeUpgradedFrom = array (               
  'nextcloud' =>                                     
  array (                                            
    '11.0' => true,                                  
    '12.0' => true,                                  
  ),                                                 
  'owncloud' =>                                      
  array (                                            
    '10.0.0.12' => true,                             
    '10.0.1.5' => true,                              
    '10.0.2.1' => true,                              
    '10.0.3.3' => true,                              
    '10.0.4' => true,                                
  ),
);

I changed the version to 12.0.2, but that produced the same error as posted in the original post. But it seems that maybe a different number may be required, since 9.1.4.2 means 10.0.4. I also tried 12.0, since it says '12.0' => true,, but to no avail.

Devices avatar Nov 28 '17 17:11 Devices

I changed the version to 12.0.2, but that produced the same error as posted in the original post. But it seems that maybe a different number may be required, since 9.1.4.2 means 10.0.4. I also tried 12.0, since it says '12.0' => true,, but to no avail.

Never change the version in config.php. If you do this it will mess up with the migration steps and cause weird issues.

MorrisJobke avatar Nov 28 '17 19:11 MorrisJobke

Never change the version in config.php. If you do this it will mess up with the migration steps and cause weird issues.

Thanks to this I went to check my nextcloud-old folder to see what version that had, and it appears to be different than I copied over. Must have copied from an older backup.

I'm very sorry for wasting your and anyone's time.

Devices avatar Nov 28 '17 20:11 Devices