Unable to connect the app

Hello there

I am unable to connect the smartphone of my brother for longer than a few hours.

When I do the first setup of the app everything works fine but after a while I get an error message that says its unable to connect. The homeassistant server log says: Error handling message: expected bool for dictionary value @ data[‘state’]. Got None

My other Smartphone works fine without any problems

The Smartphone that says its not able to connect also got Notifikations from the server what makes everything a bit wierd for me

After you get unable to connect, go to settings and look at the logs to see what the error is

this is unrelated.

That is the error message I receve on the server when i try to connect


and waht about the on device logs?

I am not realy sure what exacly is needed from the device logs so i post everything i can find here

sorry but the complete log is too long for this textbox

I also get this notification


and I found out that I could login with the internal URL when this is configured

There are errors allover the place here. Please follow the start fresh steps and begin again and get a fresh device log.

I also see SSL certification errors so you will need to ensure you are using a valid certification.

There are webview errors as well, what device is this? I see its running chrome and not hte standard webview. Hopefully starting fresh will clear all this out.

The device is a Samsung XCover 4

I have done a fresh installation of the homeassistant app

At the first configuration I get the same Issue again

after that I configured the App with the local IP of homeassistant wich worked without any problems

after configuration I have changed the external URL to the real external URL wich I use on my S21 wich also worked without any problems

the exact same thing also happend on my older Samsung S8 a few days ago
the S8 had the same problem that it gets an error while connecting

by the way

I am sorry for my bad english skills its not my first language

here are the logs from the Xcover (its currently working)

1 Like

Uninstall and reinstall is not the same as clearing data which is what the steps details…Uninstall and reinstall triggers auto back up which is what we want to avoid here.

What version of android are they on? SSL handshake errors are not errors the app will be able to solve, if you see those errors then its possible the device just doesnt like the certificate. I think there was something about android 7.1.2 and LE certs.

the certificate for SSL is from Cloudflare

The XCover is on android Version 9
The S8 is also on Version 9
The S21 is on Version 12

I will try to clear the app data

I tryed to clear app data bud that had changed nothing

My app on my phone stopped working all of a sudden too. On my Android tablet it still works. Seems to coincide with the upgrade to 2021.12. Or it’s caused y the december update of Android 12.

Error message “Unable to connect to Home Assistant”
The webview in the background gives following error:

Web page not available

The web page at http://<internal_domain>:8123/?external_auth=1 could not be loaded because:


There’s nothing wrong with my internal DNS (running on my USG)

Check the logs in settings when the pop-up appears

1 Like

I did that, some websocket issue I think?? I’ll continue in this thread here, seems to be the main one: Android APP "Unable to connect to Home Assistant" - #3 by ivovangent

Hey there, this idea to reinstall is not right. It’s a HA bug because I’m seeing in Node Red and it’s shutting down NR now with the same error.

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   '--no-update-notifier',
1 verbose cli   '--no-fund',
1 verbose cli   'start',
1 verbose cli   '--cache',
1 verbose cli   '/data/.npm',
1 verbose cli   '--',
1 verbose cli   '--userDir',
1 verbose cli   '/data'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose config Skipping project config: /usr/src/node-red/.npmrc. (matches userconfig)
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info lifecycle [email protected]~prestart: [email protected]
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/src/node-red/node_modules/.bin:/usr/src/node-red/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sb
10 verbose lifecycle [email protected]~start: CWD: /usr/src/node-red
11 silly lifecycle [email protected]~start: Args: [
11 silly lifecycle   '-c',
11 silly lifecycle   'node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"'
11 silly lifecycle ]
12 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
14 verbose stack     at EventEmitter.emit (events.js:400:28)
14 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
14 verbose stack     at ChildProcess.emit (events.js:400:28)
14 verbose stack     at maybeClose (internal/child_process.js:1058:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
15 verbose pkgid [email protected]
16 verbose cwd /usr/src/node-red
17 verbose Linux 4.19.0-6-amd64
18 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "--no-update-notifier" "--no-fund" "start" "--cache" "/data/.npm" "--" "--userDir" "/data"
19 verbose node v14.18.2
20 verbose npm  v6.14.15
21 error code ELIFECYCLE
22 error errno 1
23 error [email protected] start: `node $NODE_OPTIONS node_modules/node-red/red.js $FLOWS "--userDir" "/data"`
23 error Exit status 1
24 error Failed at the [email protected] start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

This was a wild journey. The only way to get Node Red to start (and I’ve updated it along with HA…) is to delete the flows.json, have it start without one, import them again and when I fix the HA configuration node this happens and it crashes NR all over again…

Found the error in the HA logs here;

2021-12-26 16:03:20 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139772047564320] Error handling message: expected bool for dictionary value @ data['state']. Got {}