Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user_cas not working with nextcloud #112

Open
hamradio123 opened this issue May 31, 2023 · 3 comments
Open

user_cas not working with nextcloud #112

hamradio123 opened this issue May 31, 2023 · 3 comments

Comments

@hamradio123
Copy link

user_cas not working with nextcloud

As long as the user_cas app is installed and enabled, I cannot access the security tab any more and the server throws an internal server error.

here is the output of the data/nextcloud.log

{"reqId":"CkjAeE4EGEiXDIPk1qXk","level":3,"time":"2023-05-31T06:53:41+00:00","remoteAddr":"10.0.2.2","user":"admin","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"App user_cas threw an error during app.php load: Class "OCP\App" not found","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0","version":"26.0.2.1","exception":{"Exception":"Error","Message":"Class "OCP\App" not found","Code":0,"Trace":[{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":316,"function":"require_once"},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":192,"function":"requireAppFile","class":"OC_App","type":"::"},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":141,"function":"loadApp","class":"OC_App","type":"::"},{"file":"/var/www/html/lib/private/legacy/OC_User.php","line":128,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/var/www/html/lib/base.php","line":760,"function":"setupBackends","class":"OC_User","type":"::"},{"file":"/var/www/html/lib/base.php","line":1167,"function":"init","class":"OC","type":"::"},{"file":"/var/www/html/ocs/v1.php","line":31,"args":["/var/www/html/lib/base.php"],"function":"require_once"},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/apps/user_cas/appinfo/app.php","Line":34,"message":"App user_cas threw an error during app.php load: Class "OCP\App" not found","CustomMessage":"App user_cas threw an error during app.php load: Class "OCP\App" not found"}}

@washidepl
Copy link

have you managed this?

@liudonghua123
Copy link

I have the similar issue when using this app on nextcloud 29.0.1.

{"reqId":"AprnwrMxqFy2oJi8AGhl","level":3,"time":"2024-06-03T02:45:10+00:00","remoteAddr":"113.55.127.140","user":"admin","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"App user_cas threw an error during app.php load: Class \"OCP\\App\" not found","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 uacq","version":"29.0.1.1","exception":{"Exception":"Error","Message":"Class \"OCP\\App\" not found","Code":0,"Trace":[{"file":"/var/www/html/lib/private/App/AppManager.php","line":525,"function":"require_once"},{"file":"/var/www/html/lib/private/App/AppManager.php","line":416,"function":"requireAppFile","class":"OC\\App\\AppManager","type":"::","args":[["OCA\\UserCAS\\AppInfo\\Application"]]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":216,"function":"loadApp","class":"OC\\App\\AppManager","type":"->","args":["user_cas"]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":128,"function":"loadApps","class":"OC\\App\\AppManager","type":"->","args":[["prelogin"]]},{"file":"/var/www/html/lib/private/legacy/OC_User.php","line":132,"function":"loadApps","class":"OC_App","type":"::","args":[["prelogin"]]},{"file":"/var/www/html/lib/base.php","line":776,"function":"setupBackends","class":"OC_User","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":1181,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/ocs/v1.php","line":31,"args":["/var/www/html/lib/base.php"],"function":"require_once"},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/custom_apps/user_cas/appinfo/app.php","Line":34,"message":"App user_cas threw an error during app.php load: Class \"OCP\\App\" not found","exception":{},"CustomMessage":"App user_cas threw an error during app.php load: Class \"OCP\\App\" not found"}}
{"reqId":"tue5r3icVDxRR6cxjgXW","level":3,"time":"2024-06-03T02:45:26+00:00","remoteAddr":"113.55.127.140","user":"admin","app":"no app in context","method":"PUT","url":"/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json","message":"App user_cas threw an error during app.php load: Class \"OCP\\App\" not found","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 uacq","version":"29.0.1.1","exception":{"Exception":"Error","Message":"Class \"OCP\\App\" not found","Code":0,"Trace":[{"file":"/var/www/html/lib/private/App/AppManager.php","line":525,"function":"require_once"},{"file":"/var/www/html/lib/private/App/AppManager.php","line":416,"function":"requireAppFile","class":"OC\\App\\AppManager","type":"::","args":[["OCA\\UserCAS\\AppInfo\\Application"]]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":216,"function":"loadApp","class":"OC\\App\\AppManager","type":"->","args":["user_cas"]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":128,"function":"loadApps","class":"OC\\App\\AppManager","type":"->","args":[["prelogin"]]},{"file":"/var/www/html/lib/private/legacy/OC_User.php","line":132,"function":"loadApps","class":"OC_App","type":"::","args":[["prelogin"]]},{"file":"/var/www/html/lib/base.php","line":776,"function":"setupBackends","class":"OC_User","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":1181,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/ocs/v1.php","line":31,"args":["/var/www/html/lib/base.php"],"function":"require_once"},{"file":"/var/www/html/ocs/v2.php","line":23,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/custom_apps/user_cas/appinfo/app.php","Line":34,"message":"App user_cas threw an error during app.php load: Class \"OCP\\App\" not found","exception":{},"CustomMessage":"App user_cas threw an error during app.php load: Class \"OCP\\App\" not found"}}

@liudonghua123
Copy link

I tried the followings to make it work for me.

  1. search and replace \OCP\App to \OC_App. Two files:
  2. remove or update \OC_App::isEnabled and \OC_App::getAppInfo api, I couldn't find the alternative api, and I found it's safe to remove it, so I just removed.

Only two files (custom_apps/user_cas/appinfo/app.php and custom_apps/user_cas/templates/admin.php) need to change.

image

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants