shiningw/ncdownloader

Autoload path not allowed

Closed this issue · 3 comments

Describe the bug
After an Update to Nextcloud Hub 5 (27.0.0) the App is incompatibel. The migration of nc fails with this error. Only manually removing the app from the App Path solve it.

To Reproduce
Steps to reproduce the behavior:

  1. update Nextcloud
  2. at the App Migration step it fails
  3. See error

Expected behavior
Fully compatible with Nextcloud 27.

Smartphone (please complete the following information):

  • Device: google Pixel 6 pro
  • OS: Android 13
  • Browser: Firefox

Additional context

OCP\AutoloadNotAllowedException: Autoload path not allowed: /var/www/nextcloud/apps/ncdownloader/appinfo/application.php

/var/www/nextcloud/lib/autoloader.php - line 166: 

OC\Autoloader->isValidPath()

<<closure>>

OC\Autoloader->load()

/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php - line 129: 

class_exists()

/var/www/nextcloud/lib/private/AppFramework/Bootstrap/Coordinator.php - line 90: 

OC\AppFramework\Bootstrap\Coordinator->registerApps()

/var/www/nextcloud/lib/base.php - line 696: 

OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()

/var/www/nextcloud/lib/base.php - line 1173: 

OC::init()

/var/www/nextcloud/console.php - line 48: 

require_once("/var/www/ne ... p")

/var/www/nextcloud/occ - line 11: 

require_once("/var/www/ne ... p")
`

I can also add that some occ commands are failing too:
❌occ db:add-missing-indices
❌occ app:remove ncdownloader
❌occ maintenance:repair

# sudo -u www-data php /path/to/NC/occ db:add-missing-indices
An unhandled exception has been thrown:
OCP\AutoloadNotAllowedException: Autoload path not allowed: /path/to/NC/apps/ncdownloader/appinfo/application.php in /path/to/NC/lib/autoloader.php:141
Stack trace:
#0 /path/to/NC/lib/autoloader.php(166): OC\Autoloader->isValidPath()
#1 [internal function]: OC\Autoloader->load()
#2 /path/to/NC/lib/private/ServerContainer.php(106): class_exists()
#3 /path/to/NC/lib/private/ServerContainer.php(186): OC\ServerContainer->getAppContainer()
#4 /path/to/NC/lib/private/ServerContainer.php(153): OC\ServerContainer->getAppContainerForService()
#5 /path/to/NC/lib/private/Console/Application.php(217): OC\ServerContainer->query()
#6 /path/to/NC/lib/private/Console/Application.php(131): OC\Console\Application->loadCommandsFromInfoXml()
#7 /path/to/NC/console.php(99): OC\Console\Application->loadCommands()
#8 /path/to/NC/occ(11): require_once('...')
#9 {main}
z0ow commented

My temporary solution is disabling NCDownloader and similar applications via the web interface.

Solved for me, good work! @shiningw