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

Update broken due to RemoveRootShares when an app needs update #25156

Closed
PVince81 opened this issue Jun 17, 2016 · 2 comments · Fixed by #25158
Closed

Update broken due to RemoveRootShares when an app needs update #25156

PVince81 opened this issue Jun 17, 2016 · 2 comments · Fixed by #25158

Comments

@PVince81
Copy link
Contributor

Steps

  1. Setup OC with master (cc532bb)
  2. Increase version in "version.php"
  3. Run update on the CLI => works fine
  4. Increase version of "files_sharing" in its info.xml (or any filesystem-related app)
  5. Run update on the CLI => 💣
An unhandled exception has been thrown:
exception 'OC\NeedsUpdateException' in /srv/www/htdocs/owncloud/lib/private/legacy/app.php:147
Stack trace:
#0 /srv/www/htdocs/owncloud/lib/private/legacy/app.php(119): OC_App::loadApp('files_sharing')
#1 /srv/www/htdocs/owncloud/lib/private/legacy/util.php(135): OC_App::loadApps(Array)
#2 /srv/www/htdocs/owncloud/lib/private/Files/Filesystem.php(260): OC_Util::setupFS(NULL)
#3 /srv/www/htdocs/owncloud/lib/private/Server.php(174): OC\Files\Filesystem::getMountManager(NULL)
#4 /srv/www/htdocs/owncloud/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#5 /srv/www/htdocs/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(102): Pimple\Container->offsetGet('RootFolder')
#6 /srv/www/htdocs/owncloud/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('RootFolder')
#7 /srv/www/htdocs/owncloud/lib/private/Server.php(780): OC\ServerContainer->query('RootFolder')
#8 /srv/www/htdocs/owncloud/lib/private/Repair.php(140): OC\Server->getRootFolder()
#9 /srv/www/htdocs/owncloud/core/register_command.php(125): OC\Repair::getRepairSteps()
#10 /srv/www/htdocs/owncloud/lib/private/Console/Application.php(87): require_once('/srv/www/htdocs...')
#11 /srv/www/htdocs/owncloud/console.php(93): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /srv/www/htdocs/owncloud/occ(11): require_once('/srv/www/htdocs...')
#13 {main}

CC @rullzer

This is because the injection in the repair step happens too early.

Let's try calling getRootFolder only in the run phase.

@PVince81
Copy link
Contributor Author

Fix is here #25158

@lock
Copy link

lock bot commented Aug 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant