otetard / ownpad

Ownpad is a Nextcloud application that allows to create and open Etherpad and Ethercalc documents.
GNU Affero General Public License v3.0
58 stars 25 forks source link

Update to NextCloud 12.0.5 Stable broken #52

Closed stuckinger closed 5 years ago

stuckinger commented 6 years ago

I recently updated my NextCloud instance. All Apps seemed to work fine except ownpad:

Update app ownpad from appstore                        
An unhandled exception has been thrown:               
TypeError: Argument 2 passed to OC_App::executeRepairSteps() must be of the type array, null given, called in /var/www/nextcloud/lib/private/legacy/app.php on line 1045 and defined in /var/www/nextcloud/lib/private/legacy/app.php:1093
Stack trace:                                             
#0 /var/www/nextcloud/lib/private/legacy/app.php(1045): OC_App::executeRepairSteps('ownpad', NULL)
#1 /var/www/nextcloud/lib/private/Installer.php(200): OC_App::updateApp('ownpad')
#2 /var/www/nextcloud/lib/private/Updater.php(471): OC\Installer->updateAppstoreApp('ownpad')
#3 /var/www/nextcloud/lib/private/Updater.php(271): OC\Updater->upgradeAppStoreApps(Array)
#4 /var/www/nextcloud/lib/private/Updater.php(130): OC\Updater->doUpgrade('12.0.5.3', '12.0.4.3')
#5 /var/www/nextcloud/core/Command/Upgrade.php(263): OC\Updater->upgrade()
#6 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(256): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/nextcloud/3rdparty/symfony/console/Application.php(818): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/nextcloud/3rdparty/symfony/console/Application.php(186): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/nextcloud/3rdparty/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/nextcloud/lib/private/Console/Application.php(170): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#12 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#13 {main}                                              

NextCloud Versions: 12.0.4.3 => 12.0.5.3

My workaround to finish the update was the following: /var/www/nextcloud/lib/private/legacy/app.php

1044a1045,1046
>               if($appData == NULL?1:$appData['repair-steps']==NULL?1:$appData['repair-steps']['pre-migration']==NULL?1:0)
>                       return false;

This way the update finished even though after that I am missing owncloud app.

Anyone who can confirm this?

otetard commented 6 years ago

This seems to be related to 87f078881026235805ac169ec8ccceef3f165ec6.

I didn’t manage to reproduce that bug. In my case, the second argument given to OC_App::executeRepairSteps() was the awaited array. Do you remember which Ownpad version was installed before you upgrade Nextcloud?

By reviewing the code I fixed an issue but this should not be related.

stuckinger commented 6 years ago

Thank you for reviewing so fast! I know I was missing the pad version but could not find it. Fortunately in my database dump I could find the previous version - hopefully the correct one. 'ownpad' 'installed_version' '0.5.10'

Just for your info: I rolled back my mentioned patch of course ;-) Even though one might think about a check to handle situations like this? But honestly I have not idea which side effects this had to my installation... So far everything seems to work fine beside ownpad app.

Edit: I still have the notification that there is an update for ownpad to 0.6.2 available. But I cannot find the app any more - it is completely gone...

otetard commented 6 years ago

Thanks for the feedback!

I tried to reproduce your situation by setting up Nextcloud 12.0.4 with Ownpad 0.5.10 and then upgrade Nextcloud to version 12.0.5 (upgrade was done using the CLI). I didn’t encounter any difficulties :(.

I’ll push right now a new 0.6.3 version to the app store to address the issue mentioned in my earlier comment.

Olivier;

stuckinger commented 6 years ago

Do you have any idea how to get the app back to my NextCloud instance? It does not show up in the store. I changed the activated flag in the database - still no change. I moved the folder away - no change. I guess I'm a bit too new to NextCloud to understand how apps are recognized/initialized... But I guess there must be a correct way to 'reset' an app?

otetard commented 5 years ago

I close this issue since it's concerning an old Nextcloud release. Feel free to reopen it if the issue is still relevant.