Code Monkey home page Code Monkey logo

Comments (17)

ternst-micado avatar ternst-micado commented on May 31, 2024 2

Thanks @OvrAp3x . Working here with your fix.

from meshcentral-scripttask.

ryanblenis avatar ryanblenis commented on May 31, 2024 2

Updated to use MC's latest version of nedb (@yetzt/nedb), and remove the promise requirement which has gone away in the latest MC in lieu of later versions of Node.

from meshcentral-scripttask.

SpookOz avatar SpookOz commented on May 31, 2024

Same error for me too. Was working perfectly until recent upgrade to 0.9.47 version of MC (or perhaps the previous version). Have updated the plugin to 0.0.17. I'm getting a similar error on your other plugins Ryan. Cheers.

from meshcentral-scripttask.

dmft33 avatar dmft33 commented on May 31, 2024

Same issue here. Running 0.9.38 in Docker.

ERR: TypeError: Cannot read property 'getScriptTree' of null
at Object.obj.handleAdminReq (/opt/meshcentral/meshcentral-data/plugins/scripttask/scripttask.js:224:20)
at Object.obj.handleAdminReq (/opt/meshcentral/node_modules/meshcentral/pluginHandler.js:522:40)
at obj.handlePluginAdminReq (/opt/meshcentral/node_modules/meshcentral/webserver.js:5376:34)
at Layer.handle [as handle_request] (/opt/meshcentral/node_modules/express/lib/router/layer.js:95:5)
at next (/opt/meshcentral/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/opt/meshcentral/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/opt/meshcentral/node_modules/express/lib/router/layer.js:95:5)
at /opt/meshcentral/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/opt/meshcentral/node_modules/express/lib/router/index.js:335:12)
at next (/opt/meshcentral/node_modules/express/lib/router/index.js:275:10)

from meshcentral-scripttask.

dmft33 avatar dmft33 commented on May 31, 2024

I also tried 0.9.47 and got the same.

from meshcentral-scripttask.

SpookOz avatar SpookOz commented on May 31, 2024

Hi again! Anyone found a workaround for this? All Ryan's plugins are unusable for me currently.

from meshcentral-scripttask.

1ARdotNO avatar 1ARdotNO commented on May 31, 2024

Getting the same error, there is also a message pre-ceeding the message posted above here relating to "nedb"

Error instantiating new plugin: { Error: Cannot find module 'nedb', at Timeout._onTimeout (/opt/meshcentral/node_modules/meshcentral/pluginHandler.js:428:146), at Module.require (internal/modules/cjs/loader.js:692:17), at require (internal/modules/cjs/helpers.js:25:18), at Function.Module._load (internal/modules/cjs/loader.js:562:25), at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15), at Object.module.exports.CreateDB (/opt/meshcentral/meshcentral-data/plugins/scripttask/db.js:289:21), at Object.obj.server_startup (/opt/meshcentral/meshcentral-data/plugins/scripttask/scripttask.js:38:85), at ontimeout (timers.js:436:11), at tryOnTimeout (timers.js:300:5), at listOnTimeout (timers.js:263:5) code: 'MODULE_NOT_FOUND' }, ERR: TypeError: Cannot read property 'getScriptTree' of null, at Object.obj.handleAdminReq (/opt/meshcentral/meshcentral-data/plugins/scripttask/scripttask.js:224:20), at Object.obj.handleAdminReq (/opt/meshcentral/node_modules/meshcentral/pluginHandler.js:522:40), at obj.handlePluginAdminReq (/opt/meshcentral/node_modules/meshcentral/webserver.js:5450:34), at Layer.handle [as handle_request] (/opt/meshcentral/node_modules/express/lib/router/layer.js:95:5), at next (/opt/meshcentral/node_modules/express/lib/router/route.js:137:13), at Route.dispatch (/opt/meshcentral/node_modules/express/lib/router/route.js:112:3), at /opt/meshcentral/node_modules/express/lib/router/index.js:281:22, at Function.process_params (/opt/meshcentral/node_modules/express/lib/router/index.js:335:12), at next (/opt/meshcentral/node_modules/express/lib/router/index.js:275:10)

from meshcentral-scripttask.

1ARdotNO avatar 1ARdotNO commented on May 31, 2024

The clue to a fix was in the error message,
I am also running in docker and seems like I was missing a dependency.
npm install nedb
This fixed the issue for me, I was also running in docker so the nedb module was not included there by the npm install meshcentral

if anybody else wants a fix it is published here,
https://github.com/OvrAp3x/meshcentral-docker
https://hub.docker.com/repository/docker/einar/meshcentral (image is rebuilt with newest version of meshcentral daily)

from meshcentral-scripttask.

SpookOz avatar SpookOz commented on May 31, 2024

Thanks @OvrAp3x . Unfortunately, this didn't work in my case - and I don't see the error relating to nedb. Can I ask what version of MC you are using?

from meshcentral-scripttask.

ternst-micado avatar ternst-micado commented on May 31, 2024

@SpookOz Just as an FYI: I have 0.9.56 running here.

from meshcentral-scripttask.

1ARdotNO avatar 1ARdotNO commented on May 31, 2024

Yeah, i also running that version

from meshcentral-scripttask.

thinkbig1979 avatar thinkbig1979 commented on May 31, 2024

I'm also getting a 'getScriptTree' error that is not related to NeDB.
I am on 0.9.62 and the latest version of the plugin (0.0.17).

TypeError: Cannot read property 'getScriptTree' of null
    at Object.obj.handleAdminReq (/root/meshcentral/meshcentral-data/plugins/scripttask/scripttask.js:224:20)
    at Object.obj.handleAdminReq (/root/meshcentral/node_modules/meshcentral/pluginHandler.js:522:40)
    at obj.handlePluginAdminReq (/root/meshcentral/node_modules/meshcentral/webserver.js:5452:34)
    at Layer.handle [as handle_request] (/root/meshcentral/node_modules/express/lib/router/layer.js:95:5)
    at next (/root/meshcentral/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/root/meshcentral/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/root/meshcentral/node_modules/express/lib/router/layer.js:95:5)
    at /root/meshcentral/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/root/meshcentral/node_modules/express/lib/router/index.js:335:12)
    at next (/root/meshcentral/node_modules/express/lib/router/index.js:275:10)

from meshcentral-scripttask.

JSuenram avatar JSuenram commented on May 31, 2024

Same here... latest MC and Plugin-Version.
-------- 14.1.2022, 09:46:01 ---- 0.9.68 --------

TypeError: Cannot read property 'getScriptTree' of null
at Object.obj.handleAdminReq (/etc/meshcentral/meshcentral-data/plugins/scripttask/scripttask.js:224:20)
at Object.obj.handleAdminReq (/etc/meshcentral/node_modules/meshcentral/pluginHandler.js:522:40)
at obj.handlePluginAdminReq (/etc/meshcentral/node_modules/meshcentral/webserver.js:5485:34)
at Layer.handle [as handle_request] (/etc/meshcentral/node_modules/express/lib/router/layer.js:95:5)
at next (/etc/meshcentral/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/etc/meshcentral/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/etc/meshcentral/node_modules/express/lib/router/layer.js:95:5)
at /etc/meshcentral/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/etc/meshcentral/node_modules/express/lib/router/index.js:341:12)
at next (/etc/meshcentral/node_modules/express/lib/router/index.js:275:10)

from meshcentral-scripttask.

poiNt3D avatar poiNt3D commented on May 31, 2024

Same problem. It had worked for a while, but recently it stopped.
Have tried different docker images, no luck.

from meshcentral-scripttask.

djangomcdjangerson avatar djangomcdjangerson commented on May 31, 2024

I can also confirm this issue running on a Windows Server 2012 instance.

TypeError: Cannot read property 'getScriptTree' of null at Object.obj.handleAdminReq (C:\Program Files\Open Source\MeshCentral\meshcentral-data\plugins\scripttask\scripttask.js:224:20) at Object.obj.handleAdminReq (C:\Program Files\Open Source\MeshCentral\node_modules\meshcentral\pluginHandler.js:521:40) at obj.handlePluginAdminReq (C:\Program Files\Open Source\MeshCentral\node_modules\meshcentral\webserver.js:5527:34) at Layer.handle [as handle_request] (C:\Program Files\Open Source\MeshCentral\node_modules\express\lib\router\layer.js:95:5) at next (C:\Program Files\Open Source\MeshCentral\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (C:\Program Files\Open Source\MeshCentral\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (C:\Program Files\Open Source\MeshCentral\node_modules\express\lib\router\layer.js:95:5) at C:\Program Files\Open Source\MeshCentral\node_modules\express\lib\router\index.js:281:22 at Function.process_params (C:\Program Files\Open Source\MeshCentral\node_modules\express\lib\router\index.js:341:12) at next (C:\Program Files\Open Source\MeshCentral\node_modules\express\lib\router\index.js:275:10)

from meshcentral-scripttask.

SpookOz avatar SpookOz commented on May 31, 2024

Thanks Ryan! It's working again. Really appreciate you taking the time to look into this and resolve it. These plugins add so much functionality to MC!

from meshcentral-scripttask.

thinkbig1979 avatar thinkbig1979 commented on May 31, 2024

Solved for ma as well. Many thanks!!

from meshcentral-scripttask.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.