For a few hours I had a fully working Nextcloud system running, tested and customised on new hardware with Ubuntu 18.04, PHP 7.2, Apache2 2.4.29, MariaDB 10.1. Then I went and broke itā¦!
I had installed the āfiles_external_gdriveā app with the intention of trying it out. However, I think when I later ādisabledā the official āfiles_externalā app, this brought Nextcloud crashing down.
[Thu May 31 13:54:52.088060 2018] [php7:error] [pid 12937] [client 127.0.0.1:55508] PHP Fatal error: Interface āOCA\Files_External\Lib\Config\IBackendProviderā not found in /var/www/nextcloud/apps/files_external_gdrive/lib/AppInfo/Application.php on line 32
I now needed to use the command-line āOCCā function to disable the broken Google_Drive app. As I am not experienced with this feature I had to research the docs but it did appear straight forward. Yet it wasnātā¦
PHP cannot open the OCC script in /var/www/nextcloud and I cannot make out why. Permissions are fine and owner:group is āwww-dataā. I have not touched (deliberately) the .htaccess file as itās beyond my brain-power.
My Terminal command attempt is:
sysadmin@Nextcloud-Server-0:~$ sudo -u www-data php occ app:disable files_external_gdrive disabled
[sudo] password for sysadmin:
Could not open input file: occ
PHP has a CLI operation that might be relevant to my problem but it is all āsmoke & mirrorsā that has me completely baffled.
Any assistance or guidance would be greatly appreciated.
Pete
I tend to use the full path when running occ, for this reason. You appear to be in your userās home directory, so of course PHP canāt find occ in that working directory. I always provide the full path so it doesnāt matter where I am currently: sudo -u www-data php /var/www/nextcloud/occ app:disable files_external_gdrive
Thanks, that has shown some progress. This is a new area for me to dabble in. PHP is still looking unhappy as the original fatal message is being repeated.
sysadmin@Nextcloud-Server-0:~$ sudo -u www-data php /var/www/nextcloud/occ app:disable files_external_gdrive
[sudo] password for sysadmin:
PHP Fatal error: Interface āOCA\Files_External\Lib\Config\IBackendProviderā not found in /var/www/nextcloud/apps/files_external_gdrive/lib/AppInfo/Application.php on line 32
I donāt understand why this busted app is being re-driven by PHP after the OCC ādisableā procedure. I will have a sniff around in the log for clues.
Now that I know how to invoke the OCC console correctly (thank-you ālinucksroxā), I can see that my Nextcloud is mortally wounded. Even the status cannot be displayed.
sudo -u www-data php /var/www/nextcloud/occ status
[sudo] password for sysadmin:
PHP Fatal error: Interface āOCA\Files_External\Lib\Config\IBackendProviderā not found in /var/www/nextcloud/apps/files_external_gdrive/lib/AppInfo/Application.php on line 32
Iām a complete ānumptyā with my knowledge of PHP but I suspect the āsmoking gunā is in the hand of app āfiles_external_gdriveā (0.2.8) and that it (with my help(?) has broken the core code.
I will go now and report the problem to this Google-Drive app developer (Samy Nastuzzi) and see if the underlying cause can be found. (Bye for Now)
If you could share a link where you reported the issue would be nice for people who follow the same topic. I was wondering if this might not even be an issue for nextcloud itself if an app can this easily break the setup. Especially when it is distributed via the app store, we could imagine some basic test routines such as enable and disable app. @BernhardPosselt
To disable the app, you can also delete the folder of the app (/var/www/nextcloud/apps/files_external_gdrive). Existing external storage to gdrive will probably disappear, since most of this information is hold in the database, the information is not lost and can be used again once a working version is available (or ideally the apps are programmed this way).
There are some automated tests in place for the NC code. Wouldnāt it be possible to run a test setup, install apps during the night and try a few basic operations like enabling or disabling them. Or if they try to create an external connection, ā¦
Or a way that the occ command does not automatically load app code for some featuresā¦
Also for the development such an infrastructure could be helpful for developers. NC 14 is not announced yet, it will drop for example php 5.x support. It could be helpful to have a full picture which apps are not compatible and it leaves some time to reach out to the developers or the community and does not leave users with a bad surprise that their favorite app is not working any more since the last upgrade.
I have no idea how difficult it is to put such things in place or if different approaches are easier and more efficient.
PHP compatibility is all handled via the info.xml. Also Nextcloud 13 ships with a feature afaik that will tell you if you can upgrade to the next version with all of your apps.
I thought Iād wake this thread back up after finding this via a Google search as Iāve just experienced the same issue after installing the Google-Drive External Files App.
PHP Fatal error: Interface āOCA\Files_External\Lib\Config\IBackendProviderā not found in /usr/local/www/nextcloud/apps/files_external_gdrive/lib/AppInfo/Application.php on line 32
root@nextcloud:/usr/local/www/nextcloud # sudo -u www-data php /var/www/nextcloud/occ app:disable files_external_gdrive
sudo: unknown user: www-data
sudo: unable to initialize policy plugin
root@nextcloud:/usr/local/www/nextcloud # sudo -u www-data php /var/www/nextcloud/occ status
sudo: unknown user: www-data
sudo: unable to initialize policy plugin
I assume NextCloud fatally damaged. Iāll do a re-install since this is a initial setup.