Christian-Me / node-red-contrib-ui-iro-color-picker

Node-RED dashboard color picker widget utilizing the iro.js library. Can be configured as a widget or modal popup window. Individual components can be combined,
Apache License 2.0
4 stars 3 forks source link

Not loading #11

Open TadyTheFish opened 2 years ago

TadyTheFish commented 2 years ago

It doesn't work on my dash v3.1.2

app.min.js:150 TypeError: Cannot read properties of undefined (reading 'options') at eval (eval at <anonymous> (app.min.js:592:666), <anonymous>:117:94) at Array.forEach (<anonymous>) at createIro (eval at <anonymous> (app.min.js:592:666), <anonymous>:114:41) at $scope.init (eval at <anonymous> (app.min.js:592:666), <anonymous>:204:33) at fn (eval at compile (app.min.js:274:164), <anonymous>:4:2376) at b.$eval (app.min.js:177:180) at Object.pre (app.min.js:325:8) at app.min.js:38:134 at Ca (app.min.js:111:361) at p (app.min.js:95:149) '<div class="iro-color-container" id="iro-color-container-2548978da2119bf9" style="display:flex; flex-direction: row;" ng-init="init({&quot;id&quot;:&quot;2548978da2119bf9&quot;,&quot;type&quot;:&quot;ui_iro-color-picker&quot;,&quot;z&quot;:&quot;f06733abc9f360ba&quot;,&quot;group&quot;:&quot;bbc3532f.41ca7&quot;,&quot;order&quot;:2,&quot;width&quot;:10,&quot;height&quot;:9,&quot;name&quot;:&quot;&quot;,&quot;label&quot;:&quot;&quot;,&quot;placement&quot;:&quot;left&quot;,&quot;hAlign&quot;:&quot;flex-start&quot;,&quot;vAlign&quot;:&quot;flex-start&quot;,&quot;stateField&quot;:&quot;payload&quot;,&quot;enableField&quot;:&quot;enable&quot;,&quot;layoutDirection&quot;:&quot;vertical&quot;,&quot;widgetIndent&quot;:&quot;3&quot;,&quot;buttonWidth&quot;:&quot;2&quot;,&quot;pickerType&quot;:&quot;widget&quot;,&quot;popupWidth&quot;:0,&quot;popupHeight&quot;:0,&quot;pickerSize&quot;:&quot;100&quot;,&quot;backgroundDim&quot;:&quot;50&quot;,&quot;backgroundColor&quot;:&quot;#000000&quot;,&quot;backgroundVariable&quot;:false,&quot;components&quot;:[],&quot;format&quot;:&quot;hex&quot;,&quot;outFormat&quot;:&quot;rgb&quot;,&quot;dynOutput&quot;:&quot;input:move&quot;,&quot;outputConfirmed&quot;:false,&quot;outputLimit&quot;:&quot;10&quot;,&quot;passthru&quot;:false,&quot;topic&quot;:&quot;topic&quot;,&quot;topicType&quot;:&quot;msg&quot;,&quot;iroColorValue&quot;:&quot;#ffffff&quot;,&quot;x&quot;:490,&quot;y&quot;:620,&quot;wires&quot;:[[]],&quot;groupId&quot;:&quot;bbc3532f.41ca7&quot;,&quot;site&quot;:{&quot;sizes&quot;:{&quot;sx&quot;:64,&quot;sy&quot;:64,&quot;gx&quot;:1,&quot;gy&quot;:1,&quot;cx&quot;:0,&quot;cy&quot;:0,&quot;px&quot;:0,&quot;py&quot;:0},&quot;theme&quot;:{&quot;base-color&quot;:{&quot;default&quot;:&quot;#80ff00&quot;,&quot;value&quot;:&quot;#80ff00&quot;,&quot;edited&quot;:true},&quot;page-titlebar-backgroundColor&quot;:{&quot;value&quot;:&quot;#008000&quot;,&quot;edited&quot;:true},&quot;page-backgroundColor&quot;:{&quot;value&quot;:&quot;#333333&quot;,&quot;edited&quot;:true},&quot;page-sidebar-backgroundColor&quot;:{&quot;value&quot;:&quot;#333333&quot;,&quot;edited&quot;:true},&quot;group-textColor&quot;:{&quot;value&quot;:&quot;#80ff00&quot;,&quot;edited&quot;:true},&quot;group-borderColor&quot;:{&quot;value&quot;:&quot;#333333&quot;,&quot;edited&quot;:true},&quot;group-backgroundColor&quot;:{&quot;value&quot;:&quot;#333333&quot;,&quot;edited&quot;:true},&quot;widget-textColor&quot;:{&quot;value&quot;:&quot;#c0c0c0&quot;,&quot;edited&quot;:true},&quot;widget-backgroundColor&quot;:{&quot;value&quot;:&quot;#80ff00&quot;,&quot;edited&quot;:false},&quot;widget-borderColor&quot;:{&quot;value&quot;:&quot;#333333&quot;,&quot;edited&quot;:true},&quot;base-font&quot;:{&quot;value&quot;:&quot;Arial Black,Arial Black,Gadget,sans-serif&quot;}}},&quot;ui_control&quot;:{&quot;color&quot;:&quot;#ffffff&quot;,&quot;borderWidth&quot;:0,&quot;borderColor&quot;:&quot;#ffffff&quot;,&quot;padding&quot;:6,&quot;margin&quot;:12,&quot;handleRadius&quot;:8,&quot;activeHandleRadius&quot;:8,&quot;handleSvg&quot;:null,&quot;handleProps&quot;:{&quot;x&quot;:0,&quot;y&quot;:0},&quot;wheelLightness&quot;:true,&quot;wheelAngle&quot;:0,&quot;wheelDirection&quot;:&quot;anticlockwise&quot;,&quot;sliderSize&quot;:28},&quot;labelProperties&quot;:{&quot;width&quot;:0,&quot;height&quot;:9,&quot;indent&quot;:0,&quot;placement&quot;:&quot;left&quot;,&quot;x&quot;:0,&quot;y&quot;:-12},&quot;widgetProperties&quot;:{&quot;width&quot;:10,&quot;height&quot;:9,&quot;x&quot;:628,&quot;y&quot;:-12},&quot;iroProperties&quot;:{&quot;scale&quot;:1,&quot;x&quot;:628,&quot;y&quot;:-12,&quot;width&quot;:10,&quot;height&quot;:9,&quot;iroWidth&quot;:628},&quot;frontendOutFormat&quot;:&quot;rgb&quot;})">' (anonymous) @ app.min.js:150 (anonymous) @ app.min.js:121 Ca @ app.min.js:111 p @ app.min.js:95 g @ app.min.js:87 (anonymous) @ app.min.js:86 (anonymous) @ app.min.js:592 $digest @ app.min.js:174 $apply @ app.min.js:177 (anonymous) @ app.min.js:221 dispatch @ app.min.js:20 v.handle @ app.min.js:20

