iCloud SSL issue again

Also need bundle:restart but now back alive :slight_smile:

thx

I see that a PR to fix this had already been merged so snapshot users should already be fine, I think non snapshot users should be able to update the iCloud binding to the snapshot version, can someone who is not on mobile (on the backseat of a car) provide some steps for this :blush:

How does one update to this snapshot? Just remove the current binding and then drop the snapshot into the addons folder?

correct. Maybe you need to restart the bundle afterewards (openhab console -> bundle:restart

Install M2 version from openHAB console

bundle:uninstall org.openhab.binding.icloud
bundle:install https://openhab.jfrog.io/openhab/online-repo-milestone/2.5/org/openhab/addons/bundles/org.openhab.binding.icloud/2.5.0.M2/org.openhab.binding.icloud-2.5.0.M2.jar

Or uninstall previous one and download jar directly from link and add it to openHAB addons folder

If gson 2.8.5 lib is not installed on your environment, you can install it by following command

bundle:install http://central.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar
3 Likes

The following process should work to upgrade 2.4 to the snapshot version of the binding:

  • uninstall the iCloud binding through PaperUI
  • download the snapshot version of the binding from https://ci.openhab.org/job/openhab-milestone/ into the addons folder
  • open a karaf console and execute the following command: bundle:install http://central.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar
  • restart openhab
  • use bundle:list to check that the gson binding is running; if not start it with bundle:start
  • check that the iCloud binding is running
5 Likes

I triggered a new build so the fix should also be available in the next snapshot build (#1656 if all goes well). The 2.5.0.M2 milestone release should already have this fix. Because the M2 is so new, it actually contains more recent commits than the snapshot (which is rare). :wink:

3 Likes

Hi, I follow all steps you mention and I have this problem. I get this message when I triy to start the icloud binding:

206 │ Active │ 80 │ 2.8.5 │ Gson
207 │ Installed │ 80 │ 2.5.0.M2 │ openHAB Add-ons :: Bundles :: iCloud Binding
openhab> bundle:start 207
Error executing command: Error executing command on bundles:
Error starting bundle 207: Could not resolve module: org.openhab.binding.icloud [207]
Unresolved requirement: Import-Package: com.google.gson.annotations; version=“[2.8.0,3.0.0)”

I need some help!

+1 here

I just realized that iCloud binding began to work :smiley:

A few hours ago I had the same error as ramon2k10:

I assume that a restart of openhab2 fixed the problem:

Hi,
I have the same problem as ramon2k10 and a restart of openhab2 did not resolve the problem.
Anybody with ideas?
I followed Pali’s install method and my console shows this.

231 │ Active    │  80 │ 2.4.0                  │ Rfxcom Binding
233 │ Active    │  80 │ 1.13.0                 │ openHAB Expire Binding
234 │ Active    │  80 │ 2.4.0                  │ VoiceRSS Text-to-Speech
235 │ Active    │  80 │ 1.13.0                 │ openHAB Lgtv Binding
236 │ Active    │  80 │ 2.4.0                  │ LogReader Binding
237 │ Active    │  80 │ 2.4.0                  │ Samsung Tv Binding
238 │ Active    │  80 │ 2.4.0                  │ Exec Binding
243 │ Active    │  80 │ 1.0.6                  │ Californium (Cf) OSGi Bundle
244 │ Active    │  80 │ 1.0.6                  │ element-connector
245 │ Active    │  80 │ 1.0.6                  │ Scandium (Sc) Core
246 │ Active    │  80 │ 0.10.0.oh240           │ Eclipse SmartHome TRÅDFRI Binding
247 │ Installed │  80 │ 2.5.0.M2               │ openHAB Add-ons :: Bundles :: iCloud Binding
openhab> bundle:start 247
Error executing command: Error executing command on bundles:
	Error starting bundle 247: Could not resolve module: org.openhab.binding.icloud [247]
  Unresolved requirement: Import-Package: com.google.gson; version="[2.8.0,3.0.0)"

M2 version of iCloud binding need gson library, so if you don’t currently use any binding which have already installed it, you need to install it manually. Normally dependencies are automatically solved, but installing jar files manually, dependencies need to be installed manually as well.

bundle:install http://central.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar

You are the man-thanks a lot. All is working now:-) I was running a standard openhabian setup with no gson library required and had no idea.
Thanks again:-)

I upgraded my full openHAB install, not just iCloud binding, to 2.5.0M2 release and no longer getting SSL error but getting errors below. Guessing this is a code issue because a quick google search found posts to stack overflow about large http requests using jetty require extra steps to allocate a larger buffer for post requests. Curious if anyone else is having this error with the recent builds. Prior to SSL issue and subsequent troubleshooting I had not seen this error.

