OwnCloud got corrupted after installing an app from the store

Hello,

OwnCloud stopped working for me after installing additional apps from the store. On the website it displays “internal server error”.

After issuing the “sudo -u www-data php occ --version” command I get:
An unhandled exception has been thrown:
TypeError: Return value of OCA\Files_Texteditor\AppInfo\Application::registerEventHooks() must be an instance of OCA\Files_Texteditor\AppInfo\void, none returned in /var/www/owncloud/apps/files_texteditor/appinfo/application.php:73
Stack trace:
#0 /var/www/owncloud/apps/files_texteditor/appinfo/application.php(76): OCA\Files_Texteditor\AppInfo\Application->registerEventHooks()
#1 /var/www/owncloud/apps/files_texteditor/appinfo/app.php(6): OCA\Files_Texteditor\AppInfo\Application->boot()
#2 /var/www/owncloud/lib/private/legacy/app.php(239): require_once(‘/var/www/ownclo…’)
#3 /var/www/owncloud/lib/private/legacy/app.php(190): OC_App::requireAppFile(Object(OCA\Files_Texteditor\AppInfo\Application))
#4 /var/www/owncloud/lib/private/legacy/app.php(124): OC_App::loadApp(‘files_textedito…’)
#5 /var/www/owncloud/lib/private/Console/Application.php(103): OC_App::loadApps()
#6 /var/www/owncloud/console.php(105): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/owncloud/occ(11): require_once(‘/var/www/ownclo…’)
#8 {main}

In the logs (owncloud.log) I have:
{“reqId”:“eUAGXzFhFtFHtpUh8TFK”,“level”:3,“time”:“2023-02-22T15:45:50+00:00”,“remoteAddr”:“192.168.0.10”,“user”:“–”,“app”:“index”,“method”:“GET”,“url”:“/owncloud/”,“message”:“Exception: {"Exception":"TypeError","Message":"Return value of OCA\\Files_Texteditor\\AppInfo\\Application::registerEventHooks() must be an instance of OCA\\Files_Texteditor\\AppInfo\\void, none returned","Code":0,"Trace":"#0 \/var\/www\/owncloud\/apps\/files_texteditor\/appinfo\/application.php(76): OCA\\Files_Texteditor\\AppInfo\\Application->registerEventHooks()\n#1 \/var\/www\/owncloud\/apps\/files_texteditor\/appinfo\/app.php(6): OCA\\Files_Texteditor\\AppInfo\\Application->boot()\n#2 \/var\/www\/owncloud\/lib\/private\/legacy\/app.php(239): require_once(‘\/var\/www\/ownclo…’)\n#3 \/var\/www\/owncloud\/lib\/private\/legacy\/app.php(190): OC_App::requireAppFile(Object(OCA\\Files_Texteditor\\AppInfo\\Application))\n#4 \/var\/www\/owncloud\/lib\/private\/legacy\/app.php(124): OC_App::loadApp(‘files_textedito…’)\n#5 \/var\/www\/owncloud\/lib\/base.php(916): OC_App::loadApps()\n#6 \/var\/www\/owncloud\/index.php(54): OC::handleRequest()\n#7 {main}","File":"\/var\/www\/owncloud\/apps\/files_texteditor\/appinfo\/application.php","Line":73}”}

can it be fixed somehow? :slight_smile:

Have you tried using the filesystem to remove the app that precipitated the problem?

1 Like

No, I’m not proficient with OwnCloud. Can I have step by step instructions please?

You can Uninstall the app from occ command line using

occ market:uninstall [AppName]

2 Likes

When you upgraded the files_texteditor app you had an old php7.0 version, the void type was introduced in php7.1.

You should upgrade to php7.1 or newer, I would recommend 7.4 and then you can also upgrade your owncloud to the newest version.

2 Likes