Can't login to HA cloud with the companion app: An SSL error has occurred and a secure connection to the server cannot be made

Hi everybody, I have a problem with the remote login via the nabu cloud.
It worked once after setup now it doesn’t login anymore. I checked the companion app logs and this is what it shows (removing the personal urls):

2019-12-06 21:09:21.571 [Verbose] [main] [WebViewController.swift:332] loadActiveURLIfNeeded() > Changing webview to current active URL!
2019-12-06 21:09:21.937 [Error] [main] [WebViewController.swift:258] webView(_:didFailProvisionalNavigation:withError:) > Failure during content load: Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLKey=https://<PERSONAL KEY REMOVED>.ui.nabu.casa/?external_auth=1, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <3D847B86-B456-4CF3-8B48-2A3D2B02950E>.<24>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorCodeKey=-9816, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., _WKRecoveryAttempterErrorKey=<WKReloadFrameErrorRecoveryAttempter: 0x280dd7e80>, networkTaskDescription=LocalDataTask <3D847B86-B456-4CF3-8B48-2A3D2B02950E>.<24>, NSErrorFailingURLStringKey=https://<PERSONAL KEY REMOVED>.ui.nabu.casa/?external_auth=1, NSUnderlyingError=0x280100f60 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, _kCFNetworkCFStreamSSLErrorOriginalValue=-9816, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9816}}, _kCFStreamErrorDomainKey=3}
2019-12-06 21:09:22.753 [Verbose] [main] [WebViewController.swift:584] userContentController(_:didReceive:) > getExternalAuth called
2019-12-06 21:09:22.755 [Error] [main] [TokenManager.swift:195] currentToken > Token is expired by 1289 seconds: <PERSONAL KEY REMOVED>

I already tried removing all instances of the ios device from HA and reinstalled the companion, but I still get the same error. Local connect and web connect via a browser to the cloud url works fine.

Is there anybody that can help or point me into the right direction to get this resolved?

I have the same situation here. Not helping you much, but you’re not alone :wink:

1 Like

The ios app should never be set up using the nabu remote url.

It needs to be set up either locally and run through onboarding, where it will detect cloud and set up some stuff like webhooks and such.

The app also needs to have location access so it can determine via ssid whether it is in your home network with a direct connection to HA.

Depending on permissions when it was set up you may need to copy the url from external to internal in the app settings after you finished onboarding, the checkbox for nabu casa will then be available. If you enable that, the external url field will be grayed out and no longer be used and your phone should connect to HA via nabu casa cloud when you’re out and about.

1 Like

I just started having this issue today. I can’t figure out how to get it logged back in either, but I am able to log in via web browser from a computer without any issues.

Today i logged into HA web on my browser and noticed that under the settings - home assistant cloud the remote access had been disabled (very odd since it was enabled before). I enabled it again and what do you know… it works again.

2 Likes

I’ve had ab issue since the update. Mine says the SSL certificate is untrusted. Use a shortcut to naba casa ubtil I can figure it out.

Sorry for Waking this up but I just had the same issue.

Used the phone browser to connect through the Remote UI portal and once I logged in the app managed to connect again.
Strange but at least it works! :slight_smile:

I just had this issue pop up again out of nowhere. I was able to login on ios via safari and found that under Configuration -> Home Assistant Cloud -> the Remote Control setting had become disabled. After enabling it, I was able to access my instance again through the native app.

1 Like

I had same issue today, running 113.1

I had this error on 113.3 today. Totally random as it had worked for a solid year, then today wouldn’t let me connect. I had to log into Nabucasa.com with my web browser and open remote UI from there and then the app started working again.

PS the app was set up from local on boarding and detected it’s own URL so that’s not the issue.

I sometimes have the same error on the IOS companion app. It works fine and after a few weeks the error appears and I can no longer connect from the IOS app. When I restart HA, the error disappears until next time. I got it on 111.X, 113.X and 114.X.

I’m having the identical issue now. I’m forced to rebooted my HA probably twice or more a day now. I’ve also tried connecting locally when it’s in this state and it cannot. Neither the app or the a desktop can connect.

Thanks - this helped me today to resolve exactly the same problem!

Did you find a fix for this issue? My HA also crashes every day

1 Like

I’m having the same issues every day it crashes, having to do a hard reset. It’s been since I started paying for Nabucasa!! Could just be a coincidence?

Having what seems like the same issue. How have others resolved this issue?

Anyone solved this?

Have same issue, cant even ping my RPI, have to hard reboot.

I get the same error (I think) but I’m not using Nabu Casa, just running locally. My mobile app can suddenly no longer connect via my remote url (setup through duck dns + lets encrypt) which has been working fine for over a year. Works fine on my Android wall panel, web browsers on my pcs, etc.

Tried killing the app, rebooting the phone, restarted my HA PI (the whole thing not just the core OS). Same problem.

Edit: Solved the problem. My phone someone joined another WiFi network nearby instead of mine. After switching back to my own WiFi it worked.

1 Like

I had the same error when i want to connect to HA remote without NabuCasa.

I went to check the DuckDNS, LetsEncript and NGINX.The LetsEncript service wasn’t running anymore. The autostart option wasn’t activated anymore. i restarted all of the add-ons and was able to reconnect to the companion app.

Hope this helps someone.
Erik

It was a code issue that was resolved through updating core and os.