iprodanovbg / homeassistant-desktop

🎛 Desktop application (Windows / macOS / Linux) for Home Assistant built with Electron
Apache License 2.0
394 stars 39 forks source link

[v1.5.3] Crashing again once connection to HA is lost (e. g. after restore from hibernate) #20

Open bcutter opened 1 year ago

bcutter commented 1 year ago

The previous error of the application crashing once the connection to HA has been interrupted and should be fixed according to https://community.home-assistant.io/t/home-assistant-desktop-macos-windows-and-linux-quick-and-easy-access-to-ha/196191/87 is now back with v1.5.3.

Click on "Reconnect" (e. g. after restoring the OS from hibernation) --> the app crashes and closes/exits. Windows 10 x64 22H2 grafik

How to finally get rid of this annoyance?

ComGreed commented 1 year ago

Error after connection loss: [2023-02-20 22:23:05.601] [error] Response error: [object Object] Error after crash from pressing restart: [2023-02-20 22:27:43.792] [error] Unhandled Exception TypeError: Object has been destroyed at Timeout._onTimeout (C:\Users\User\AppData\Local\Programs\homeassistant-desktop\resources\app.asar\app.js:645:37) at listOnTimeout (node:internal/timers:559:17) at process.processTimers (node:internal/timers:502:7)

palves commented 1 year ago

I see the same on GNU/Linux. When connection is lost, and I click the reconnect button, the app crashes, and I get:

11:41:29.853 › Unhandled Exception UnhandledRejection Error: ERR_FAILED (-2) loading 'file:///tmp/.mount_Home-AE0J6YN/resources/app.asar/web/index.html' at rejectAndCleanup (node:electron/js2c/browser_init:165:7506) at EventEmitter.stopLoadingListener (node:electron/js2c/browser_init:165:7881) at EventEmitter.emit (node:events:527:28) (node:2287891) UnhandledPromiseRejectionWarning: UnhandledRejection Error: ERR_FAILED (-2) loading 'file:///tmp/.mount_Home-AE0J6YN/resources/app.asar/web/index.html' at rejectAndCleanup (node:electron/js2c/browser_init:165:7506) at EventEmitter.stopLoadingListener (node:electron/js2c/browser_init:165:7881) at EventEmitter.emit (node:events:527:28) (Use homeassistant-desktop --trace-warnings ... to show where the warning was created) (node:2287891) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

palves commented 1 year ago

BTW, I'm surprised the reconnection isn't automatic. I need to manually reconnect (well, restart due to the crash) whenever I suspend/resume my laptop. Other apps automatically reconnect when they detect that network is up again, this one should be able to too, right?

MastrUsr commented 1 year ago

Same for me on Windows 11 after hibernate. Reconnect just exits the program, restart throws error then restarts as normal, image

numanair commented 1 year ago

Here is the text from the error in searchable format.

A JavaScript error occurred in the browser process TypeError: Object has been destroyed at Timeout._onTimeout (C:\Users\Cole\AppData\Local\Programs\homeassistant-desktop\resources\app.asar\app.js:645:37) at listOnTimeout (node:internal/timers:559:17) at process.processTimers (node:internal/timers:502:7)

Shazib commented 1 year ago

I have the same error when i resume Windows (10 & 11) after sleep or hibernate, if you click reconnect it crashes

lsellens commented 1 year ago

I keep running into this error on ubuntu 22.04.2 Plan was to run this on a old MS surface mounted to the wall. Would be awesome if the app didn't keep crashing so often. Doesn't look like the author is very active.

uzivatel44 commented 3 months ago

hello, please autor fix this stupid bug. App working very well thank you for it, but i need every time restart when wake up from hibernate or sleep.