Failed to Connect NSURLErrorDomain -1200

For the last few days I’ve been unable to my server using the IOS app. I get a “Failed to Connect” error.

“An SSL error has occurred and a secure connection to the server cannot be made.”

Error Code:
NSURLErrorDomain -1200

Log recorded this:

Logger: aiohttp.server
Source: /usr/local/lib/python3.9/site-packages/aiohttp/ 
First occurred: 7:20:23 PM (6 occurrences) 
Last logged: 7:22:21 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/", line 314, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
  File "aiohttp/_http_parser.pyx", line 546, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'invalid HTTP method'"

I’m pretty new to this, so any guidance would be greatly appreciated. Thanks!

Any info on your setup would be greatly appreciated by anyone reading your question as well :wink:
Who/how is your SSL handled?

I was having the same issue. The root of it was that at one point i had logged in and tried Nabu Casa, but then switched to using my own reverse proxy. When logging in from the companion app, it sees your nabu casa login and still tries to connect to it, but since my subscription expired, it just gives SSL errors on the nabu casa url.

To fix:

  • Log in to your HA web admin portal
  • Go to Configuration > Home Assistant Cloud
  • Click the three dots in the top right
  • Click “Sign out”

Then try to log in to the companion app on iOS again and it should work.