files_downloadactivity
files_downloadactivity copied to clipboard
error Call to undefined method OC\Server::getEventDispatcher() in nextcloud 28.0.4
Steps to reproduce
- Install plugin Activities for shared file downloads
- Go to menu "logs"
- see errors all the second: Fatal | no app in context | ErrorCall to undefined method OC\Server::getEventDispatcher()Could not boot files_downloadactivity: Call to undefined method OC\Server::getEventDispatcher() -- | -- | --
Expected behaviour
Tell us what should happen Plugin doesn't do notifications on upload file.
Actual behaviour
Tell us what happens instead
Server configuration
Operating system: Almalinux 9.3
Web server: Apache 2.4.57 Database: mysql 8.0.36 PHP version: 8.1.27 Nextcloud version: (see Nextcloud admin page) 28.0.4 Where did you install Nextcloud from: /home/nextcloud Signing status:
Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
```No errors have been found.
**List of activated apps:**
Enabled:
- activity: 2.20.0
- admin_audit: 1.18.0
- backup: 1.4.0
- bruteforcesettings: 2.8.0
- circles: 28.0.0
- cloud_federation_api: 1.11.0
- dashboard: 7.8.0
- dav: 1.29.1
- federatedfilesharing: 1.18.0
- files: 2.0.0
- files_accesscontrol: 1.18.0
- files_pdfviewer: 2.9.0
- files_reminders: 1.1.0
- files_retention: 1.17.2
- files_sharing: 1.20.0
- files_trashbin: 1.18.0
- files_versions: 1.21.0
- flow_notifications: 1.8.0
- group_default_quota: 0.1.9
- groupfolders: 16.0.6
- groupquota: 0.1.13
- login_notes: 1.5.0
- logreader: 2.13.0
- lookup_server_connector: 1.16.0
- multiboards: 1.0.2
- notifications: 2.16.0
- oauth2: 1.16.3
- password_policy: 1.18.0
- provisioning_api: 1.18.0
- quicknotes: 0.8.22
- quota_warning: 1.19.0
- related_resources: 1.3.0
- settings: 1.10.1
- side_menu: 3.12.0
- spreed: 18.0.7
- suspicious_login: 6.0.0
- systemtags: 1.18.0
- tasks: 0.15.0
- theming: 2.3.0
- twofactor_backupcodes: 1.17.0
- unroundedcorners: 1.1.2
- updatenotification: 1.18.0
- user_status: 1.8.1
- viewer: 2.2.0
- workflowengine: 2.10.0
If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your Nextcloud installation folder
**Nextcloud configuration:**
If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder
or
Insert your config.php content here Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)
Cannot load Zend OPcache - it was already loaded
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"pg.xxxxx.com"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "28.0.4.1",
"overwrite.cli.url": "https:\/\/pg.xxx.com",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"session_lifetime": 432000,
"session_keepalive": false,
"remember_login_cookie_lifetime": 0,
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "25",
"default_language": "fr",
"app_install_overwrite": [
"files_downloadactivity"
],
"maintenance": false,
"theme": "",
"loglevel": 2,
"updater.secret": "***REMOVED SENSITIVE VALUE***"
}
}
**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...
no
### Client configuration
**Browser:**
Firefox and chrome
**Operating system:**
Windows 10
### Logs
#### Nextcloud log (data/owncloud.log)
Insert your Nextcloud log here
[no app in context] Fatal: Could not boot files_downloadactivity: Call to undefined method OC\Server::getEventDispatcher()
POST /index.php/settings/apps/disable
de XX.XX.XX.XX par admin à 16 avr. 2024, 20:58:50
#### Browser log
Insert your browser log here, this could for example include:
a) The javascript console log b) The network log c) ...
I can confirm this also exists on NC 29.0.0
The whole error message is like:
{"reqId":"VCdLrJC5cE1rnbTwuGNB","level":4,"time":"2024-05-30T13:44:42+00:00","remoteAddr":"xx.xx.xx.xx","user":"ncuser","app":"no app in context","method":"POST","url":"/index.php/settings/apps/disable","message":"Could not boot files_downloadactivity: Call to undefined method OC\\Server::getEventDispatcher()","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0","version":"29.0.1.1","exception":{"Exception":"Error","Message":"Call to undefined method OC\\Server::getEventDispatcher()","Code":0,"Trace":[{"file":"/home/lib/private/AppFramework/Bootstrap/Coordinator.php","line":200,"function":"boot","class":"OCA\\FilesDownloadActivity\\AppInfo\\Application","type":"->"},{"file":"/home/lib/private/App/AppManager.php","line":437,"function":"bootApp","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->"},{"file":"/home/lib/private/App/AppManager.php","line":216,"function":"loadApp","class":"OC\\App\\AppManager","type":"->"},{"file":"/home/lib/private/legacy/OC_App.php","line":128,"function":"loadApps","class":"OC\\App\\AppManager","type":"->"},{"file":"/home/lib/base.php","line":1030,"function":"loadApps","class":"OC_App","type":"::"},{"file":"/home/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/apps/files_downloadactivity/lib/AppInfo/Application.php","Line":49,"message":"Could not boot files_downloadactivity: Call to undefined method OC\\Server::getEventDispatcher()","exception":[],"CustomMessage":"Could not boot files_downloadactivity: Call to undefined method OC\\Server::getEventDispatcher()"},"id":"66588357f1109"}
line 49 https://github.com/nextcloud/files_downloadactivity/blob/master/lib/AppInfo/Application.php#L49 is
$eventDispatcher = $context->getServerContainer()->getEventDispatcher();
There is already PR to fix this issue: https://github.com/nextcloud/files_downloadactivity/pull/166
Bump... Also happening on 29.0.4...
Fixed in upcoming release