tomneedham / loginprotect

Protect admin login using IP ranges
https://marketplace.owncloud.com/apps/loginprotect
GNU Affero General Public License v3.0
1 stars 0 forks source link

Can´t enable app : Error: this app cannot be enabled because it makes the server unstable #3

Open Koblenz opened 6 years ago

Koblenz commented 6 years ago

Version : OC 10.0.9.5 Dist : Debian 6.3.0-18, php 7.0.27-0+deb9u1

After activation in the browser frontend, fhe following message appears : Error: this app cannot be enabled because it makes the server unstable

{"reqId":"Avo2GtV1sHFJ2M5ChQiT","level":3,"time":"2018-08-17T07:19:12+02:00","remoteAddr":"XXX.XXX.XXX.XXX","user":"XXXXXXXX","app":"index","method":"GET","url":"\/apps\/files","message":"Exception: {\"Exception\":\"Error\",\"Message\":\"Class 'OCA\\LoginProtect\\Application' not found\",\"Code\":0,\"Trace\":\"#0 \\/var\\/www\\/owncloud\\/lib\\/private\\/legacy\\/app.php(242): require_once()\n#1 \\/var\\/www\\/owncloud\\/lib\\/private\\/legacy\\/app.php(193): OC_App::requireAppFile('loginprotect')\n#2 \\/var\\/www\\/owncloud\\/lib\\/private\\/legacy\\/app.php(127): OC_App::loadApp('loginprotect')\n#3 \\/var\\/www\\/owncloud\\/lib\\/base.php(904): OC_App::loadApps()\n#4 \\/var\\/www\\/owncloud\\/index.php(55): OC::handleRequest()\n#5 {main}\",\"File\":\"\\/var\\/www\\/owncloud\\/apps\\/loginprotect\\/appinfo\\/app.php\",\"Line\":26}"}

tomneedham commented 6 years ago

Can you try this fix: https://github.com/tomneedham/loginprotect/pull/5

Koblenz commented 6 years ago

I testet it. Enabling in the frontend throws the same message "Error: this app cannot be enabled because it makes the server unstable".

I can enable it over the occ command, after this the server anwers with a Internal Server Error:

{"reqId":"jo59oaUCv3WxAAdX4xDY","level":4,"time":"2018-10-09T08:30:01+02:00","remoteAddr":"","user":"--","app":"cron","method":"--","url":"--","message":"Exception: {\"Exception\":\"Error\",\"Message\":\"Class 'OCA\\LoginProtect\\Application' not found\",\"Code\":0,\"Trace\":\"#0 \\/var\\/www\\/owncloud\\/lib\\/private\\/legacy\\/app.php(242): require_once()\n#1 \\/var\\/www\\/owncloud\\/lib\\/private\\/legacy\\/app.php(193): OC_App::requireAppFile('loginprotect')\n#2 \\/var\\/www\\/owncloud\\/lib\\/private\\/legacy\\/app.php(127): OC_App::loadApp('loginprotect')\n#3 \\/var\\/www\\/owncloud\\/cron.php(52): OC_App::loadApps()\n#4 {main}\",\"File\":\"\\/var\\/www\\/owncloud\\/apps\\/loginprotect\\/appinfo\\/app.php\",\"Line\":26}"}

I cant disable app per occ, an unhandled exception has been thrown:

Error: Class 'OCA\LoginProtect\Application' not found in /var/www/owncloud/apps/loginprotect/appinfo/app.php:26 Stack trace:

0 /var/www/owncloud/lib/private/legacy/app.php(242): require_once()

1 /var/www/owncloud/lib/private/legacy/app.php(193): OC_App::requireAppFile('loginprotect')

2 /var/www/owncloud/lib/private/legacy/app.php(127): OC_App::loadApp('loginprotect')

3 /var/www/owncloud/lib/private/Console/Application.php(99): OC_App::loadApps()

4 /var/www/owncloud/console.php(105): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

5 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')

So i disabled it per mysql.