"Failed to perform SSL handshake, please ensure your certificate is valid"

I am getting this error on the Android app every so often and I am unable to access from the app or Windows Chrome browser until I do a hard power cycle on my HA Blue.

My setup is very simple, I access the my HA instance via local host (HTTP) on my LAN and remotely using Wireguard. For troubleshooting I removed nginx proxy manager as I never used it and I do not have DuckDNS integration installed, however this error still occurs. I also have enabled Nabu Casa remote access as a backup in the event my wireguard server is down while accessing remotely.

I read in another thread that I should check the time zone however it is the correct time (Central US).

I checked my configuration.yaml and do not have an http entry and I am not sure if I need one. I tried changing my DNS address on my router but the issue is still happening.

Here is what I found in my Android companion app crash logs at the time my HA Blue went down:

2022-11-02 11:46:18.311: java.io.IOException
	at io.homeassistant.companion.android.common.data.websocket.impl.WebSocketRepositoryImpl$handleClosingSocket$1.invokeSuspend(WebSocketRepositoryImpl.kt:498)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@356a26c, Dispatchers.IO]

Any help is greatly appreciated.

2 Likes

@alexcapone
Hi, dit you find any solution for this?
I have exactly same problem. The only difference is that I have a NUC with Windows 10 and
VMWare Workstation on it

Unfortunately I have not found out what is triggering the issue. I posted this in a few threads on the same topic:

This seems to be affecting several number of people but no one has posted a definitive solution. The good news in my case is that its not happening as frequently. How often is it happening for you?

its happening every 10-15 min

Hello guys any news on this fix ?
It started to happen with me after the latest update and itā€™s continuous so cant even access the front ui anymore.

Is anyone using eero wifi mesh?

I have started getting the same issue just now, never seen this issue before.
Using HA remote access and Android app.

Canā€™t access HA atm which is annoying.

What device are you using to run Home Assistant?

Could you all monitor memory usage? I resolved this issue by automating a HASS OS reboot once a day. No issues ever since!

I used to do this but at some point I stopped. I will turn it back on.

Also I was I was using Google drive backup add on which also took local backups. I had 299 backups which was like 70 GB on my Home Assistant Blue. I deleted all but the latest backups. Hopefully that makes a difference.

Since this error mentions SSL would getting an SSL certificate while using HA on your localip possibly fix this issue?

I have found out the problem. My NUC with Windows installed was shutdown because the energy saving was wrong. So turn everything off 8n energy saving. Even the harddrive

1 Like

In my case, Iā€™m using a home assistant blue and Iā€™m not aware of any energy savings settings that can be adjusted to fix this problem.

Okay, so it happened today on the android app while I was outside my LAN. The first thing I did was install hermit custom webapp on my phone with the home assistant localhost:8123 address. I was able to get in so I know it is not a host issue, it is an android app issue.

Since I was still able to get in I pulled the log from HA Core to see what happened at the time I got the SSL handshake fail error:

Logger: homeassistant.components.http.ban
Source: components/http/ban.py:81
Integration: HTTP (documentation, issues)
First occurred: 3:34:10 PM (1 occurrences)
Last logged: 3:34:10 PM

Login attempt or request with invalid authentication from [Wireguard Public IP] (Wireguard Public IP). Requested URL: ā€˜/auth/login_flow/0f6b4935f30d6c531328ce487a0ee91aā€™. (Mozilla/5.0 (Linux; Android 13; SM-F936U1 Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/109.0.5414.118 Mobile Safari/537.36)

Why is it telling me that my login attempt is invalid when Iā€™m on Wireguard VPN? I can hit all my other localIP addresses when Iā€™m outside of my LAN and connected to Wireguard. I tested this to ensure this was in fact the case. Is there any way to whitelist it?

Edit: I am trying this out:

1 Like

I also set SSL profile to intermediate.

ssl_profile string (optional, default: modern)
The Mozilla SSL profile to use. Only lower if you are experiencing integrations causing SSL handshake errors.

Hi all, I also get this when trying to access HA remotely sporadically. Never get it when on LAN and itā€™s not consistent. If I return home which turns off remote access then leave again which turns remote access back on it sometimes works even without a reboot.

Did you set up trusted networks and change SSL profile to intermediate? I have not had an issue since doing those two steps.

How do you do that?

Trusted Network:

SSL Profile to Intermediate:

1 Like

Iā€™ve been having regular issues over the last week or so where I can no longer access my HA on my raspberry pi at home. Iā€™m deployed so I canā€™t physically restart. The only way I can fix it is to restart the router that itā€™s on. When I figure out which of the nodes itā€™s currently on and restart it, I can get in then. Iā€™ve upgraded to the latest OS and supervisor. When I try to log in, I get an SSL handshake error. Of course, I just got back in, upgraded to the latest OS, and now I canā€™t get in at allā€¦donā€™t even get the SSL error. Probably going to have to have my wife restart it locally.