TypeError: Cannot set properties of undefined (setting 'mode')

Hello, I keep running into this issue with node-red and I'm not sure on how to fix it. Any help would be greatly appreciated. I ran standardfirmataplus on my arduino/Teensy. Node-red worked earlier but when I started another project I get this error message on my command prompt

Node-RED version: v3.0.2
Node.js version: v18.12.1
27 Nov 20:32:36 - [warn] Encrypted credentials not found
27 Nov 20:32:36 - [info] Server now running at
27 Nov 20:32:36 - [info] Starting flows
27 Nov 20:32:36 - [info] Started flows
27 Nov 20:32:41 - [red] Uncaught Exception:
27 Nov 20:32:41 - [error] TypeError: Cannot set properties of undefined (setting 'mode')
at Firmata.pinMode (C:\Users\MacDo.node-red\node_modules\firmata-io\lib\firmata.js:945:44)
at doit (C:\Users\MacDo.node-red\node_modules\node-red-node-arduino\35-arduino.js:80:63)
at Firmata. (C:\Users\MacDo.node-red\node_modules\node-red-node-arduino\35-arduino.js:122:62)
at Object.onceWrapper (node:events:627:28)
at Firmata.emit (node:events:525:35)
at Firmata.ready (C:\Users\MacDo.node-red\node_modules\firmata-io\lib\firmata.js:733:13)
at Object.onceWrapper (node:events:627:28)
at Firmata.emit (node:events:513:28)
at 106 (C:\Users\MacDo.node-red\node_modules\firmata-io\lib\firmata.js:293:11)
at SerialPort. (C:\Users\MacDo.node-red\node_modules\firmata-io\lib\firmata.js:640:15)


In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)

   code goes here 

You can edit and correct your post by clicking the pencil :pencil2: icon.

See this post for more details - How to share code or flow json

That is a bit odd... the code in question would occur is the board isn't ready - and yet line 122 is a callback from the "board ready" event... that then calls this code to set the mode... so something is telling porky pies... either it is saying it's ready before it really is... or it's going ready then failing so quick that it's no longer ready...

Can you try with Standard Firmata - not the plus version you mention ? (or can you send a pointer to the plus version you are using so we can give it a try...) Thankls

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