"NSURLErrorDomain -1004" and "500 Internal Server Error"

Hi!

I am new to HA, and have had now two unfortunate cases of “NSURLErrorDomain -1004” on my iOS app.
When trying to access it from a browser on my PC, I get “500 Internal Server Error”.

This morning, the first error in the iOS app was “NSURLErrorDomain -1001”, and after relaunch of app it was “NSURLErrorDomain -1004”

I am running HA on a RPI4. It has a permanent leased IP from my router.

I know there are other threads about the topic, but it does not seem to be any clear resolution to this issue when it happens? First time it happened I flashed the SD card again and then it worked. I can do that also this time, but I need to find the root cause of this to be able to further build on this system.

Here is the log-file message re 1004:

2022-01-03 11:11:56.898 [Info] [main] [OnboardingAuthStepConnectivity.swift:53] perform(point:) > failure(Alamofire.AFError.sessionTaskFailed(error: Error Domain=NSURLErrorDomain Code=-1004 “Kunne ikke koble til tjeneren.” UserInfo={_kCFStreamErrorCodeKey=64, NSUnderlyingError=0x283481050 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 “(null)” UserInfo={_NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en0, ipv4, ipv6, dns, _kCFStreamErrorCodeKey=64, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <4B693D8B-8A4F-4D0A-BB2A-1BA93358ECE1>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
“LocalDataTask <4B693D8B-8A4F-4D0A-BB2A-1BA93358ECE1>.<1>”

Hi, oh man, did you ever figure this out? I’m having the same issue too right now.