# Uncaught exception in node red dashboard (ui\_dropdown)

**URL:** <https://discourse.nodered.org/t/uncaught-exception-in-node-red-dashboard-ui-dropdown/51805>\
**Category:** Dashboard\
**Created:** [3 October 2021 17:36 UTC](https://discourse.nodered.org/t/uncaught-exception-in-node-red-dashboard-ui-dropdown/51805 "2021-10-03T17:36:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bart](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bart](https://discourse.nodered.org/u/bart)\
**Post date:** [3 October 2021 17:36 UTC](https://discourse.nodered.org/t/uncaught-exception-in-node-red-dashboard-ui-dropdown/51805/1 "2021-10-03T17:36:34Z")

</div>

Hi!

I found bug in ui\_dropdown. It crashes server. Windows 10!  
[Inkednodered\_error\_LI|690x176](https://discourse.nodered.org/uploads/short-url/ySOofA66gQIqvoMly0bmc5qnniw.jpeg)

Please fix it ! ☹ Thank you!

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [3 October 2021 17:39 UTC](https://discourse.nodered.org/t/uncaught-exception-in-node-red-dashboard-ui-dropdown/51805/2 "2021-10-03T17:39:39Z")

</div>

Hi @bart

Can you share any details about the flow that is hitting this error?

How is the node configured? What messages are you passing it?

Without more information, you aren't giving us a lot to go on.

---

<div class="post-metadata">

**Author:** ![bart](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@bart](https://discourse.nodered.org/u/bart)\
**Post date:** [3 October 2021 17:48 UTC](https://discourse.nodered.org/t/uncaught-exception-in-node-red-dashboard-ui-dropdown/51805/3 "2021-10-03T17:48:44Z")

</div>

Hi @knolleary

I´m injecting to the node table with numbers(int).

I have only filled a placeholder in node configuration.

After injecting new data to ui\_dropdown is all good. Error occurs after selecting a value.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [3 October 2021 17:50 UTC](https://discourse.nodered.org/t/uncaught-exception-in-node-red-dashboard-ui-dropdown/51805/4 "2021-10-03T17:50:50Z")

</div>

That really still doesn't give enough specific information for us to try to recreate it. Can you share an example flow?

---

<div class="post-metadata">

**Author:** ![davidz](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@davidz](https://discourse.nodered.org/u/davidz)\
**Post date:** [3 October 2021 21:50 UTC](https://discourse.nodered.org/t/uncaught-exception-in-node-red-dashboard-ui-dropdown/51805/5 "2021-10-03T21:50:01Z")

</div>

Most likely it is an user error.

Make sure that the number selection or string selection is consistent. See attached picture. "09" is for numbers, "az" for strings.

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/5/857eabd180eb2c6ae2117268ff65106b862cd2df.jpeg)

The new dashboard version 3.0.4 is pretty strict about the data type. Mixing them up can crash Node-RED. I actually like it, coming from strict C/C++ background.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [3 October 2021 22:33 UTC](https://discourse.nodered.org/t/uncaught-exception-in-node-red-dashboard-ui-dropdown/51805/6 "2021-10-03T22:33:12Z")

</div>

> [@davidz](#):
>
> The new dashboard version 3.0.4 is pretty strict about the data type

But it should never cause a crash. It may be strict, but it should handle misconfigurations with grace.

---

<div class="post-metadata">

**Author:** ![davidz](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@davidz](https://discourse.nodered.org/u/davidz)\
**Post date:** [4 October 2021 00:10 UTC](https://discourse.nodered.org/t/uncaught-exception-in-node-red-dashboard-ui-dropdown/51805/7 "2021-10-04T00:10:22Z")

</div>

Yes I agree.

Here is how to create a crash from the dropdown menu:

1. Import the following flow. Inject the message to create the dropdown list.

```auto
[{"id":"cedb9ad9296ad6e3","type":"ui_dropdown","z":"a7dc7375.637e7","name":"","label":"test","tooltip":"","place":"Select option","group":"c5dac9f2874b5c3a","order":3,"width":0,"height":0,"passthru":true,"multiple":false,"options":[],"payload":"","topic":"topic","topicType":"msg","className":"","x":510,"y":220,"wires":[["d746a8a341e105ff"]]},{"id":"d746a8a341e105ff","type":"debug","z":"a7dc7375.637e7","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":730,"y":220,"wires":[]},{"id":"78e22dd96035dfe2","type":"function","z":"a7dc7375.637e7","name":"","func":"\n\n\nmsg.options=[50,100,200];\n\nmsg.payload=50;\n \n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":340,"y":220,"wires":[["cedb9ad9296ad6e3"]]},{"id":"ca1e42e43367a248","type":"inject","z":"a7dc7375.637e7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":220,"wires":[["78e22dd96035dfe2"]]},{"id":"c5dac9f2874b5c3a","type":"ui_group","name":"Default","tab":"b15d581341d0093f","order":1,"disp":false,"width":"8","collapse":false,"className":""},{"id":"b15d581341d0093f","type":"ui_tab","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

1. Select another value such as 100 from the list. You will notice that Node-RED crashes.  
 ![bug](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/3/239656e50b934467fffb18e1c30263796b2087bc.jpeg)

---

<div class="post-metadata">

**Author:** ![davidz](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@davidz](https://discourse.nodered.org/u/davidz)\
**Post date:** [4 October 2021 00:16 UTC](https://discourse.nodered.org/t/uncaught-exception-in-node-red-dashboard-ui-dropdown/51805/8 "2021-10-04T00:16:39Z")

</div>

The above crash case is different from the data type discrepancy crash that I mentioned before. Sorry I can not duplicate the string/number crash case after we corrected the data type (I just remembered that we corrected the data type and the software stopped crashing).  
Maybe OP can contribute the test case.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [3 November 2021 00:16 UTC](https://discourse.nodered.org/t/uncaught-exception-in-node-red-dashboard-ui-dropdown/51805/9 "2021-11-03T00:16:43Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
