gcobb321 / icloud3

iCloud3 v3 - iCloud3 is an advanced iDevice tracker that uses Apple iCloud account and HA Companion App data for presence detection and location based automations.
MIT License
545 stars 54 forks source link

KeyError: 'myInfo' #261

Open woopstar opened 1 year ago

woopstar commented 1 year ago

Startede to see this error in the logs today. Did not change anything.

Tried to restart HA. Tried to restart iCloud3, also reset the icloud3 interface and did a re-login. Still same error in the logs:

2023-04-26 10:34:46.678 ERROR (SyncWorker_9) [custom_components.icloud3.device_tracker] 'myInfo'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 6826, in _setup_tracked_devices_for_fmf
    friend_valid_emails_msg = self._get_me_device_id(api_friends, friend_valid_emails_msg)
  File "/config/custom_components/icloud3/device_tracker.py", line 6923, in _get_me_device_id
    my_info = fmf_data['myInfo']
KeyError: 'myInfo'

Version info:

Home Assistant 2023.4.6
Supervisor 2023.04.1
Operating System 10.0
Frontend 20230411.1 - latest
HACS: 1.32.1
iCloud3 Device Tracker: v2.4.7
SaturnusDJ commented 1 year ago

Similar situation here, stopped working without a change done:

2023-04-26 08:30:44.683 ERROR (SyncWorker_6) [custom_components.icloud3.device_tracker] 'locations'
Traceback (most recent call last):
  File "/config/custom_components/icloud3/device_tracker.py", line 3143, in _refresh_pyicloud_devices_location_data
    for location in devices_data['locations']:
KeyError: 'locations' 

Gives me the feeling Apple changed something.

SaturnusDJ commented 1 year ago

@gcobb321 Mention because of severity.

Gonna see how v3 is doing.

tomeralgai commented 1 year ago

Same thing here, just piling onto the issue so that I can watch as well.

SaturnusDJ commented 1 year ago

In v3 beta I get my own devices via the family sharing menu but find my friends menu is empty.

Probably same issue:

2023-04-26 18:41:49.965 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/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 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 145, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 241, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 253, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 335, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/config/custom_components/icloud3/config_flow.py", line 1917, in async_step_device_list
    self._get_conf_device_selected(user_input)
  File "/config/custom_components/icloud3/config_flow.py", line 1950, in _get_conf_device_selected
    devicename_selected = user_input[CONF_DEVICES]
KeyError: 'devices'
gcobb321 commented 1 year ago

Apple has changed something. There is no friends data being returned from Apple when setting up iC3 from the url that was being used. Now, It looks like it is returning the same data as it does when setting up the FamShr devices.

This means FmF is not available right now and you can only track devices that are part of the Family Sharing List (FamShr).

I'll dig into it when I get a chance.

SaturnusDJ commented 1 year ago

@gcobb321 Mention me if you need a tester. :)

gcobb321 commented 1 year ago

You are on the notification list. Monitor icloud3_v3/issues