# Reading in file missing parts

**URL:** <https://discourse.nodered.org/t/reading-in-file-missing-parts/83026>\
**Category:** General\
**Created:** [20 November 2023 10:11 UTC](https://discourse.nodered.org/t/reading-in-file-missing-parts/83026 "2023-11-20T10:11:50Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![sages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sages/32/85018_2.png) [@sages](https://discourse.nodered.org/u/sages)\
**Post date:** [20 November 2023 10:11 UTC](https://discourse.nodered.org/t/reading-in-file-missing-parts/83026/1 "2023-11-20T10:11:50Z")

</div>

greetings,I have to convert a absolutely massive json string to a javascript object using the default JSON NODE in multiple steps.  
1.The string is read in from the filesystem using the default read file block with the output set to single utf8 string,encoding to default  
and path obviously to the file in question. Parts of the string are allready missing after this block. i'm not sure if this is a debugger limitation limiting string length or if something is happening in actually reading the file

thx for any help in advance  
zsages

---

<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:** [20 November 2023 10:35 UTC](https://discourse.nodered.org/t/reading-in-file-missing-parts/83026/2 "2023-11-20T10:35:36Z")

</div>

The debug output is limited in length to avoid overloading the browser. You can tell it is truncated because it shows a series of dots on the end. If you wish to check it is all there then set the debug node to output to the console and then it will all appear in the node-red log.

If you are on a pi or other debian OS you should be able to see the log by running  
`node-red-log`  
then initiating the read.

Alternatively you can stop node red and start it again in a command window, then the debug output should appear in the command window.

---

<div class="post-metadata">

**Author:** ![sages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sages/32/85018_2.png) [@sages](https://discourse.nodered.org/u/sages)\
**Post date:** [20 November 2023 10:49 UTC](https://discourse.nodered.org/t/reading-in-file-missing-parts/83026/3 "2023-11-20T10:49:00Z")

</div>

it is indeed trunctuated , i'm currently attempting to read the console using  
sudo journalctl -f -u nodered -o cat

unfortunately the terminal just freezes doing this

```auto

```

---

<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:** [20 November 2023 10:58 UTC](https://discourse.nodered.org/t/reading-in-file-missing-parts/83026/4 "2023-11-20T10:58:01Z")

</div>

Does journalctl initially work and then freeze when you do the file read?  
node-red-log and node-red-start also use journalctl.

---

<div class="post-metadata">

**Author:** ![sages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sages/32/85018_2.png) [@sages](https://discourse.nodered.org/u/sages)\
**Post date:** [20 November 2023 11:11 UTC](https://discourse.nodered.org/t/reading-in-file-missing-parts/83026/5 "2023-11-20T11:11:42Z")

</div>

i rebooted and it just doesn't work

systemctl status node-red.service  
works fine

---

<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:** [20 November 2023 11:14 UTC](https://discourse.nodered.org/t/reading-in-file-missing-parts/83026/6 "2023-11-20T11:14:41Z")

</div>

> [@sages](#):
>
> systemctl status node-red.service

You are not using the systemctl service file by by the[recommended install](https://nodered.org/docs/getting-started/raspberrypi). That is nodered.service, not node-red.service.

Possibly you need to use  
`sudo journalctl -f -u node-red -o cat`  
but I don't know what you have done so cannot be certain.

---

<div class="post-metadata">

**Author:** ![sages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sages/32/85018_2.png) [@sages](https://discourse.nodered.org/u/sages)\
**Post date:** [21 November 2023 07:56 UTC](https://discourse.nodered.org/t/reading-in-file-missing-parts/83026/7 "2023-11-21T07:56:43Z")

</div>

unfortunately i am forced to used the preinstalled node red on a siemens iot 2050 os image. so yeah some stuff is weird

---

<div class="post-metadata">

**Author:** ![sages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sages/32/85018_2.png) [@sages](https://discourse.nodered.org/u/sages)\
**Post date:** [21 November 2023 08:02 UTC](https://discourse.nodered.org/t/reading-in-file-missing-parts/83026/8 "2023-11-21T08:02:00Z")

</div>

i also tried `sudo journalctl -f -u node-red -o cat` and that works like a charm and i seem to get the entire string as a output it'll need some more debugging but now i have a start at least so thanks for the help 🙂  
sages

---

<div class="post-metadata">

**Author:** ![sages](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sages/32/85018_2.png) [@sages](https://discourse.nodered.org/u/sages)\
**Post date:** [28 November 2023 08:57 UTC](https://discourse.nodered.org/t/reading-in-file-missing-parts/83026/9 "2023-11-28T08:57:54Z")

</div>

as it turns out,

i was of course the problem. I was looking at the wrong place for a certain variable . classic PEBCAK

thx anyway,

Sages

---

<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:** [27 January 2024 08:58 UTC](https://discourse.nodered.org/t/reading-in-file-missing-parts/83026/10 "2024-01-27T08:58:09Z")

</div>

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