2019-08-10 09:30:42.697 [WARN ] [l.handler.ICloudAccountBridgeHandler] - Unable to refresh device data
java.io.IOException: java.util.concurrent.ExecutionException: org.eclipse.jetty.http.BadMessageException: 500: Request header too large
	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrlAndGetReponse(HttpUtil.java:259) ~[?:?]
	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrl(HttpUtil.java:156) ~[?:?]
	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrl(HttpUtil.java:131) ~[?:?]
	at org.eclipse.smarthome.io.net.http.HttpRequestBuilder.getContentAsString(HttpRequestBuilder.java:135) ~[?:?]
	at org.openhab.binding.icloud.internal.ICloudConnection.callApi(ICloudConnection.java:88) ~[?:?]
	at org.openhab.binding.icloud.internal.ICloudConnection.requestDeviceStatusJSON(ICloudConnection.java:69) ~[?:?]
	at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.lambda$0(ICloudAccountBridgeHandler.java:88) ~[?:?]
	at org.eclipse.smarthome.core.cache.ExpiringCache.refreshValue(ExpiringCache.java:97) ~[?:?]
	at org.eclipse.smarthome.core.cache.ExpiringCache.getValue(ExpiringCache.java:68) ~[?:?]
	at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.refreshData(ICloudAccountBridgeHandler.java:145) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.util.concurrent.ExecutionException: org.eclipse.jetty.http.BadMessageException: 500: Request header too large
	at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[?:?]
	at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101) ~[?:?]
	at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:683) ~[?:?]
	at org.eclipse.smarthome.io.net.http.HttpUtil.executeUrlAndGetReponse(HttpUtil.java:250) ~[?:?]
	... 16 more
Caused by: org.eclipse.jetty.http.BadMessageException: 500: Request header too large
	at org.eclipse.jetty.http.HttpGenerator.generateRequest(HttpGenerator.java:279) ~[?:?]
	at org.eclipse.jetty.client.http.HttpSenderOverHTTP$HeadersCallback.process(HttpSenderOverHTTP.java:231) ~[?:?]
	at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[?:?]
	at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[?:?]
	at org.eclipse.jetty.client.http.HttpSenderOverHTTP.sendHeaders(HttpSenderOverHTTP.java:62) ~[?:?]
	at org.eclipse.jetty.client.HttpSender.send(HttpSender.java:214) ~[?:?]
	at org.eclipse.jetty.client.http.HttpChannelOverHTTP.send(HttpChannelOverHTTP.java:85) ~[?:?]
	at org.eclipse.jetty.client.HttpChannel.send(HttpChannel.java:128) ~[?:?]
	at org.eclipse.jetty.client.HttpConnection.send(HttpConnection.java:201) ~[?:?]
	at org.eclipse.jetty.client.http.HttpConnectionOverHTTP$Delegate.send(HttpConnectionOverHTTP.java:255) ~[?:?]
	at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.send(HttpConnectionOverHTTP.java:122) ~[?:?]
	at org.eclipse.jetty.client.http.HttpDestinationOverHTTP.send(HttpDestinationOverHTTP.java:38) ~[?:?]
	at org.eclipse.jetty.client.HttpDestination.process(HttpDestination.java:346) ~[?:?]
	at org.eclipse.jetty.client.HttpDestination.process(HttpDestination.java:304) ~[?:?]
	at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:294) ~[?:?]
	at org.eclipse.jetty.client.HttpDestination.succeeded(HttpDestination.java:228) ~[?:?]
	at org.eclipse.jetty.client.AbstractConnectionPool.proceed(AbstractConnectionPool.java:153) ~[?:?]
	at org.eclipse.jetty.client.AbstractConnectionPool$1.succeeded(AbstractConnectionPool.java:131) ~[?:?]
	at org.eclipse.jetty.client.AbstractConnectionPool$1.succeeded(AbstractConnectionPool.java:123) ~[?:?]
	at org.eclipse.jetty.util.Promise$Wrapper.succeeded(Promise.java:130) ~[?:?]
	at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onOpen(HttpConnectionOverHTTP.java:130) ~[?:?]
	at org.eclipse.jetty.io.ssl.SslConnection.onOpen(SslConnection.java:283) ~[?:?]
	at org.eclipse.jetty.io.SelectorManager.connectionOpened(SelectorManager.java:324) ~[?:?]
	at org.eclipse.jetty.io.ManagedSelector.createEndPoint(ManagedSelector.java:268) ~[?:?]
	at org.eclipse.jetty.io.ManagedSelector.access$1900(ManagedSelector.java:61) ~[?:?]
	at org.eclipse.jetty.io.ManagedSelector$CreateEndPoint.run(ManagedSelector.java:922) ~[?:?]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698) ~[?:?]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804) ~[?:?]
	... 1 more
Caused by: java.nio.BufferOverflowException
	at java.nio.Buffer.nextPutIndex(Buffer.java:521) ~[?:?]
	at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:169) ~[?:?]
	at org.eclipse.jetty.http.HttpGenerator.putSanitisedValue(HttpGenerator.java:932) ~[?:?]
	at org.eclipse.jetty.http.HttpGenerator.putTo(HttpGenerator.java:948) ~[?:?]
	at org.eclipse.jetty.http.HttpGenerator.generateHeaders(HttpGenerator.java:702) ~[?:?]
	at org.eclipse.jetty.http.HttpGenerator.generateRequest(HttpGenerator.java:250) ~[?:?]
	at org.eclipse.jetty.client.http.HttpSenderOverHTTP$HeadersCallback.process(HttpSenderOverHTTP.java:231) ~[?:?]
	at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[?:?]
	at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224) ~[?:?]
	at org.eclipse.jetty.client.http.HttpSenderOverHTTP.sendHeaders(HttpSenderOverHTTP.java:62) ~[?:?]
	at org.eclipse.jetty.client.HttpSender.send(HttpSender.java:214) ~[?:?]
	at org.eclipse.jetty.client.http.HttpChannelOverHTTP.send(HttpChannelOverHTTP.java:85) ~[?:?]
	at org.eclipse.jetty.client.HttpChannel.send(HttpChannel.java:128) ~[?:?]
	at org.eclipse.jetty.client.HttpConnection.send(HttpConnection.java:201) ~[?:?]
	at org.eclipse.jetty.client.http.HttpConnectionOverHTTP$Delegate.send(HttpConnectionOverHTTP.java:255) ~[?:?]
	at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.send(HttpConnectionOverHTTP.java:122) ~[?:?]
	at org.eclipse.jetty.client.http.HttpDestinationOverHTTP.send(HttpDestinationOverHTTP.java:38) ~[?:?]
	at org.eclipse.jetty.client.HttpDestination.process(HttpDestination.java:346) ~[?:?]
	at org.eclipse.jetty.client.HttpDestination.process(HttpDestination.java:304) ~[?:?]
	at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:294) ~[?:?]
	at org.eclipse.jetty.client.HttpDestination.succeeded(HttpDestination.java:228) ~[?:?]
	at org.eclipse.jetty.client.AbstractConnectionPool.proceed(AbstractConnectionPool.java:153) ~[?:?]
	at org.eclipse.jetty.client.AbstractConnectionPool$1.succeeded(AbstractConnectionPool.java:131) ~[?:?]
	at org.eclipse.jetty.client.AbstractConnectionPool$1.succeeded(AbstractConnectionPool.java:123) ~[?:?]
	at org.eclipse.jetty.util.Promise$Wrapper.succeeded(Promise.java:130) ~[?:?]
	at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onOpen(HttpConnectionOverHTTP.java:130) ~[?:?]
	at org.eclipse.jetty.io.ssl.SslConnection.onOpen(SslConnection.java:283) ~[?:?]
	at org.eclipse.jetty.io.SelectorManager.connectionOpened(SelectorManager.java:324) ~[?:?]
	at org.eclipse.jetty.io.ManagedSelector.createEndPoint(ManagedSelector.java:268) ~[?:?]
	at org.eclipse.jetty.io.ManagedSelector.access$1900(ManagedSelector.java:61) ~[?:?]
	at org.eclipse.jetty.io.ManagedSelector$CreateEndPoint.run(ManagedSelector.java:922) ~[?:?]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698) ~[?:?]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804) ~[:?]
	... 1 more

Solved, uninstalling and re-installing the 2.8.5
bundle:install http://central.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar

Now I’m getting iCloud info. Congrats!!!

Thanks!!!

Nevermind nothing rebooting and clearing openhab cache several times didn’t eventually fix.

Hi!

mine stopped working as well.
can you tell me how to upgrade to the latest snapshot on a mac? apt update etc won’t work obviously :wink:

You mean whole openHAB or just iCloud binding? If just iCloud binding, same instructions work on Mac as well (see earlier posts)

Ok i just copy pasted the latest milestone data and it worked. Icloud is working again.

Thanks, I followed these instructions and iCloud seems to be working fine again.