Help I installed a OneDrive addon, and now it broke my nextcloud instance

I installed a OneDrive addon, and now it broke my nextcloud instance.
I am using nextcloud v20.0.4

when I access my server I get 500 responses in browser.
On server side I see these logs:

192.168.64.2 - - [29/Dec/2020:03:39:53 +0000] "GET / HTTP/1.1" 500 425 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.64.2 - - [29/Dec/2020:03:39:58 +0000] "GET / HTTP/1.1" 500 425 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36"
192.168.64.2 - - [29/Dec/2020:04:19:05 +0000] "GET / HTTP/1.1" 500 425 "-" "-"

Then I thought, since I can’t use the UI to disable the addon, maybe I can do it via command line. problem is
I don’t know the name of the addon. in order to call php occ app:disable NAME_OF_APP

So to find out tried to run this to list all the adodn names:
php occ app:list

but that command gives this error:

An unhandled exception has been thrown:
Error: Interface 'OCA\Files_External\Lib\Config\IBackendProvider' not found in /var/www/html/custom_apps/files_external_onedrive/lib/AppInfo/Application.php:38
Stack trace:
#0 /var/www/html/lib/composer/composer/ClassLoader.php(444): include()
#1 /var/www/html/lib/composer/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/html/c...')
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass('OCA\\Files_exter...')
#3 [internal function]: spl_autoload_call('OCA\\Files_exter...')
#4 /var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php(108): class_exists('OCA\\Files_exter...')
#5 /var/www/html/lib/base.php(644): OC\AppFramework\Bootstrap\Coordinator->runRegistration()
#6 /var/www/html/lib/base.php(1091): OC::init()
#7 /var/www/html/console.php(49): require_once('/var/www/html/l...')
#8 /var/www/html/occ(11): require_once('/var/www/html/c...')
#9 {main}root@fd88a8be2bb9:/var/www/html#

So i’m stuck.

It is a bit worrying that something as simple as installing an addon can brick the server. I imagine addons should be sandboxed in some way. Or at least have a way to back out of it if it breaks stuff.

While awaiting response, I was poking around and I tried:

./occ app:disable files_external_onedrive

But that gives this error:

An unhandled exception has been thrown:
Error: Interface 'OCA\Files_External\Lib\Config\IBackendProvider' not found in /var/www/html/custom_apps/files_external_onedrive/lib/AppInfo/Application.php:38
Stack trace:
#0 /var/www/html/lib/composer/composer/ClassLoader.php(444): include()
#1 /var/www/html/lib/composer/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/html/c...')
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass('OCA\\Files_exter...')
#3 [internal function]: spl_autoload_call('OCA\\Files_exter...')
#4 /var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php(108): class_exists('OCA\\Files_exter...')
#5 /var/www/html/lib/base.php(644): OC\AppFramework\Bootstrap\Coordinator->runRegistration()
#6 /var/www/html/lib/base.php(1091): OC::init()
#7 /var/www/html/console.php(49): require_once('/var/www/html/l...')
#8 /var/www/html/occ(11): require_once('/var/www/html/c...')

Sounds like the app is defect, you could try downloading it from github, putting the files on the webserver and setting correct permissions, probably that helps

Yea trouble is I don’t even know for sure which github it is. Because I can’t get into Nextcloud in order to look up the addon that I so glibly clicked “install” on. So I don’t remember the exact title of it, let alone the github repo it comes from. I just know it was something for enabling OneDrive external storage.

At this point I just want to remove the addon, I don’t care to make it work. Just want my Nextcloud instance back…

I didn’t do anything special. The addon was marked compatible with the version of Nextcloud i’m using, so I didn’t do anything crazy like force-enable an incompatible addon or anything.

Find it here: https://apps.nextcloud.com/

Thanks…

I have decided to post an issue ticket in the that project’s github:

You should have at least tried to fix it by putting the files, but well

I don’t know i didn’t want to risk making it worse…

Do you mean cloning the project into the custom_apps subdir of nextcloud?

I wouldn’t do a clone of the repository… Just head to the releases and download the latest release for your Nextcloud version

oh ok @Chartman123 … and then put it where? Should I follow the commandline install instructions from the readme? https://github.com/hevelius/files_external_onedrive

I guess i’m confused how this might work to fix it. I thought installing the app through the Nextcloud GUI as I did the first time does basically this. Which ended up breaking the server in the first place…

I suggest to remove the current folder from your installation and put the extracted files in place. And don’t forget to check the permissions.

If the original installation failed for some files, this might help to fix your problem.

1 Like

Thanks… I actually ended up renaming the files_external_onedrive folder that was already there to files_external_onedrive_bak, and that actually allowed me to get back in to the GUI. From there I was able to disable the onedrive addon, then I went back in the filesystem and renamed the files_external_onedrive_bak back to the original name files_external_onedrive. This allowed me to now properly delete it from the GUI.

Thanks for giving me the ideas.

1 Like

For completeness I will post that I discovered why it broke in the first place. See this post: https://github.com/hevelius/files_external_onedrive/issues/48#issuecomment-752007890