Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iCloud] Find my Phone don't work #15333

Closed
R-Rosenow opened this issue Jul 30, 2023 · 14 comments · Fixed by #16846
Closed

[iCloud] Find my Phone don't work #15333

R-Rosenow opened this issue Jul 30, 2023 · 14 comments · Fixed by #16846
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@R-Rosenow
Copy link

R-Rosenow commented Jul 30, 2023

The find my phone function don't work anymore with Openhab 4.

Log output

2023-07-30 08:47:45.099 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.icloud.internal.handler.ICloudDeviceHandler@5fec49': Retry finally failed.
org.openhab.binding.icloud.internal.RetryException: Retry finally failed.
at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.callApiWithRetryAndExceptionHandling(ICloudAccountBridgeHandler.java:216) ~[?:?]
at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.findMyDevice(ICloudAccountBridgeHandler.java:290) ~[?:?]
at org.openhab.binding.icloud.internal.handler.ICloudDeviceHandler.handleCommand(ICloudDeviceHandler.java:145) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor212.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) ~[?:?]
at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) ~[?:?]
at jdk.proxy8760.$Proxy8928.handleCommand(Unknown Source) ~[?:?]
at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:85) ~[?:?]
at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) ~[?:?]
at jdk.internal.reflect.GeneratedMethodAccessor268.invoke(Unknown Source) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:147) ~[?:?]
at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: org.openhab.binding.icloud.internal.ICloudApiResponseException: Request https://p138-fmipweb.icloud.com:443/fmipservice/client/web/playSound failed with 500.
at org.openhab.binding.icloud.internal.ICloudSession.request(ICloudSession.java:148) ~[?:?]
at org.openhab.binding.icloud.internal.ICloudSession.post(ICloudSession.java:98) ~[?:?]
at org.openhab.binding.icloud.internal.FindMyIPhoneServiceManager.playSound(FindMyIPhoneServiceManager.java:77) ~[?:?]
at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.lambda$5(ICloudAccountBridgeHandler.java:294) ~[?:?]
at org.openhab.binding.icloud.internal.handler.ICloudAccountBridgeHandler.callApiWithRetryAndExceptionHandling(ICloudAccountBridgeHandler.java:185) ~[?:?]
... 19 more

Environment

  • Version used: openHAB 4.0.1 - Release Build
  • Operating System : Raspbian GNU/Linux 11 (bullseye) (Raspberry Pi 4 Model B Rev 1.1)
@R-Rosenow R-Rosenow added the bug An unexpected problem or unintended behavior of an add-on label Jul 30, 2023
@R-Rosenow
Copy link
Author

Any news?

It also don't work with the actual Update.

@Dirkystan
Copy link

I have exactly the same issue

@msexton187
Copy link

I'm having the same issue and have been for a while. I'm currently on 4.0.2 and pasted my trace results below.

