gcobb321 / icloud3_v3

iCloud3 v3, Development Version - This Repo/Version is used for development and testing of new and updated features. It is not the official release of iCloud3 v3, .
MIT License
169 stars 13 forks source link

Login works with v3.1.2 works but can’t setup devices #362

Open zadori opened 1 week ago

zadori commented 1 week ago

Hey, with the latest update I’m now able to login. But it says 0 out of 7 devices tracked. Whenever I try to SELECT the menu ICLOUD3 DEVICES, I keep getting “Unknown error occurred”

I tried deleting the account, reinstalling the integration and still the same issue.

gcobb321 commented 1 week ago

Go to HA settings > System > Logs and click on anything related to iCloud3 and. It will display the error info. Post that here and I’ll see what it’s going on.

Did v3.1.1 work ok?
In the iCloud3 Devices screen, click Tools - RReset Data Sources, Delete Devices. Then select Reset All Device Data Sources. This will clear the Apple Account and Mobile App selection for all devices. Then see if you can display each one and reject the Apple acct and Mobile App.

I am going away go 3-weeks on Sunday so I would like to fix this as soon as possible.

zadori commented 1 week ago

Here is the logs

Logger: aiohttp.server Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:448 First occurred: November 8, 2024 at 8:03:08 PM (8 occurrences) Last logged: 9:05:56 AM

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 117, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 86, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin return await func(self, request, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 285, in post return await super().post(request, flow_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper return await method(view, request, data, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post result = await self._flow_mgr.async_configure(flow_id, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in async_configure result = await self._async_configure(flow_id, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 414, in _async_configure result = await self._async_handle_step( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 517, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/icloud3/config_flow.py", line 532, in async_step_menu_0 return await self.async_step_menu(user_input, errors) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/icloud3/config_flow.py", line 610, in async_step_menu return await self.async_step_device_list() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/icloud3/config_flow.py", line 2740, in async_step_device_list await self._build_mobapp_entity_selection_list() File "/config/custom_components/icloud3/config_flow.py", line 4001, in _build_mobapp_entity_selection_list Device = Gb.Devices_by_devicename[devicename]


KeyError: 'gabriel_iphone'
zadori commented 1 week ago

I am unable to reach the device screen. The error pops while trying to reach that screen. I am able to go in the other sub-menus. I was unable to connect to my Apple ID in 3.1.1, this version fixed it but now I see 0 out of 7 devices tracked in the data source menu.

gcobb321 commented 1 week ago

@zadori The problem was orphaned mobapp devices. See this link. Download the patch-config_flow,zip here install. It fixes the issue.

zadori commented 1 week ago

Perfect this works like a charm 👌

thanks a lot