# TypeError: Cannot read property 't' of undefined

**URL:** <https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557>\
**Category:** General\
**Created:** [31 May 2020 06:59 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557 "2020-05-31T06:59:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![DemonKing](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@DemonKing](https://discourse.nodered.org/u/DemonKing)\
**Post date:** [31 May 2020 06:59 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/1 "2020-05-31T06:59:47Z")

</div>

node-red-contrib-filebrowser

When i try to connect throws this error please find a solution for this  
thanks

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [31 May 2020 09:41 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/2 "2020-05-31T09:41:25Z")

</div>

You are really going to have to elaborate on the problem to get an answer.

Maybe post the flow?  
Or the part of the flow that has the problem, at least.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [31 May 2020 11:02 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/3 "2020-05-31T11:02:18Z")

</div>

Possibly you are passing it invalid messages. Show us how you have configured the node and also put a debug node showing what it going into it and show us what the debug node shows.

---

<div class="post-metadata">

**Author:** ![DemonKing](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@DemonKing](https://discourse.nodered.org/u/DemonKing)\
**Post date:** [31 May 2020 11:17 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/4 "2020-05-31T11:17:26Z")

</div>

its accured part of the flow

---

<div class="post-metadata">

**Author:** ![DemonKing](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@DemonKing](https://discourse.nodered.org/u/DemonKing)\
**Post date:** [31 May 2020 11:20 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/5 "2020-05-31T11:20:32Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/a/ea3e8c42786c46d66364cd9ecf38adac11a156b3.png)

its my flows

---

<div class="post-metadata">

**Author:** ![DemonKing](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@DemonKing](https://discourse.nodered.org/u/DemonKing)\
**Post date:** [31 May 2020 11:22 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/6 "2020-05-31T11:22:28Z")

</div>

TypeError: Cannot read property 't' of undefined  
at fileBrowserClient.\_inputCallback (D:\Vignesh\Personal\Node-red\installation.node-red\node\_modules\node-red-contrib-filebrowser\filebrowser.js:74:47)  
at fileBrowserClient.Node.\_emitInput (D:\Vignesh\Personal\Node-red\installation\node\_modules@node-red\runtime\lib\nodes\Node.js:200:18)  
at Immediate.\_onImmediate (D:\Vignesh\Personal\Node-red\installation\node\_modules@node-red\runtime\lib\nodes\Node.js:179:33)  
at processImmediate (internal/timers.js:456:21

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [31 May 2020 11:54 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/7 "2020-05-31T11:54:48Z")

</div>

So which node is causing the error?

What settings are in the "Repository" node?

What is coming out of the unnamed function before the file node? (Add a debug node set to show complete message)

Does the file you are attempting to load exist?

What account runs node-red and does that account have access to the file you are attempting to load?

Note: sometimes a screenshot is is enough, but there are a number of things we cannot figure out from just a screenshot of a flow.

---

<div class="post-metadata">

**Author:** ![DemonKing](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@DemonKing](https://discourse.nodered.org/u/DemonKing)\
**Post date:** [31 May 2020 12:08 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/8 "2020-05-31T12:08:11Z")

</div>

1.Repository node : i given SMB shared loation username pass and folder name  
2.function o/p : msg.payload="testing" ; msg.filename = "testing.txt"  
3.i try to create file  
4.i run node red as a service , and i given credentials thats creadentials had a access for read /write

---

<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:** [31 May 2020 12:09 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/9 "2020-05-31T12:09:00Z")

</div>

If noone here has experience of the node (and it is not one I have seen mentioned before) you may well have to contact the author directly.

> **[SCISYS-MS/node-red-contrib-filebrowser](https://github.com/SCISYS-MS/node-red-contrib-filebrowser/issues)**
>
> A node-red node to access SMB/CIFS Shares and FTP Repositories - SCISYS-MS/node-red-contrib-filebrowser

---

<div class="post-metadata">

**Author:** ![Soft4](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/soft4/32/3675_2.png) [@Soft4](https://discourse.nodered.org/u/Soft4)\
**Post date:** [11 June 2020 08:41 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/10 "2020-06-11T08:41:02Z")

</div>

did you find a solution? I have the same problems.

---

<div class="post-metadata">

**Author:** ![Soft4](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/soft4/32/3675_2.png) [@Soft4](https://discourse.nodered.org/u/Soft4)\
**Post date:** [11 June 2020 09:06 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/11 "2020-06-11T09:06:15Z")

</div>

Or another way to go to an SMB / CIFS network folder.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [11 June 2020 10:51 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/12 "2020-06-11T10:51:08Z")

</div>

If you mount the network folder locally then you can access it like a normal folder.

---

<div class="post-metadata">

**Author:** ![Soft4](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/soft4/32/3675_2.png) [@Soft4](https://discourse.nodered.org/u/Soft4)\
**Post date:** [11 June 2020 11:29 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/13 "2020-06-11T11:29:05Z")

</div>

I mapped the folder as z. But I get the following message  
"failed to write to file: Error: ENOENT: no such file or directory, open 'Z: \ test.txt'"  
I work with the file node.

file name Z:\test.txt

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 June 2020 11:31 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/14 "2020-06-11T11:31:07Z")

</div>

What account runs node red? Does that account have access to network share? Does it have file/folder permissions?

Note. Drive mapping is usually a per user thing so if node-red runs under system or another account it will have no awareness of your mapped drive.

---

<div class="post-metadata">

**Author:** ![Soft4](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/soft4/32/3675_2.png) [@Soft4](https://discourse.nodered.org/u/Soft4)\
**Post date:** [11 June 2020 11:36 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/15 "2020-06-11T11:36:04Z")

</div>

I have account when i give a username and password.

When I look in task manager there is only 1 user active.

It runs node red under windows 10

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [11 June 2020 12:33 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/16 "2020-06-11T12:33:00Z")

</div>

Can you write to the file manually?  
Try reading a file, that may show that you have some access.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 June 2020 14:05 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/17 "2020-06-11T14:05:22Z")

</div>

> [@Soft4](#):
>
> It runs node red under windows 10

As a service? or do you launch it in a cmd window?

---

<div class="post-metadata">

**Author:** ![Soft4](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/soft4/32/3675_2.png) [@Soft4](https://discourse.nodered.org/u/Soft4)\
**Post date:** [11 June 2020 14:10 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/18 "2020-06-11T14:10:53Z")

</div>

CMD window

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 June 2020 14:24 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/19 "2020-06-11T14:24:21Z")

</div>

ok, have you tried a regular file node? That's what I use if the account running node-red has access to the share.

As a test try this flow (adjust the file name in the file node to suit)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/e/ae034b66880e024f189dca4f2b3dae90672e8c66.png)

```auto
[{"id":"59eb848a.3f5aec","type":"file","z":"e5771976.6bcf88","name":"","filename":"//SERVER/SHARE/test.txt","appendNewline":true,"createDir":false,"overwriteFile":"true","x":730,"y":260,"wires":[["2d31c491.f1b93c"]]},{"id":"9b23cf77.49b56","type":"inject","z":"e5771976.6bcf88","name":"","topic":"","payload":"this is a test","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":510,"y":260,"wires":[["59eb848a.3f5aec"]]}]

```

---

<div class="post-metadata">

**Author:** ![Soft4](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/soft4/32/3675_2.png) [@Soft4](https://discourse.nodered.org/u/Soft4)\
**Post date:** [11 June 2020 14:39 UTC](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557/20 "2020-06-11T14:39:39Z")

</div>

"failed to write to file: Error: UNKNOWN: unknown error, open '\190.200.110.4\dtaustx\test.txt'"

I think it is an access control problem.  
I have to put a user and password to map the folder.

[Next page](https://discourse.nodered.org/t/typeerror-cannot-read-property-t-of-undefined/27557.md?page=2)
