ryanblenis / MeshCentral-EventLog

An event log plugin for the MeshCentral2 project
Apache License 2.0
14 stars 3 forks source link

Error loading plugin handler #4

Closed OutbackMatt closed 4 years ago

OutbackMatt commented 4 years ago

Love the work Ryan, thanks.

when 'disabling' eventlog I get four of these

Error loading plugin handler (TypeError: Cannot read property 'serveraction' of undefined)

I don't know Java very well, but I think it is because the 'Grandparent isn't defined at line 418 of eventlog.js

The reason I was disabling is because I get a server error when I start the server ONLY when this plugin is enabled. Error says:-

ERR: (node:24540) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use Collection.countDocuments or Collection.estimatedDocumentCount instead

ryanblenis commented 4 years ago

Hi @OutbackMatt,

Thanks for the kind words and the report. I've updated the deprecated call from collection.count to the newer countDocuments to get rid of the deprecation warning message.

The "error loading plugin handler" you get when disabling EventLog is that the MeshCore of the agents has yet to be updated, so they still try to check in with Event Log data, however once the request hits the server, the plugin component no longer exists. There is no harm in this, but simply distributing the mesh core to the endpoints will alleviate this. Hope all is well and happy new year!

ryanblenis commented 4 years ago

Closing this as no other issues / follow-up has been added. Thank you for this report.