"An unhandled exception has been thrown" when upgrading to 19.0.2 with NCP

I am running an NCP Instance on a standard Debian system an having issues upgrading with ncp-update

An upgrade to 18.0.8 using the Nextcloud Updater works, but upgrading to 19.0.2 using the ncp updater (webui or CLI) was throwing the same error again.
I tried upgrading from 18.0.7 to 19.0.2 upfront, but this didn’t work either.

 Starting ...
 0/1 [>---------------------------]   0%An unhandled exception has been thrown:
TypeError: Argument 1 passed to Symfony\Component\Console\Helper\ProgressBar::advance() must be of the type int, string given, called in /var/www/nextcloud/core/Command/Upgrade.php on line 144 and defined in /var/www/nextcloud/3rdparty/symfony/console/Helper/ProgressBar.php:310
Stack trace:
#0 /var/www/nextcloud/core/Command/Upgrade.php(144): Symfony\Component\Console\Helper\ProgressBar->advance('Deleted tessdat...')
#1 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(264): OC\Core\Command\Upgrade->OC\Core\Command\{closure}(Object(Symfony\Component\EventDispatcher\GenericEvent), '\\OC\\Repair::adv...', Object(Symfony\Component\EventDispatcher\EventDispatcher))
#2 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(239): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(Array, '\\OC\\Repair::adv...', Object(Symfony\Component\EventDispatcher\GenericEvent))
#3 /var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, '\\OC\\Repair::adv...', Object(Symfony\Component\EventDispatcher\GenericEvent))
#4 /var/www/nextcloud/lib/private/EventDispatcher/SymfonyAdapter.php(70): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(Symfony\Component\EventDispatcher\GenericEvent), Object(Symfony\Component\EventDispatcher\GenericEvent))
#5 /var/www/nextcloud/lib/private/Repair.php(201): OC\EventDispatcher\SymfonyAdapter->dispatch('\\OC\\Repair::adv...', Object(Symfony\Component\EventDispatcher\GenericEvent))
#6 /var/www/nextcloud/lib/private/Repair.php(232): OC\Repair->emit('\\OC\\Repair', 'advance', Array)
#7 /var/www/nextcloud/apps/ocr/lib/Migration/CleanupTessdata.php(48): OC\Repair->advance('Deleted tessdat...')
#8 /var/www/nextcloud/lib/private/Repair.php(103): OCA\Ocr\Migration\CleanupTessdata->run(Object(OC\Repair))
#9 /var/www/nextcloud/lib/private/legacy/OC_App.php(976): OC\Repair->run()
#10 /var/www/nextcloud/lib/private/App/AppManager.php(412): OC_App::executeRepairSteps('ocr', Array)
#11 /var/www/nextcloud/lib/private/Updater.php(410): OC\App\AppManager->disableApp('ocr', true)
#12 /var/www/nextcloud/lib/private/Updater.php(253): OC\Updater->checkAppsRequirements()
#13 /var/www/nextcloud/lib/private/Updater.php(130): OC\Updater->doUpgrade('', '')
#14 /var/www/nextcloud/core/Command/Upgrade.php(255): OC\Updater->upgrade()
#15 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1012): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/nextcloud/3rdparty/symfony/console/Application.php(272): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/nextcloud/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#21 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#22 {main}Abort

This is a reference post, with the same problem, but a fix I cannot apply

A github issue, which was closed because of “not a support forum” but I am not sure if this is not really something NCP could/should fix

These github issues have been resolved/fixed and closed.

One should not assume that yours is the same problem unless it can be verified and reproduced by others. Simply saying you have same problem can even be counterproductive, unless the logs to support that, are included.

You can run ncp-report and share output via pastebin or similar, to make it easier for others to help.

1 Like

As I said already, it’s best if you try updating with the Nextcloud Updater in the settings again. Not with the NCP. It throws easy to understand error reports. (for me at least, because I am pretty new to all this)
If you set your Updater to Beta it should find nc19.0.2 now

The problem is, that based on
It is highly recommended to use these tools, other methods, including NC's native updater, may or may not work, use at your own risk.

This is not recommended :wink: and since NC version 13 - I never had any issues with NCP. I would be happy, if someone would/could point me to a location where the error causing this is properly reported :smiley:

Already did that:

Output should reveal issues with your setup.

So the problem (in terms of providing support) presently is : you not providing the output generated by ncp-report.

NC’s native updater may work for you, as it does for many other NC users. Have you tried it?
NCP’s updater is a little more robust but does the same in the end. If you used ncp tools to create backups, it should be no problem if an update goes wrong, you can still use nc-restore to go back to a working NC.

@OliverV sorry, I missed your message ;( and only read the one from @SimonWolf

After upgrading to 18.0.8 and deactivating the OCR app

I followed your suggestion running the Updater directly from the NC-Webui. Besides some missing indices and columns, which I added using the occ commands it seems to work.

Something I do not understand
The app reported the apps rainloop and talk as incompatible and deactived it, but after the update was finished, the apps are activated and not marked as incompatible.

Anyhow, I went the “non official NCP road” and it worked.


Looks like a bug in the updater that gets hit with the OCR app? or maybe it’s a bug from the OCR app itself …

At the end of the day, ncp-web updater uses occ commands, so it smells like a bug in either OCR or NC.

I do not use ocr app, so this wasn’t detected during my testing or the other people that tested it before I released it.

edit: the bug has been repotred in NC https://github.com/nextcloud/server/issues/21067

Thanks, figured this out too, and once again realized that having too many apps (especially non official ones) makes Nextcloud a little unstable. So I removed it, I do not need it anhow :slight_smile: after I have put some thoughts into it :smiley:

Thanks and great you (@nachoparker) are back :wink: as it seems after seeing the new github commits and forum posts.