Function node not working after update

Hello everybody,

after I upgraded my instance I noticed that my function-nodes aren't working anymore. When I try to edit them I do not even see the function. Now they have several Tabs
(setup, start, function, stop) but all of them are empty. I see a textarea in the Start-tab but not in the function-tab or in the stop-tab.

I guess the node is broken after the Update. Any chance to fix it?

Best regards

No, the function node works perfectly - you have an issue

Hey Steve,

I am using Chrome.latest (Version 107.0.5304.107 (Offizieller Build) (64-Bit) )
Firefox.latest has the same behaviour.

Screen of the Node after double-click (opening the node)

Console shows no errors.

Injecting one of the function-nodes shows an error in the Debug-Window:
"TypeError: Cannot read properties of undefined (reading '12')"

But I can't debug that any further, cause the function node doesn't show the function it is calling.

:confused:

What device and operating system are you running Node-red on?
What device is your browser on? Have you tried clearing the browser cache?

What versions of Node-red, node.js and npm do you have?

How did you update?

How long is it since you last backed up Node-red? Make a copy of your .node-red folder.

Hi.

Can you screeshot the part of the flow where these function nodes are?

Oh, but don't crop the picture. Zoom in if you must hide anything else.
This will help as it will help with the bigger picture of how many tabs you have and may be helpful.

The Functions are implemented in many different ways all over many tabs. None of them is working.But I found another not working functionality that may help finding the error.

I have installed "node-red-dashboard" and when opening the "Dashboard"-Menu it is also empty.

I also have to correct my post from above.
Loading Node-Red does not cause any errors in the console.
But opening the function node throws them:

editor-tab-description TypeError: Cannot convert object to primitive value
    at e.is (editor.js:2:414927)
    at l (editor.js:2:434222)
    at W._setListeningToMouseWheel (editor.js:2:301743)
    at new F (editor.js:2:299657)
    at new W (editor.js:2:305087)
    at new Ft (editor.js:2:1133059)
    at new dn (editor.js:2:1230463)
    at qa._createView (editor.js:2:1362020)
    at qa._attachModel (editor.js:2:1360036)
    at new qa (editor.js:2:3034985)
red.min.js?v=3.0.2:18 oneditprepare f44e64c.1f91f98 function TypeError: Cannot convert object to primitive value
red.min.js?v=3.0.2:18 TypeError: Cannot convert object to primitive value
    at e.is (editor.js:2:414927)
    at l (editor.js:2:434222)
    at W._setListeningToMouseWheel (editor.js:2:301743)
    at new F (editor.js:2:299657)
    at new W (editor.js:2:305087)
    at new Ft (editor.js:2:1133059)
    at new dn (editor.js:2:1230463)
    at qa._createView (editor.js:2:1362020)
    at qa._attachModel (editor.js:2:1360036)
    at new qa (editor.js:2:3034985)
red.min.js?v=3.0.2:18 oneditresize f44e64c.1f91f98 function TypeError: Cannot read properties of undefined (reading 'resize')
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at new ne (editor.js:2:1964485)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at new Ka (editor.js:2:3032435)
    at new qa (editor.js:2:3034713)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:1975542)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:2118459)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:2291565)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at e.is (editor.js:2:414927)
    at l (editor.js:2:434222)
    at u.clear (editor.js:2:434698)
    at e._updateTriggerCharacters (editor.js:2:2606602)
    at new e (editor.js:2:2606046)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:2658030)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:2379045)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:2389238)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new f (editor.js:2:2713894)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at new ne (editor.js:2:1964485)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at new Ka (editor.js:2:3032435)
    at new qa (editor.js:2:3034713)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
buildEditor @ VM190:350
oneditprepare @ VM190:378
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:1975542)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
buildEditor @ VM190:350
oneditprepare @ VM190:378
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:2118459)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
buildEditor @ VM190:350
oneditprepare @ VM190:378
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:2291565)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
buildEditor @ VM190:350
oneditprepare @ VM190:378
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at e.is (editor.js:2:414927)
    at l (editor.js:2:434222)
    at u.clear (editor.js:2:434698)
    at e._updateTriggerCharacters (editor.js:2:2606602)
    at new e (editor.js:2:2606046)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:2658030)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
