Fix crash possibility if module: <name> is not defined and on mistake position: <position>#3445
Fix crash possibility if module: <name> is not defined and on mistake position: <position>#3445rejas merged 14 commits intoMagicMirrorOrg:developfrom bugsounet:crashFix
module: <name> is not defined and on mistake position: <position>#3445Conversation
|
Just a thought: Wouldn't that be a thing that belongs in |
|
yes, also. |
|
should we make some other checks on it too ? |
|
well, this one is the first actual content that is important.. the user that reporteds the split problem said they ran config:check but it was good.. |
|
So, we have to check we check it on Personally, I think it's essential to apply the rules to both |
|
I think so.. never crash.. |
|
ok, I will see to code it |
|
Right, I will try to add needed rules with eslint in I have never done this kind of test. |
|
I'm not sure that i can integrate it into eslint What do you think @sdetweil ? |
module: <name> is not definedmodule: <name> is not defined and on mistake position: <position>
|
Before approuve some new deps. |
|
If I use a module with a valid position and {
module: "weather",
header: "default weather module current",
position: "top_left",
disabled: true,
config: {
weatherProvider: "openmeteo",
lat: 50.17659,
lon: 8.62685,
useCorsProxy: true,
roundTemp: true,
showPrecipitationProbability: true,
showHumidity: "wind",
showUVIndex: true,
appendLocationNameToHeader: false,
windUnits: "kmh",
showFeelsLike: false,
bridgeId: "abc",
},
},I get a warning [2024-06-07 23:21:00.091] [WARN] No module name found for this configuration: {
module: 'weather',
header: 'default weather module current',
position: 'top_left',
disabled: true,
config: {
weatherProvider: 'openmeteo',
lat: 50.17659,
lon: 8.62685,
useCorsProxy: true,
roundTemp: true,
showPrecipitationProbability: true,
showHumidity: 'wind',
showUVIndex: true,
appendLocationNameToHeader: false,
windUnits: 'kmh',
showFeelsLike: false,
bridgeId: 'abc'
}
}Is this intended? I think we need no such warning for disabled modules ... |
|
i agree, no warning there. |
|
sure, it's not logical |
|
fixed |
|
ping @rejas |
|
|
@rejas: tell me
Sorry to say this but it's discouraging (this PR is open since May 10) :/ |
Of course its ok for me (I do trust your code :-) I was jsut pondering a lot if we could move ALL the position usages into the same file. but that would be as we say in germany: in schönheit sterben (meaning "to die in beauty" aka to work too much and never finish :-D So sorry for my slow approbval, but will do now! |
## [2.28.0] - 2024-07-01 Thanks to: @btoconnor, @bugsounet, @JasonStieber, @khassel, @kleinmantara and @WallysWellies. >⚠️ This release needs nodejs version >= v20 ### Added - [calendar] Added config option "showEndsOnlyWithDuration" for default calendar - [compliments] Added `specialDayUnique` config option, defaults to `false` (#3465) - [weather] Provider weathergov: Use `precipitationLast3Hours` if `precipitationLastHour` is `null` (#3124) ### Removed - [tests] delete node v18 support (#3462) ### Updated - [core] Update dependencies including electron to v31 - [core] use node >= v20 (#3462) - [core] Update `config.js.sample` to use openmeteo as weather provider which needs no api key - [tests] Use latest@version of node for `automated-tests.yaml` (#3483) - [updatenotification] Avoid using pm2 when running in docker container ### Fixed - [core] Fixed crash possibility if `module: <name>` is not defined and on `postion: <positon>` mistake (#3445) - [weather] Fixed precipitationProbability in forecast for provider openmeteo (#3446) - [weather] Fixed type=daily for provider openmeteo having no data when running after 23:00 (#3449) - [weather] Fixed type=daily for provider openmeteo showing nightly icons in forecast when current time is "nightly" (#3458) - [weather] Fixed forecast and hourly weather for provider openmeteo to use real temperatures, not apparent temperatures (#3466) - [tests] Fixed e2e tests running in docker container which needs `address: "0.0.0.0"` (#3479) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Michael Teeuw <[email protected]> Co-authored-by: Kristjan ESPERANTO <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ross Younger <[email protected]> Co-authored-by: Veeck <[email protected]> Co-authored-by: Bugsounet - Cédric <[email protected]> Co-authored-by: jkriegshauser <[email protected]> Co-authored-by: illimarkangur <[email protected]> Co-authored-by: sam detweiler <[email protected]> Co-authored-by: vppencilsharpener <[email protected]> Co-authored-by: veeck <[email protected]> Co-authored-by: Paranoid93 <[email protected]> Co-authored-by: Brian O'Connor <[email protected]> Co-authored-by: WallysWellies <[email protected]> Co-authored-by: Jason Stieber <[email protected]>




Fix #3442