# IOS app error: URLSessionTask failed with error

**URL:** <https://community.openhab.org/t/ios-app-error-urlsessiontask-failed-with-error/135055>\
**Category:** iOS App\
**Created:** [April 12, 2022, 6:43am UTC](https://community.openhab.org/t/ios-app-error-urlsessiontask-failed-with-error/135055 "2022-04-12T06:43:53Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxheartrate](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/53a042/32.png) [@maxheartrate](https://community.openhab.org/u/maxheartrate)\
**Post date:** [April 12, 2022, 6:43am UTC](https://community.openhab.org/t/ios-app-error-urlsessiontask-failed-with-error/135055/1 "2022-04-12T06:43:53Z")

</div>

Hi all,

I have a problem with the iOS app on both iPhone and iPad. I keep getting the error „URLSessionTask failed with error: Timeout“.

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/e/b/eb20c82652a1c8dcbf59bc05faadc852748af30e.jpeg)

I can access my basic ui sitemap via the web but the app doesn‘t work anymore. I tried to play around with the settings: Change graphics PNG/SVG, clear the image cache, send credentials on every log in. And I installed the beta app on the Ipad.

I wonder if there is an error on my server side that is causing the timeout. How would I be able to find out?  
I am running OpenHAB 3.3.0.M3 on a Raspberry Pi 3B+. The iOS app version is 2.4.47.

Any ideas how to fix the error? Best, Max

EDIT:  
I guess this might be the corresponding log entry:

```yaml
org.apache.cxf.interceptor.Fault: XML_WRITE_EXC
	at org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor.handleMessage(JAXRSDefaultFaultOutInterceptor.java:106) ~[bundleFile:3.4.5]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[bundleFile:3.4.5]
	at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:112) ~[bundleFile:3.4.5]
	at org.apache.cxf.phase.PhaseInterceptorChain.wrapExceptionAsFault(PhaseInterceptorChain.java:374) ~[bundleFile:3.4.5]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:332) ~[bundleFile:3.4.5]
	at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90) ~[bundleFile:3.4.5]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:265) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:225) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:298) ~[bundleFile:3.4.5]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:222) ~[bundleFile:3.4.5]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) ~[bundleFile:3.1.0]
	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:273) ~[bundleFile:3.4.5]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550) ~[bundleFile:9.4.43.v20210629]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) ~[bundleFile:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434) ~[bundleFile:9.4.43.v20210629]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:294) ~[bundleFile:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[bundleFile:9.4.43.v20210629]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:82) ~[bundleFile:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.Server.handle(Server.java:516) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633) [bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380) [bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277) [bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) [bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) [bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) [bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338) [bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315) [bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173) [bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:386) [bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883) [bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034) [bundleFile:9.4.43.v20210629]
	at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: com.ctc.wstx.exc.WstxIOException: Closed
	at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:262) ~[?:?]
	at org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor.handleMessage(JAXRSDefaultFaultOutInterceptor.java:104) ~[bundleFile:3.4.5]
	... 51 more
Caused by: org.eclipse.jetty.io.EofException: Closed
	at org.eclipse.jetty.server.HttpOutput.checkWritable(HttpOutput.java:769) ~[bundleFile:9.4.43.v20210629]
	at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:793) ~[bundleFile:9.4.43.v20210629]
	at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:51) ~[bundleFile:3.4.5]
	at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:100) ~[?:?]
	at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:242) ~[?:?]
	at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:260) ~[?:?]
	at org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor.handleMessage(JAXRSDefaultFaultOutInterceptor.java:104) ~[bundleFile:3.4.5]
	... 51 more

```

---

<div class="post-metadata">

**Author:** ![BigGeorgeTx](https://community.openhab.org/user_avatar/community.openhab.org/biggeorgetx/32/53864_2.png) [@BigGeorgeTx](https://community.openhab.org/u/BigGeorgeTx)\
**Post date:** [April 13, 2022, 12:24pm UTC](https://community.openhab.org/t/ios-app-error-urlsessiontask-failed-with-error/135055/2 "2022-04-13T12:24:19Z")

</div>

I also see what I think is the same error message (in English) along with an interceptor fault in the log. These may be related:

> [@iOS app causes error while in use](https://community.openhab.org/t/ios-app-causes-error-while-in-use/134767):
>
> This might be a little vague, but has anyone else experienced a huge error log dump via the console when using the openhab iOS app? This is the error: 20:50:21.124 [ERROR] [.internal.JSONResponseExceptionMapper] - Unexpected exception occurred while processing REST request. Followed by about 50 lines of exception data. This happens on opening the sitemap, navigating through the pages, etc. Although the actual functionality of the sitemap works fine, it’s just the constant error logging that …

> [@Commands entered in iOS App result in "interceptor.Fault: Could not send Message."](https://community.openhab.org/t/commands-entered-in-ios-app-result-in-interceptor-fault-could-not-send-message/135075):
>
> iOS App Version 2.4.47 (but was happening on earlier versions too) openHAB 3.3.0M3 Pi 4B openhabian, updated all packages yesterday Whenever I enter a command on the iOS app, I see this in the openhab log file. I have tried it with two different bindings (myq and mqtt) and it happens every time. I have found that after a while openHAB will become flaky (Astro binding triggers don’t fire for example), and I have to restart openHAB. The commands are successful. Here is a recent example: 2…

---

<div class="post-metadata">

**Author:** ![maxheartrate](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/53a042/32.png) [@maxheartrate](https://community.openhab.org/u/maxheartrate)\
**Post date:** [April 13, 2022, 5:27pm UTC](https://community.openhab.org/t/ios-app-error-urlsessiontask-failed-with-error/135055/3 "2022-04-13T17:27:16Z")

</div>

Hi @BigGeorgeTx,  
thank you. Yes, looks very similar to my error. Good to know I am not alone. 😉  
But I guess nobody has found a solution yet, right?  
Best, Max

---

<div class="post-metadata">

**Author:** ![Maik](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/7feea3/32.png) [@Maik](https://community.openhab.org/u/Maik)\
**Post date:** [May 8, 2022, 1:56pm UTC](https://community.openhab.org/t/ios-app-error-urlsessiontask-failed-with-error/135055/4 "2022-05-08T13:56:58Z")

</div>

Same for me since the last some days.  
I also use app version 2.4.47.

I also uninstalled the app and installed it fresh, did not help.

---

<div class="post-metadata">

**Author:** ![Xavier\_Rodriguez](https://community.openhab.org/user_avatar/community.openhab.org/xavier_rodriguez/32/65429_2.png) [@Xavier\_Rodriguez](https://community.openhab.org/u/Xavier_Rodriguez)\
**Post date:** [June 6, 2022, 6:51am UTC](https://community.openhab.org/t/ios-app-error-urlsessiontask-failed-with-error/135055/5 "2022-06-06T06:51:40Z")

</div>

Any update by anyone?

---

<div class="post-metadata">

**Author:** ![maxheartrate](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/53a042/32.png) [@maxheartrate](https://community.openhab.org/u/maxheartrate)\
**Post date:** [June 6, 2022, 9:29am UTC](https://community.openhab.org/t/ios-app-error-urlsessiontask-failed-with-error/135055/6 "2022-06-06T09:29:22Z")

</div>

I changed my OpenHAB hardware from Rasperry 3B to 4 and now the error has gone.

---

<div class="post-metadata">

**Author:** ![becksen](https://community.openhab.org/user_avatar/community.openhab.org/becksen/32/14665_2.png) [@becksen](https://community.openhab.org/u/becksen)\
**Post date:** [July 10, 2022, 9:18pm UTC](https://community.openhab.org/t/ios-app-error-urlsessiontask-failed-with-error/135055/7 "2022-07-10T21:18:02Z")

</div>

I‘ve a raspberry 4 and have also the same issue. From local url it works only via myopenhab the error occurs.

Any suggestions?

Regards

---

<div class="post-metadata">

**Author:** ![saimens](https://community.openhab.org/letter_avatar_proxy/v4/letter/s/a8b319/32.png) [@saimens](https://community.openhab.org/u/saimens)\
**Post date:** [September 6, 2022, 1:23pm UTC](https://community.openhab.org/t/ios-app-error-urlsessiontask-failed-with-error/135055/8 "2022-09-06T13:23:33Z")

</div>

I’m in the same boat. Are there any updates on this?

---

<div class="post-metadata">

**Author:** ![jackmenimble](https://community.openhab.org/letter_avatar_proxy/v4/letter/j/9d8465/32.png) [@jackmenimble](https://community.openhab.org/u/jackmenimble)\
**Post date:** [September 23, 2022, 4:38pm UTC](https://community.openhab.org/t/ios-app-error-urlsessiontask-failed-with-error/135055/9 "2022-09-23T16:38:30Z")

</div>

I have the same error.  
How do you configure your app?

---

<div class="post-metadata">

**Author:** ![becksen](https://community.openhab.org/user_avatar/community.openhab.org/becksen/32/14665_2.png) [@becksen](https://community.openhab.org/u/becksen)\
**Post date:** [October 5, 2022, 9:44pm UTC](https://community.openhab.org/t/ios-app-error-urlsessiontask-failed-with-error/135055/10 "2022-10-05T21:44:07Z")

</div>

For me it was the same.

App version 2.4.54

I solved it correcting the URL and remove the port and activate “Always send credentials”

URL: [https://myopenhab.org](https://myopenhab.org) (without port)  
Password:   
Always send credentials: activated

Hope that works for you as well.

Regards

---

<div class="post-metadata">

**Author:** ![HJM](https://community.openhab.org/letter_avatar_proxy/v4/letter/h/db5fbb/32.png) [@HJM](https://community.openhab.org/u/HJM)\
**Post date:** [February 23, 2023, 5:04pm UTC](https://community.openhab.org/t/ios-app-error-urlsessiontask-failed-with-error/135055/11 "2023-02-23T17:04:01Z")

</div>

For me this hint solved the problem:

> [@iOS App, logs: Basic authentication with username/password is not allowed](https://community.openhab.org/t/ios-app-logs-basic-authentication-with-username-password-is-not-allowed/140979):
>
> Good morning Added a simple watch.sitemap file and suddenly the iOS app shows a blank screen and in the logs I see constantly: 2022-11-13 10:47:02.106 [WARN] [ore.io.rest.auth.internal.AuthFilter] - Unauthorized API request from 10.0.100.5: Basic authentication with username/password is not allowed Removing the watch.sitemap file doesn’t help… The iOS app running on macOS works normally… thanks for any hints richard

My OpenHAB Logs show:  
[WARN] [ore.io.rest.auth.internal.AuthFilter] - Unauthorized API request from Basic authentication with username/password is not allowed

Hope this helps someone.  
Took me some time to find the right solution.

Best regards HJM