buildEditor @ VM190:350
oneditprepare @ VM190:378
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:2379045)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
buildEditor @ VM190:350
oneditprepare @ VM190:378
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:2389238)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
buildEditor @ VM190:350
oneditprepare @ VM190:378
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new f (editor.js:2:2713894)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
buildEditor @ VM190:350
oneditprepare @ VM190:378
t @ red.min.js?v=3.0.2:18
R @ red.min.js?v=3.0.2:18
open @ red.min.js?v=3.0.2:18
n @ red.min.js?v=3.0.2:18
show @ red.min.js?v=3.0.2:18
edit @ red.min.js?v=3.0.2:18
gt @ red.min.js?v=3.0.2:18
i @ vendor.js?v=3.0.2:35
red.min.js?v=3.0.2:18 oneditresize f44e64c.1f91f98 function TypeError: Cannot read properties of undefined (reading 'resize')
red.min.js?v=3.0.2:18 oneditresize f44e64c.1f91f98 function TypeError: Cannot read properties of undefined (reading 'resize')

Any hints from that?

Opening the Dashboard-Tab throws the same errors (more or less)

Uncaught TypeError: Cannot convert object to primitive value
    at e.is (editor.js:2:414927)
    at l (editor.js:2:434222)
    at W._setListeningToMouseWheel (editor.js:2:301743)
    at new F (editor.js:2:299657)
    at new W (editor.js:2:305087)
    at new Ft (editor.js:2:1133059)
    at new dn (editor.js:2:1230463)
    at qa._createView (editor.js:2:1362020)
    at qa._attachModel (editor.js:2:1360036)
    at new qa (editor.js:2:3034985)
e.is @ editor.js:2
l @ editor.js:2
_setListeningToMouseWheel @ editor.js:2
F @ editor.js:2
W @ editor.js:2
Ft @ editor.js:2
dn @ editor.js:2
_createView @ editor.js:2
_attachModel @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
refresh @ VM308:2441
onchange @ VM308:2511
onchange @ red.min.js?v=3.0.2:18
_ @ red.min.js?v=3.0.2:18
onselect @ red.min.js?v=3.0.2:18
f @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
dispatch @ vendor.js?v=3.0.2:2
v.handle @ vendor.js?v=3.0.2:2
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at new ne (editor.js:2:1964485)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at new Ka (editor.js:2:3032435)
    at new qa (editor.js:2:3034713)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
refresh @ VM308:2441
onchange @ VM308:2511
onchange @ red.min.js?v=3.0.2:18
_ @ red.min.js?v=3.0.2:18
onselect @ red.min.js?v=3.0.2:18
f @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
dispatch @ vendor.js?v=3.0.2:2
v.handle @ vendor.js?v=3.0.2:2
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:1975542)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
refresh @ VM308:2441
onchange @ VM308:2511
onchange @ red.min.js?v=3.0.2:18
_ @ red.min.js?v=3.0.2:18
onselect @ red.min.js?v=3.0.2:18
f @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
dispatch @ vendor.js?v=3.0.2:2
v.handle @ vendor.js?v=3.0.2:2
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:2118459)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
refresh @ VM308:2441
onchange @ VM308:2511
onchange @ red.min.js?v=3.0.2:18
_ @ red.min.js?v=3.0.2:18
onselect @ red.min.js?v=3.0.2:18
f @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
dispatch @ vendor.js?v=3.0.2:2
v.handle @ vendor.js?v=3.0.2:2
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:2291565)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
refresh @ VM308:2441
onchange @ VM308:2511
onchange @ red.min.js?v=3.0.2:18
_ @ red.min.js?v=3.0.2:18
onselect @ red.min.js?v=3.0.2:18
f @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
dispatch @ vendor.js?v=3.0.2:2
v.handle @ vendor.js?v=3.0.2:2
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at e.is (editor.js:2:414927)
    at l (editor.js:2:434222)
    at u.clear (editor.js:2:434698)
    at e._updateTriggerCharacters (editor.js:2:2606602)
    at new e (editor.js:2:2606046)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:2658030)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
refresh @ VM308:2441
onchange @ VM308:2511
onchange @ red.min.js?v=3.0.2:18
_ @ red.min.js?v=3.0.2:18
onselect @ red.min.js?v=3.0.2:18
f @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
dispatch @ vendor.js?v=3.0.2:2
v.handle @ vendor.js?v=3.0.2:2
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:2379045)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
refresh @ VM308:2441
onchange @ VM308:2511
onchange @ red.min.js?v=3.0.2:18
_ @ red.min.js?v=3.0.2:18
onselect @ red.min.js?v=3.0.2:18
f @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
dispatch @ vendor.js?v=3.0.2:2
v.handle @ vendor.js?v=3.0.2:2
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new e (editor.js:2:2389238)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
refresh @ VM308:2441
onchange @ VM308:2511
onchange @ red.min.js?v=3.0.2:18
_ @ red.min.js?v=3.0.2:18
onselect @ red.min.js?v=3.0.2:18
f @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
dispatch @ vendor.js?v=3.0.2:2
v.handle @ vendor.js?v=3.0.2:2
editor.js:2 Uncaught Error: Cannot convert object to primitive value

TypeError: Cannot convert object to primitive value
    at LinkedMap.entries (editor.js:2:447525)
    at [Symbol.iterator] (editor.js:2:447783)
    at u._overall (editor.js:2:1839838)
    at u.default (editor.js:2:1839903)
    at h._overallAverage (editor.js:2:1840469)
    at h.for (editor.js:2:1840332)
    at new f (editor.js:2:2713894)
    at ha._createInstance (editor.js:2:3011364)
    at ha.createInstance (editor.js:2:3010808)
    at new e (editor.js:2:1341705)
    at editor.js:2:392210
(anonymous) @ editor.js:2
setTimeout (async)
unexpectedErrorHandler @ editor.js:2
onUnexpectedError @ editor.js:2
o @ editor.js:2
e @ editor.js:2
Ka @ editor.js:2
qa @ editor.js:2
_createInstance @ editor.js:2
createInstance @ editor.js:2
create @ editor.js:2
create @ red.min.js?v=3.0.2:18
create @ red.min.js?v=3.0.2:18
createEditor @ red.min.js?v=3.0.2:18
refresh @ VM308:2441
onchange @ VM308:2511
onchange @ red.min.js?v=3.0.2:18
_ @ red.min.js?v=3.0.2:18
onselect @ red.min.js?v=3.0.2:18
f @ red.min.js?v=3.0.2:18
(anonymous) @ red.min.js?v=3.0.2:18
dispatch @ vendor.js?v=3.0.2:2
v.handle @ vendor.js?v=3.0.2:2

Sorry, way above my skill set.

I would suggest you answer @jbudd questions.

Node-red version, computer, and so on.

Sorry, haven't seen that post while answering the other questions.

Node-Red is installed within an iobroker instance on a raspberry pi.
node -v
v18.12.1

npm -v
8.19.3

My Browser is running on Windows 10.latest, cache is cleared.
Access from a complete other Machine still shows the same issue. Checked with Chrome and FF on two different Machines (Win10 both)

I haven't updated Node-Red and iobroker for about a year because there were breaking changes and the system was in use. Due to a lack of time no update was possible.
I updated all Adapters in the iobroker and when the time came to node-red and the "admin" adapter I updated node and npm directly on the shell. Worked fine. Afterwards all services started again and only node-red shows some issues like the function node or the Dashboard. Even Zigbee-Adapter found all Devices and communicates with all of these.

Before running such a big Update-Routine I created a complete copy of the SD-Card, so I could start from scratch if I had to. But as updating was very time consuming and I already changed and adapted some new services and routines I'd prefer to keep the current version. But it won't be such a big deal if I had to crash the current version. I HAVE a backup.

Edit: Saw a message in iobroker regarding incompatibilities to nodejs and npm in the v18 so I downgraded nodejs to 16.18.1 (suggested by iobroker) now and upgraded npm to 9.1.1 (latest, suggested) The errors however still stay the same :confused:

Can you tell us what other nodes you have installed?

  1. @alpine-code/node-red-contrib-papertrail
  2. node-red
  3. node-red-contrib-aedes
  4. node-red-contrib-aggregator
  5. node-red-contrib-alexa-cakebaked
  6. node-red-contrib-calc
  7. node-red-contrib-deconz
  8. node-red-contrib-deduplicate
  9. node-red-contrib-miio-roborock
  10. node-red-contrib-mqtt-broker
  11. node-red-contrib-os
  12. node-red-contrib-polymer
  13. node-red-contrib-simpletime
  14. node-red-contrib-telegrambot
  15. node-red-contrib-xiaomi-roborock
  16. node-red-contrib-yeelight
  17. node-red-contrib-zigbee
  18. node-red-dashboard
  19. node-red-node-email
  20. node-red-node-feedparser
  21. node-red-node-ping
  22. node-red-node-sentiment
  23. node-red-node-twitter
  24. node-red-node-ui-iframe
  25. node-red-node-wol

Just a thought:

What happens if you export the function node and paste it into a notepad type program?

(Or post it here if there is anything interesting)
(Shrug) Just a thought/another way to see if we can get into/behind the smoke and mirrors which seem to have appeared.

Thats a good idea.
But I don't think the issue is in the function nodes themselves. Even if I drag an empty node in I have the same issue.

Here is an example-export:

 {
        "id": "8be37834.6482c8",
        "type": "function",
        "z": "c5c03d01.430e1",
        "name": "GetVerbrauchToday",
        "func": "var energyWallboxMotorradToday = global.get('energyWallboxMotorradToday');\nvar energyWallboxMotorradYesterday = global.get('energyWallboxMotorradYesterday');\nif(energyWallboxMotorradYesterday == undefined) {\n    energyWallboxMotorradYesterday = 0;\n    global.set(\"energyWallboxMotorradYesterday\",0);\n}\n\nvar verbrauchToday = (energyWallboxMotorradToday - energyWallboxMotorradYesterday)/1000;\nvar verbrauchTodayRounded = Math.round((verbrauchToday + Number.EPSILON) * 100) / 100;\nvar valuesMonth = global.get('valuesMonth');\n\nvar jetzt = new Date();\ntag = jetzt.getDate(),\nkey = tag-2; //1x für das Array, da es bei 0 anfängt und einmal -1 da wir die werte für GESTERN speichern wollen\nif(key == -1) key = 0;\nvaluesMonth[key] += verbrauchTodayRounded;\nglobal.set('valuesMonth', valuesMonth);\n\n//Verbrauch von heute zu \"yesterday\" machen\nglobal.set(\"energyWallboxMotorradYesterday\",energyWallboxMotorradToday);\nmsg.payload = verbrauchToday;\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 540,
        "y": 180,
        "wires": [
            [
                "97ba8af6.579358",
                "37ffead3.3b4486",
                "9762ccc005b39077"
            ]
        ]
    },

Ah, I got it working.
After upgrading node-red with nodejs v18 I downgraded to v16, rebuilt the node-red adapter and updated the whole pallette. There were alot of upgrades in node red left to do.

After restarting node-red the function nodes are working now. So I guess I still had some kind of incompatibility in there.

Thanks alot guys!

1 Like

Agreed.

But it at least establishes that there is something there and NOT an empty function node.

But now it is beyond me.
I'm head over heels with other problems, so sorry, my resources are limited.

Good to hear you got it resolved.

Top marks.

node-red-contrib-deconz has (had) a known issues with prototype pollution affecting the new code editor: 🎉 Node-RED 2.0 Released - #43 by Steve-Mcl

However, I have not seen the behaviour you describe before - though I would not be surprised if this was the result of latest node-red version + version of Monaco + node v18 + old contrib nodes

I suspect however Node V18 would be OK if all your contrib nodes had been updated (since others are using Node V18).

as node-red-contrib-deconz isnt working for me anyway I'm gonna delete that node. I am using iobroker for the access to the devices instead

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