Closed hchkim closed 2 years ago
Hi @hchkim,
I'm having trouble replicating the exact issue, but while testing it does look like a prior pull request to MeshCentral caused an issue with newly installed or removed plugins. I've submitted a PR for that here.
Your particular error makes me believe the database was not loaded.
Thank you.
Thank you for reply. I found a solution. I just commented "require ('promise')" in the /meshcentral-data/plugins/filedist/db.js file. I guess it caused by nodejs version difference.
Thanks for the info. If you don't mind, what is your Node version so I can test / update the code accordingly? Thank you.
OK. Thank you. It runs on Ubuntu 16.04.6 LTS
$ node -v v10.16.3
I got the "same" error. I use the docker deployment for meshcentral with the official container image.
In my case the error is only in the mesherrors.txt
and the plugin tab only shows Internal Server Error
.
-------- 5/10/2023, 8:24:56 AM ---- 1.1.4 --------
TypeError: Cannot read properties of null (reading 'getFileMapsForNode')
at obj.handleAdminReq (/opt/meshcentral/meshcentral-data/plugins/filedist/filedist.js:147:20)
at obj.handleAdminReq (/opt/meshcentral/meshcentral/pluginHandler.js:521:40)
at obj.handlePluginAdminReq (/opt/meshcentral/meshcentral/webserver.js:5971:34)
at Layer.handle [as handle_request] (/opt/meshcentral/meshcentral/node_modules/express/lib/router/layer.js:95:5)
at next (/opt/meshcentral/meshcentral/node_modules/express/lib/router/route.js:144:13)
at Route.dispatch (/opt/meshcentral/meshcentral/node_modules/express/lib/router/route.js:114:3)
at Layer.handle [as handle_request] (/opt/meshcentral/meshcentral/node_modules/express/lib/router/layer.js:95:5)
at /opt/meshcentral/meshcentral/node_modules/express/lib/router/index.js:284:15
at Function.process_params (/opt/meshcentral/meshcentral/node_modules/express/lib/router/index.js:346:12)
at next (/opt/meshcentral/meshcentral/node_modules/express/lib/router/index.js:280:10)
there in no promise requirement to comment out anymore. Since I have no skills when it comes to JS I am not seeing the underlying issue here
Thank you for creating a nice plugin. When I try to install and use it, I get the following error. How should I do to solve it?