Repository: openhab/openhab-addons

Issue #13090: iCloud Binding COMMUNICATION_ERROR iCloud response invalid: null
Created: 2022-07-07T08:03:38Z
The iCloud binding has stopped working for a number of users https://community.openhab.org/t/icloud-binding-communication-error/122131/249?u=biggeorgetx
I’m on 3.3M5, but it is also reported by 3.3 Release users.

Duplicate issue #10699: [icloud] Binding stops working at 11th of May for everyone
Created: 2021-05-15T21:40:26Z
At 11th of May (some a few hours later) the binding stopped working.
Guess because of changes on findMyPhone API from Apple. Same time Apple launched "FindMyNetwork", so think within this the API did changed.
The Error in Detail:
Bridge goes offline (COMMUNICATION_ERROR
iCloud response invalid: null)
Someone did a DEBUG on Binding:
2021-05-09 17:55:04.236 [DEBUG] [l.handler.ICloudAccountBridgeHandler] - iCloud bridge handler initializing ...
2021-05-09 17:55:04.236 [DEBUG] [l.handler.ICloudAccountBridgeHandler] - iCloud bridge starting handler ...
2021-05-09 17:55:04.237 [DEBUG] [l.handler.ICloudAccountBridgeHandler] - iCloud bridge refreshing data ...
2021-05-09 17:55:04.237 [DEBUG] [l.handler.ICloudAccountBridgeHandler] - iCloud bridge handler started.
2021-05-09 17:55:04.238 [DEBUG] [l.handler.ICloudAccountBridgeHandler] - iCloud bridge initialized.
2021-05-09 17:55:04.412 [WARN ] [l.handler.ICloudAccountBridgeHandler] - Unable to refresh device data
java.io.IOException: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
	at org.openhab.core.io.net.http.HttpUtil.executeUrlAndGetReponse(HttpUtil.java:260) ~[?:?]
	at org.openhab.core.io.net.http.HttpUtil.executeUrl(HttpUtil.java:155) ~[?:?]
	at org.openhab.core.io.net.http.HttpUtil.executeUrl(HttpUtil.java:130) ~[?:?]
	at org.openhab.core.io.net.http.HttpRequestBuilder.getContentAsString(HttpRequestBuilder.java:135) ~[?:?]
	at org.openhab.binding.icloud.internal.ICloudConnection.callApi(ICloudConnection.java:90) ~[?:?]
	at org.openhab.binding.icloud.internal.ICloudConnection.requestDeviceStatusJSON(ICloudConnection.java:71) ~[?:?]
	at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.lambda$0(ICloudAccountBridgeHandler.java:94) ~[?:?]
	at org.openhab.core.cache.ExpiringCache.refreshValue(ExpiringCache.java:101) ~[?:?]
	at org.openhab.core.cache.ExpiringCache.getValue(ExpiringCache.java:72) ~[?:?]
	at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.refreshData(ICloudAccountBridgeHandler.java:161) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
	at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:730) ~[bundleFile:9.4.38.v20210224]
	at org.openhab.core.io.net.http.HttpUtil.executeUrlAndGetReponse(HttpUtil.java:251) ~[?:?]
	... 15 more
Caused by: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
	at org.eclipse.jetty.client.AuthenticationProtocolHandler$AuthenticationListener.onComplete(AuthenticationProtocolHandler.java:163) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:218) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:210) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:481) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:461) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:424) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:365) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.http.HttpParser.handleContentMessage(HttpParser.java:591) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1716) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1545) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:204) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:144) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:79) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:131) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:169) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:540) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:395) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882) ~[bundleFile:9.4.38.v20210224]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036) ~[bundleFile:9.4.38.v20210224]


Because someone mentioned Home Assistant is still working with iCloud, there should be a solution, but the binding needs to be changed.
For more details
https://community.openhab.org/t/icloud-binding-communication-error/122131/39

Closing comment (2022-07-11T07:27:40Z): I'm running OH 3.3.0. iCloud binding stopped working with the exact same stack trace. Has this really been fixed or is that fixed not part of 3.3.0?
Looks like this is a new problem tracked in #13090