MagicMirrorOrg/MagicMirror

Crash on Start possibility

bugsounet opened this issue · 8 comments

I just see crash possibility:

  • if module: is missing in module configuration object
  • module configuration object is empty

crash return:

[2024-05-07 12:54:10.972] [ERROR] (node:18916) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading 'split')
    at loadModule (/home/bugsounet/MagicMirror/js/app.js:156:27)
    at loadModules (/home/bugsounet/MagicMirror/js/app.js:213:10)
    at async App.start (/home/bugsounet/MagicMirror/js/app.js:261:3)
(Use `electron --trace-warnings ...` to show where the warning was created) 

I will see to patch it

but a few modules in defaults don't have config object.. why now?

no, no sam
I says this possiblity:

		{
			//module: "clock",
			position: "top_left"
		},

or

		{
                    /*
			module: "clock",
			position: "top_left"
                   */
		},

Or again

		{
			Module: "clock",
			position: "top_left"
		},

for example

if this is no module: in object definition : MM³ crash on start

oh..

I thought you meant

config:{}

should we correct this issue?

yes.. never crash

never crash, no issue about this, so it's not needed ;)

I dont understand. we should never crash from users mistakes.
so anytime we find one we should fix it. like this

yes it's needed to.prevent crash