MagicMirror icon indicating copy to clipboard operation
MagicMirror copied to clipboard

Crash on Start possibility

Open bugsounet opened this issue 1 year ago • 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

bugsounet avatar May 07 '24 10:05 bugsounet

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

sdetweil avatar May 07 '24 11:05 sdetweil

Screenshot_20240507_070005_Chrome

sdetweil avatar May 07 '24 12:05 sdetweil

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

bugsounet avatar May 07 '24 13:05 bugsounet

oh..

I thought you meant

config:{}

sdetweil avatar May 07 '24 15:05 sdetweil

should we correct this issue?

bugsounet avatar May 08 '24 09:05 bugsounet

yes.. never crash

sdetweil avatar May 08 '24 11:05 sdetweil

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

bugsounet avatar May 08 '24 14:05 bugsounet

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

sdetweil avatar May 08 '24 14:05 sdetweil