# System logs

**URL:** <https://community.homey.app/t/system-logs/7510>\
**Category:** Developers\
**Created:** [January 20, 2019, 6:26pm UTC](https://community.homey.app/t/system-logs/7510 "2019-01-20T18:26:41Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kyrcio](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kyrcio/32/10170_2.png) [@Kyrcio](https://community.homey.app/u/Kyrcio)\
**Post date:** [January 20, 2019, 6:26pm UTC](https://community.homey.app/t/system-logs/7510/1 "2019-01-20T18:26:41Z")

</div>

How can I view the entire system log for the Homey? I am debugging an error reported by a GitHub user where the app just dies without any exception etc. I need to have a look at the entire system log, but I cannot find anywhere to view it. Anyone who knows?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 20, 2019, 7:28pm UTC](https://community.homey.app/t/system-logs/7510/2 "2019-01-20T19:28:37Z")

</div>

Not possible. Perhaps you can point the user towards installing the app using the CLI, hopefully that will provide more info on why it crashes.

---

<div class="post-metadata">

**Author:** ![Kyrcio](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kyrcio/32/10170_2.png) [@Kyrcio](https://community.homey.app/u/Kyrcio)\
**Post date:** [January 20, 2019, 7:56pm UTC](https://community.homey.app/t/system-logs/7510/3 "2019-01-20T19:56:03Z")

</div>

Yes, I have that log and nothing indicates why it crashed. There is no exception or anything. In a normal Linux environment my next step would be to check dmesg to see if the app was killed due to e.g. memory pressure or access fault (stack overflow?).

---

<div class="post-metadata">

**Author:** ![Kyrcio](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kyrcio/32/10170_2.png) [@Kyrcio](https://community.homey.app/u/Kyrcio)\
**Post date:** [January 21, 2019, 12:02pm UTC](https://community.homey.app/t/system-logs/7510/4 "2019-01-21T12:02:43Z")

</div>

Is there any other way to investigate why an app died? Even the exit code from the Node process would be helpful, I think.

---

<div class="post-metadata">

**Author:** ![Jeroen\_Somhorst](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_somhorst/32/184_2.png) [@Jeroen\_Somhorst](https://community.homey.app/u/Jeroen_Somhorst)\
**Post date:** [January 21, 2019, 12:22pm UTC](https://community.homey.app/t/system-logs/7510/5 "2019-01-21T12:22:04Z")

</div>

you are not able to get the low level logs due to sandboxing. For \<2.x apps you needed to implement code that does stuff when the app goes out of memory or is forcefully killed by the system. Did you implement that?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 21, 2019, 5:39pm UTC](https://community.homey.app/t/system-logs/7510/6 "2019-01-21T17:39:11Z")

</div>

If the process got killed by the OS, it should have shown on the CLI output. Just tested:

```auto
2019-01-21 18:38:17 [log] [MyApp] MyApp is running
2019-01-21 18:38:17 [log] [ManagerDrivers] [test] initializing driver
2019-01-21 18:38:22 [log] [MyApp] Killing myself...

--- INFO: name.klep.helloworld has been killed ---

```

Do you at least get that last line?

---

<div class="post-metadata">

**Author:** ![Kyrcio](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kyrcio/32/10170_2.png) [@Kyrcio](https://community.homey.app/u/Kyrcio)\
**Post date:** [January 21, 2019, 5:47pm UTC](https://community.homey.app/t/system-logs/7510/7 "2019-01-21T17:47:18Z")

</div>

No, this is the last line (and the only out of the ordinary):

```
✖ Connection has been lost, exiting...
```

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 21, 2019, 7:02pm UTC](https://community.homey.app/t/system-logs/7510/8 "2019-01-21T19:02:18Z")

</div>

I wonder if it’s the built-in HTTP server that might be crashing. Any idea if they are experiencing any other issues besides your app mysteriously crashing?

---

<div class="post-metadata">

**Author:** ![Kyrcio](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kyrcio/32/10170_2.png) [@Kyrcio](https://community.homey.app/u/Kyrcio)\
**Post date:** [January 21, 2019, 7:55pm UTC](https://community.homey.app/t/system-logs/7510/9 "2019-01-21T19:55:59Z")

</div>

Got something now. The user could reproduce the issue on the app store version and sent an error report.  
The log ends with:

```
---- stderr ----
(node:5468) UnhandledPromiseRejectionWarning: a: network timeout at: http://localhost:80/api/manager/system/storage
    at Timeout._onTimeout (/node_modules/athom-api/dist/index.js:1:315053)
    at ontimeout (timers.js:498:11)
    at tryOnTimeout (timers.js:323:5)
    at Timer.listOnTimeout (timers.js:290:5)
(node:5468) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5468) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

```

Not sure what it means though…

---

<div class="post-metadata">

**Author:** ![Kyrcio](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kyrcio/32/10170_2.png) [@Kyrcio](https://community.homey.app/u/Kyrcio)\
**Post date:** [January 21, 2019, 8:04pm UTC](https://community.homey.app/t/system-logs/7510/10 "2019-01-21T20:04:45Z")

</div>

Actually, now I see that stdout and stderr are separated, so this might just be a warning that occurred earlier. Never saw this warning before though.

---

<div class="post-metadata">

**Author:** ![Peter\_Johansson](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_johansson/32/15617_2.png) [@Peter\_Johansson](https://community.homey.app/u/Peter_Johansson)\
**Post date:** [January 21, 2019, 8:38pm UTC](https://community.homey.app/t/system-logs/7510/11 "2019-01-21T20:38:51Z")

</div>

I´m the user with the problem… And i can add that i havent got any other problems with other apps they run like they should.

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [January 21, 2019, 8:50pm UTC](https://community.homey.app/t/system-logs/7510/12 "2019-01-21T20:50:50Z")

</div>

It’s a warning, in the sense that it’s not the cause for your process to exit. But it might be related to why it’s exiting.

It might be worthwhile to ask Athom (through [this page](https://support.athom.com/hc/en-us/requests/new)) what this warning means. It seems to originate from somewhere inside Homey’s core.

---

<div class="post-metadata">

**Author:** ![Kyrcio](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kyrcio/32/10170_2.png) [@Kyrcio](https://community.homey.app/u/Kyrcio)\
**Post date:** [January 22, 2019, 7:51am UTC](https://community.homey.app/t/system-logs/7510/13 "2019-01-22T07:51:46Z")

</div>

@Peter_Johansson PM me your email address and I can add you to the alpha testing. I have tried adding try/catch around the block that accesses storage. Or just use the GitHub way…