Christian-Me commented 2 years ago

Currently on vacation... and very busy otherwise. So hope I find time to look into this.

Christian-Me commented 2 years ago

Hi ... I found a view minutes. Upgraded to Node-Red 3.0.2 (latest) and Dashboard 3.1.7 But I can't reproduce your error.

What version of my node do you use?

All looks fine to me. I assume the error message coming from the browser log?
Looks like something in the options is not defined and there might be a sanity check missing. Can you try a "fresh" node with basic options (not to complicated)

TadyTheFish commented 2 years ago

I need to uograde nodered it seems.. NR version is 2.14

Christian-Me commented 2 years ago

Not necessarily. On my live machine it is running on Node-Red 2.2.2. But an update of node-red, the dashboard and the color-picker node is always a good thing. Did it worked before or is this the first time you use the color picker?

Depending on your version of the color picker you should get a console log (before the error): image

TadyTheFish commented 2 years ago

No console log... No this is the first time using the node. I thought it was fighting with the same colorpicker that I already have. It's the same one, but it is in a template node and the js is in the public folder. But I don't think that it is the problem

J-Maertens commented 1 year ago

The installation caused a crash of node-red and I can't restart node-red. Had to manually remove the package.

Here the console log:

`node-red start 27 Aug 20:33:56 - [info]

Welcome to Node-RED

27 Aug 20:33:56 - [info] Node-RED version: v3.0.2 27 Aug 20:33:56 - [info] Node.js version: v16.16.0 27 Aug 20:33:56 - [info] Linux 5.15.56+ arm LE 27 Aug 20:34:12 - [info] Loading palette nodes 27 Aug 20:34:24 - [info] Dashboard version 3.1.7 started at /ui 27 Aug 20:34:26 - [red] Uncaught Exception: 27 Aug 20:34:26 - [error] TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at new NodeError (node:internal/errors:372:5) at validateString (node:internal/validators:120:11) at Object.join (node:path:1172:7) at Immediate. (/home/pi/.node-red/node_modules/node-red-contrib-ui-iro-color-picker/ui-iro-color-picker.js:1068:29) at processImmediate (node:internal/timers:466:21) `

Christian-Me commented 1 year ago

@J-Maertens I don't see how this is related to the original post. Lately I tested it with all recent versions with now issues.

Can you give me a little background? Did it crash after the installation? Anything that help me reproduce your problem.

J-Maertens commented 1 year ago

Thanks for taking a closer look. Yes, it happened during the installation via the dashboard.

hardware: Raspberry Pi Zero W OS: Raspbian GNU/Linux 11 (bullseye) (Lite) node version: 16.16.0 Node-red version: 3.0.2 dashboard version: 3.1.7

Here's the logging inside the dashboard during installation until node-red crashes:


2022-08-31T21:23:47.109Z install : node-red-contrib-ui-iro-color-picker 0.1.6

2022-08-31T21:23:47.233Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-ui-iro-color-picker@0.1.6 2022-08-31T21:23:58.211Z [err] npm 2022-08-31T21:23:58.222Z [err]
2022-08-31T21:23:58.223Z [err] WARN 2022-08-31T21:23:58.236Z [err] config production Use --omit=dev instead. 2022-08-31T21:24:34.507Z [out] 2022-08-31T21:24:34.507Z [out] added 1 package in 37s 2022-08-31T21:24:34.590Z rc=0

BernhardKonrad commented 2 months ago

I have the same issue on Node.js v18.20.2 & node-red v3.1.5 & node-red-dashboard v3.6.2. I'm on Linux using Chrome.