HA Companion App - Alamofire.AFError 9

Thanks for your help! I have a reverse proxy in my setup. It seems my proxy IP got banned…
…removing the IP banning helped but of course is not what I want on the long run. Where could I find blocked IPs?

What works now:

http:
   server_port: 8123
   use_x_forwarded_for: true
   trusted_proxies:
     - 127.0.0.1
     - 192.168.x.x/24
     - 172.30.33.0/24
     - ::1
   ip_ban_enabled: false # was true before
   login_attempts_threshold: 5

Thanks!

Adding mobile_app: in the configuration.yaml and a clean reboot solved the issue for me.
The error started after a schedule maintanance from the ISP which took down my connection

I’ve just started to see this error as well, yet so far none of the suggestions in this thread have helped for me.

I’m using the HA Companion App (2024.4) on a MacBook running Sonoma 14.4.1. HA is on 2024.4.3.

I’m on the same network as my HA install, so I’m trying to connect to the automatically detected local IP address (no proxy involved).

My configuration yaml has always had default_config: and mobile_app:

It was working fine until around a week ago when I was just prompted with a logon screen. Not sure if this coincided with the upgrade of HA to 2024.4, but the rest of my devices (iPhone/iPad) logged out as well. They logged back in fine.

I’ve removed the MacBook device from the Mobile App integration, restarted HA and tried to log on, but still the same Alamofire.AFError 9 message.

I can see that when I try to logon on, a new Mobile App device appears for my MacBook with just the battery level and state sensors, even though the App says it failed to connect, so something is getting through.

Please let me know which logs will help troubleshoot this error and I’ll gladly provide.

Did you ever find a solution to this issue?

Same issue here.

Same for me. I add 127.0.0.1 to trusted proxies and mobile_app: in configuration.yaml and worked for me

I got the error:

“ Response status code was unacceptable: 500.
Fehlercode:
Alamofire.AFError 9”

when trying to login in the iOS app.
(I was able to login in Safari without a problem on the same device)

I was able to fix the issue by going into the ->Settings App-> Safari → “Clear History and Website Data”

I’m having this exact same issue, clearing web history in safari didn’t do anything. Have you found a solution for this?

In my case the error was caused by the Nabucasa account not being reachable during a longer internet downtime. My HA instance is running in a Docker container on Synology NAS and it should usually also run fine without internet but if you habe your Nabucasa account linked there might be some isues without internet. As long as you don’t logout of your app during the internet downtime, the error shouldn’t come up but as soon as you logout and your HA instance doesn’t have internet access, this error might arise. At least this has been the issues in my case.