iCloud SSL issue again

its a newer crt-file in the binding…

Yes sure.

Here is the PR, so it will be included in the next version (hopefully) if they approve it:

You can also find here the exact changes I did to the binding.
I just provided a GDrive link, because somehow the build server didn’t included the yesterdays changes in its build… (I don’t know why).
Two things changed:

  • Added a new cert file, because the certification changed again. As I can remember it changed last summer, so this is not an ultimate solution. When I will have more time, I will try to implement to automatically pull this certifcation, so there will be no more problems like this.
  • Another issue was a few days ago, that the binding stopped updating itself, because it received a non-JSON response and there was an exception which stopped the binding auto-update feature. Looks like something changed in the API…
4 Likes

Continuing the discussion from iCloud SSL issue again:

Could you please provide a full HOWTO with all needed resources (working links), console commands etc. to get this binding working again? This would be very helpful. Thank you very much

Great thanks! It worked - only a few of these, but it’s working again:-)

2020-01-22 13:13:22.009 [WARN ] [l.handler.ICloudAccountBridgeHandler] - Unable to refresh device data
java.io.IOException: java.util.concurrent.TimeoutException: Total timeout 15000 ms elapsed
	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:91) ~[?:?]
	at org.openhab.binding.icloud.internal.ICloudConnection.requestDeviceStatusJSON(ICloudConnection.java:72) ~[?:?]
	at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.lambda$0(ICloudAccountBridgeHandler.java:95) ~[?:?]
	at org.eclipse.smarthome.core.cache.ExpiringCache.refreshValue(ExpiringCache.java:101) ~[?:?]
	at org.eclipse.smarthome.core.cache.ExpiringCache.getValue(ExpiringCache.java:72) ~[?:?]
	at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.refreshData(ICloudAccountBridgeHandler.java:152) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_222]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_222]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]


Yes, it happend without any obvious reason at 10:30 pm CET on Jan 21st

EDIT: Fixed with jar 2.5.2.2020001211144
Thanks a lot @rkrisi

Think this is all that needs to be done, feel free to update if I’ve missed something, (quick typing between phone calls at work).

  1. Go into the console
  2. type bundle:list
  3. make a note of the number next to the icloud binding
  4. type bundle:uninstall xxx (where xxx is the number from the list in 3)
  5. download the latest jar file from this thread
  6. put the jar file into the addons folder (removing any older jar files of the icloud binding)
  7. restart OH
  8. marvel in the wonder of the icloud binding working again.
  9. if you really want to you can log into the console and type bundle:list again and check the version number of the new binding matches what you expect it to be, (in this case it is currently 2.5.2.2020001211144)

Sometimes the API won’t respond. I have increased the timeout to 15 secs, thought it might help a little bit, but it seems not…

Hi,

I followed this detailed step-by-step approach to install the latest version of iCloud binding (bundle list tells me 2.5.2.202001231549)

However, the openhab logs still shows the General SSLEnging problem. Is anyone else also still experience issues? Did I miss a step to solve the problem?

(running on Openhabian 2.5.0)

Thanks for any hint.

It’s the same here. It was tested with version 2.5.2.202001231549 on a Debian installation with openhab 2.5.0-1 and 2.5.1-2.

Caused by: java.util.concurrent.ExecutionException: java.io.EOFException: HttpConnectionOverHTTP@34a106e::DecryptedEndPoint@33feaa1a{fmipmobile.icloud.com/17.248.148.79:443<->/192.168.3.12:48074,CLOSED,fill=-,flush=C,to=0/0}

Please use my GDrive link.
Somehow Jenkins is not building the jar based on my latest changes I don’t know why…
Anyway, the updated version should be included in the next release.

It worked for me also. Thank you very much!

my Openhabian is runnig 2.4.0-1 and the JAR from your GDrive dosn´t work.
Today I can not Update my openhab to 2.5.
Do you have any JAR (with the fixed certificates) for Version 2.4?

What is the error you get when you try to install?
I think nothing changed which will prevent that you can’t use this version on 2.4… maybe some dependency are not met on 2.4 but that can be installed manually then…

Here is the error message:

2020-01-24 12:53:52.396 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.icloud-2.5.2-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.icloud [237]
  Unresolved requirement: Import-Package: com.google.gson; version="[2.8.0,3.0.0)"
	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]

Use the console to install this dependency:

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

Then you can install the jar without problems…

FIXED: https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar

NOW it works.
no reboot, only JAR in addons folder.

THX @rkrisi

THX @rkrisi, iCloud binding is back online :metal:

UPDATE: After one day…the error is back :roll_eyes:

[WARN ] [ernal.handler.ICloudAccountBridgeHandler] - Unable to refresh device data

I followed all the steps, Karaf shows the installed binding
257 │ Active │ 80 │ 2.5.2.202001211144 │ openHAB Add-ons :: Bundles :: iCloud Binding
but I continue to see Unable to refresh device data java.io.IOException: java.util.concurrent.ExecutionException: javax.net.ssl.SSLHandshakeException: General SSLEngine problem in the logs. Have restarted the bundle.
How do I troubleshoot from here?

Same issue here:
278 │ Active │ 80 │ 2.5.2.202001211144 │ org.openhab.binding.icloud

2020-01-27 19:14:31.279 [WARN ] [l.handler.ICloudAccountBridgeHandler] - Unable to refresh device data
at org.openhab.binding.icloud.internal.ICloudConnection.callApi(ICloudConnection.java:91) ~[?:?]
at org.openhab.binding.icloud.internal.ICloudConnection.requestDeviceStatusJSON(ICloudConnection.java:72) ~[?:?]
at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.lambda$0(ICloudAccountBridgeHandler.java:95) ~[?:?]
at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.refreshData(ICloudAccountBridgeHandler.java:152) ~[?:?]