Error Call to undefined method OC\Server::getEventDispatcher() Could not boot files_downloadactivity: Call to undefined method OC\Server::getEventDispatcher()

I just upgraded from 27.1.4 to 28.0.1

I got a lot of errors:
Error Call to undefined method OC\Server::getEventDispatcher()

Could not boot files_downloadactivity: Call to undefined method OC\Server::getEventDispatcher()

When I deactivated the app with: sudo -u www-data php occ app:disable files_downloadactivity the error disappeared, but is it safe to do that?

Any help?

the app files_donloadactivity is not supported by Nextcloud > 26:

App-Id files_downloadactivity
App-Name Activities for shared file downloads
Summary Creates activities for downloads of files that were shared with other users or a group
Categories files monitoring
App-Version 1.16.0
Repository https://github.com/nextcloud/files_downloadactivity
Issue-Tracker Issues · nextcloud/files_downloadactivity · GitHub
NC min/max 24 / 26
Not-shipped (not included) App available in appstore
Appstore Activities for shared file downloads - Apps - App Store - Nextcloud
Created 2017-01-13T12:00:15.695913Z
Last modified 2023-03-21T09:17:04.671159Z

Under Nextcloud 27 it did not complain but 28 complains about it when activated, so it’s rather unsafe to leave it installed!

How come you even activated the app?

Have you ever installed it with --force and you did not remove this

  'app_install_overwrite' =>
  array (
    0 => 'files_downloadactivity',
  ),

array from config.php?

Much luck,
ernolf

1 Like

yeah I have it:

 'app_install_overwrite' =>
  array (
    ....
    2 => 'files_downloadactivity',
  ),

Should I remove it?

That array is used, to overwrite the depdency of those packages. Sometimes a package still works for a new Nextcloud version but the maintainer did not change the info.xml file accordingly.

For those cases this mechanism was created. The server will allow that app to be activated, even after an upgrade, once an app is in that array.
Sometimes an app in that array gets an update and keeping it in that array is no longer needed.
It is always a good idea, to completely remove that array before you do a major upgrade. That way all those not supported apps will get deactivated. Now you can try one by one, if activating it with force again does not break your server or does not produce a lot of error messages.
After deinstallation, you should remove it from that array, to prevent installation in future.

I have written a kind of → CLI-Appstore ← , that can maintain your install_overwrite for you, so that you don’t have zombie entries.

Simply install and run:

nc-apps install_overwrite

to re create your install_overwrite array or

nc-apps install_overwrite -u --allow-unstable

if you first want to update all apps and then re create your install_overwrite array, so it will remove all not more needed entries.

Then you can see exactly what not supported apps are activated.

Much luck,
ernolf

1 Like

What do you mean by “simply install and run: nc-apps install_overwrite”?

Can you please explain that more?

What did you not understand?
Did you follow the link?
Did you install nc-apps like described in the linked description?

It is so incredibly comprehensive explained in detail. I really don’t know what else I should explain? I won’t read it out loud. You still have to read it yourself!

So please, what exactly you did not understand?


ernolf

Hey @ernolf, please don’t over-react. I simply missed the link you posted. Sorry for that but it can happens when you quick read tens or post trying to solve a problem. I hope you understand.
Best regards

Great stuff !
thanks

1 Like

Is it possible to use this this with the Snap version of Nextcloud?

Hi @nxtclduser

… no. Not supported.


ernolf