2023-12-15 14:29:35.342 [DEBUG] [inding.icloud.internal.ICloudSession] - iCloud request POST https://p103-fmipweb.icloud.com:443/fmipservice/client/web/playSound.
2023-12-15 14:29:35.343 [TRACE] [inding.icloud.internal.ICloudSession] - Calling https://p103-fmipweb.icloud.com:443/fmipservice/client/web/playSound
Headers -----
java.net.http.HttpHeaders@db4184c6 { {Origin=[https://www.icloud.com], Referer=[https://www.icloud.com/]} }
Body -----
{"device":"7AA2762D-E0A5-4C21-8707-C8AF55C297E8","fmyl":true,"subject":"Message from openHAB."}
------

2023-12-15 14:29:35.528 [TRACE] [inding.icloud.internal.ICloudSession] - Result https://p103-fmipweb.icloud.com:443/fmipservice/client/web/playSound 500
Headers -----
java.net.http.HttpHeaders@9d864ca2 { {access-control-allow-credentials=[true], access-control-allow-origin=[https://www.icloud.com], access-control-expose-headers=[X-Apple-Request-UUID,Via], connection=[keep-alive], content-length=[50], date=[Fri, 15 Dec 2023 20:29:35 GMT], server=[AppleHttpServer/78689afb4479], set-cookie=[xr_3n2093n1a=c1ybB9lsayxn9gqrgRzWbDbul+0UJUDYPK9HaQ63j4uR6Q==; Path=/; Secure; HttpOnly, X-APPLE-WEBAUTH-FMIP="Hg==BST_IAAAAAAABLwIAAAAAGV8ty8RDmdzLmljbG91ZC5hdXRovQCW25sY5rbn5RaTJjjEzkw084baEUgBpvUSRH7F5K37Hha-2jZHSLumpTPmyHrj2pUJNvOPhsTAkoABxdUqWfiUNj5uSSWua9m7ncpvsB_dmUDNs7BjVACCOfvR2WpaoK8cboyh1JDVxerpyhGzrocCapt89w~~";Path=/;Domain=.icloud.com;Secure;HttpOnly, X-APPLE-WEBAUTH-TOKEN="v=2:t=Hg==BST_IAAAAAAABLwIAAAAAGV8ty8RDmdzLmljbG91ZC5hdXRovQCW25sY5rbn5RaTJjjEzkw084baEUgBpvUSRH7F5K37Hha-2jZHSLumpTPmyHrj2pUJNvOPhsTAkoABxdUqWfiUNj5uSSWua9m7ncpvsB_dmYsOGYe2OjAcWH5d15czWgSaGnfs7eMPUvZyTKd6flrrK4-2yg~~";Expires=Fri, 29-Dec-2023 20:29:35 GMT;Path=/;Domain=.icloud.com;Secure;HttpOnly], strict-transport-security=[max-age=31536000; includeSubDomains;], via=[xrail:mr42p00ic-qujn10130702.me.com:8301:23R615:grp24,631194250daa17e24277dea86cf30319:c42e4dfc21023fe66b0642ba15d13750:usdal2], x-apple-edge-response-time=[80], x-apple-request-uuid=[5bb44c24-2f61-459d-a892-196eeaed646c], x-apple-user-partition=[103], x-responding-instance=[fmipservice:2:2499B3766:1ed91b4633a7], x-responding-partition=[p103], x-responding-server=[prod-p103-fmipservice--partial-867b5cc9b6-8kv7b_99], x-robots-tag=[noindex, noarchive, nosnippet, nofollow]} }
Body -----
{"desc":"default text from ResponseContentFilter"}
------

2023-12-15 14:29:35.528 [DEBUG] [l.handler.ICloudAccountBridgeHandler] - ICloudApiResponseException with status code 500

@R-Rosenow
Copy link
Author

With OpenHAB 4.1.0 the bug is not fixed.

@maihacke
Copy link
Contributor

maihacke commented Feb 2, 2024

I think I found out the cause for this issue. The playSound API expects the device "id" to address the device. With #14660 we changed the binding to use the "deviceDiscoveryId" because it turned out that "id" changes over time.

@msexton187
Copy link

msexton187 commented Feb 2, 2024 via email

@lsiepel
Copy link
Contributor

lsiepel commented Feb 4, 2024

e "

Can you come up with a PR or testable jar?

@maihacke
Copy link
Contributor

maihacke commented Feb 5, 2024

In principle yes, but the fix will take sometime and currently I'm a bit busy.

@Dirkystan
Copy link

Any progress here?

@maihacke
Copy link
Contributor

maihacke commented Jun 3, 2024

Nope :-( Sorry

@maihacke
Copy link
Contributor

maihacke commented Jun 5, 2024

I created a PR which should fix the issue. Works for me ;-)
Please test with a fixed version of the binding here https://github.com/maihacke/openhab-addons/releases/tag/15333-icloud-findmy-rc0

@msexton187
Copy link

msexton187 commented Jun 7, 2024 via email

@TheNinth7
Copy link
Contributor

Is this fix already part of an official release?

@lsiepel
Copy link
Contributor

lsiepel commented Oct 8, 2024

To determine if it is part of the stable release, you can ask, but you can also easily find it by yoursefl :-)
When you navigate to the linked pull request, you can observe it was merged on 9th june and added to the 4.2 milestone. Also stable releases are anounced in the community forums and you can always search the release notes for 'icloud' to find the same information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants