icloud3 icon indicating copy to clipboard operation
icloud3 copied to clipboard

"Unknown Error" occurs when adding 1st device

Open jacky-coke opened this issue 1 year ago • 4 comments

Dear all,

I have difficulties setting up the first device after having sucessfully logged in:

https://github.com/user-attachments/assets/1b8006f3-e380-4c0a-8284-998bad1e20b6

EventLog shows the following: image

Logs [['Debug', '^i^iCloud3 v3.0.5.7 > Start up Complete'], ['9:38:11p', 'Requesting Initial Locate'], ['9:38:11p', '^a^The following issues were detected when starting iCloud3. Scroll through the Startup Log for more information: ⣇1. iCloud3 Integration not set up'], ['Debug', '^g^Stage 5 > Device Configuration Summary'], ['Debug', '^g^ Stage 4 > Setup iCloud & MobApp Data Source'], ['9:38:11p', 'Mobile App Devices > 0 of 0 used by iCloud3⣇⠋×⠉[proPad]Jacky-Coke.com, propad_jacky_coke_com_ha_app (iPad8,3) >⣇⠛⠛◦⠈Not Assigned to an iCloud3 Device⣇⠋×⠉Company Phone, company_phone_3_ha_app (iPhone12,8) >⣇⠛⠛◦⠈Not Assigned to an iCloud3 Device⣇⠋×⠉iPad Air weiß , ipad_air_weiss_ha_app (iPad6,12) >⣇⠛⠛◦⠈Not Assigned to an iCloud3 Device⣇⠋×⠉iPad Darla, ipad_darla_2_ha_app (iPad11,2) >⣇⠛⠛◦⠈Not Assigned to an iCloud3 Device⣇⠋×⠉iPad von Dominik, ipad_von_dominik_2_ha_app (iPad11,2) >⣇⠛⠛◦⠈Not Assigned to an iCloud3 Device⣇⠋×⠉iPhone Darla, iphone_darla_2_ha_app (iPhone12,1) >⣇⠛⠛◦⠈Not Assigned to an iCloud3 Device⣇⠋×⠉Jacky-Coke.com, jacky_coke_com_ha_app (iPhone14,2) >⣇⠛⠛◦⠈Not Assigned to an iCloud3 Device⣇⠋×⠉MacBook Air von Nik, macbook_air_von_nik_2_ha_app (Mac14,2) >⣇⠛⠛◦⠈Not Assigned to an iCloud3 Device⣇⠋×⠉Musik iPad , musik_ipad_10_ha_app (iPad6,7) >⣇⠛⠛◦⠈Not Assigned to an iCloud3 Device⣇⠋×⠉Ninas iPhone, ninas_iphone_ha_app (iPhone14,4) >⣇⠛⠛◦⠈Not Assigned to an iCloud3 Device'], ['9:38:11p', 'Checking Mobile App Integration > Loaded, Devices-iPad Darla, [proPad]Jacky-Coke.com, iPad Air weiß , MacBook Air von Nik, Jacky-Coke.com, iPad von Dominik, iPhone Darla, Ninas iPhone, Musik iPad , Company Phone'], ['9:38:11p', 'iCloud Location Service interface > Verified (startup)'], ['9:38:09p', 'iCloud Location Service interface > Verified (initial)'], ['9:38:09p', 'iCloud Acct Auth #1 > Password+Token, Last-00:00:00'], ['9:38:04p', 'iCloud Account > Logging Into- (do.....@tu............)'], ['Debug', '^g^Stage 3 > Prepare Configured Devices'], ['9:38:04p', 'Data Sources > FamShr, MobApp'], ['9:38:04p', '^a^CONFIGURATION ALERT > DEVICES MUST BE SET UP TO ENABLE TRACKING⣇⣇1. Select Settings > Devices & Services > Integrations⣇2. Select +Add Integrationto add the iCloud3 integration if it is not dislayed. Then search foriCloud3, select it and complete the installation.⣇3. Select iCloud3 > Configurationto open iCloud3 Configure Settings screens.⣇4. Review and setup theiCloud AccountandUpdate Devicesconfiguration screens.⣇5. Exit the configurator andRestart iCloud3.'], ['Debug', '^g^Stage 2 > Prepare Support Services'], ['9:38:04p', 'Waze History Database > /config/.storage/icloud3/waze_location_history.db'], ['9:38:04p', 'Set Up Waze > Server-United States, Canada (US), CountryCode-DE, MinDist-1km, MaxDist-1000km, Realtime-False, HistoryDatabaseUsed-True'], ['9:38:04p', 'Special Zone Setup >⣇⠋•⠉Enter Zone Delay > DelayTime-30 secs⣇⠋•⠉Stationary Zone > Radius-100m, DistMoveLimit-125m, MinDistFromAnotherZone-200m'], ['9:38:04p', 'Set up Zones > zone, Display (fname)⣇⠋•⠉home, Eichenhohl - Home (r100m/328.1ft)'], ['Debug', '^g^Stage 1 > Initial Preparations'], ['9:38:04p', 'Local Time Zone Offset > UTC+02:00 hrs, CEST, Country Code-DE'], ['9:38:04p', 'iCloud3 Event Log > ⣇⠋•⠉Current Version Installed-v3.0.17⣇⠋•⠉File-/config/www/icloud3/icloud3-event-log-card.js'], ['9:38:04p', 'iCloud3 Configuration File > /config/.storage/icloud3/configuration'], ['9:38:04p', 'iCloud3 Directory > /config/custom_components/icloud3'], ['9:38:04p', 'Configure iCloud3 Operations >⣇⠋•⠉Load configuration parameters⣇⠋•⠉Set Display Text As Fields (0 used)⣇⠋•⠉Set Default Tracking Method (iCloud)⣇⠋•⠉Initialize Debug Control (debug-auto-reset)⣇⠋•⠉Set Unit of Measure Formats (mi)⣇⠋•⠉Set Event Log Record Limits (1500 Events)⣇⠋•⠉Device Tracker State Value Source ⣇⠿⠿(iCloud3 Zone Friendly Name)'], ['9:38:04p', 'Waze History Database > /config/.storage/icloud3/waze_location_history.db'], ['9:38:04p', 'Set Up Waze > Server-United States, Canada (US), CountryCode-DE, MinDist-1km, MaxDist-1000km, Realtime-False, HistoryDatabaseUsed-True'], ['9:38:04p', 'Start iCloud Account Session Executor Job'], ['9:38:04p', 'Start iCloud3 Services Executor Job'], ['9:38:04p', 'Start HA Startup/Stop Listeners'], ['9:38:04p', 'Configure iCloud3 Operations >⣇⠋•⠉Load configuration parameters⣇⠋•⠉Set Display Text As Fields (0 used)⣇⠋•⠉Set Default Tracking Method (iCloud)⣇⠋•⠉Initialize Debug Control (debug-auto-reset)⣇⠋•⠉Set Unit of Measure Formats (mi)⣇⠋•⠉Set Event Log Record Limits (1500 Events)⣇⠋•⠉Device Tracker State Value Source ⣇⠿⠿(iCloud3 Zone Friendly Name)'], ['9:38:04p', 'Waze History Database > /config/.storage/icloud3/waze_location_history.db'], ['9:38:04p', 'Set Up Waze > Server-United States, Canada (US), CountryCode-DE, MinDist-1km, MaxDist-1000km, Realtime-False, HistoryDatabaseUsed-True'], ['Debug', '^i^iCloud3 v3.0.5.7 > Starting, Tuesday, Aug 13'], ['9:38:04p', 'Sensor Entities > Created-2, Excluded-0'], ['00:00:00', 'Control Record']]

HA Logs just showed this one yesterday evening: `Logger: homeassistant.util.loop Quelle: util/loop.py:136 Erstmals aufgetreten: 13. August 2024 um 21:37:52 (1 Vorkommnisse) Zuletzt protokolliert: 13. August 2024 um 21:37:52

Detected blocking call to open with args ('/config/.storage/icloud3/configuration',) inside the event loop by custom integration 'icloud3' at custom_components/icloud3/helpers/common.py, line 311: data = json_util.load_json(filename) (offender: /usr/src/homeassistant/homeassistant/util/json.py, line 74: with open(filename, mode="rb") as fdesc:), please create a bug report at https://github.com/gcobb321/icloud3_v3/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 459, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 537, in _handle resp = await handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, 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 83, 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 85, 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/http/data_validator.py", line 74, in wrapper return await method(view, request, data, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 172, in post return await self._post_impl(request, data) File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 179, in _post_impl return await super()._post_impl(request, data) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 84, in _post_impl result = await self._flow_mgr.async_init( File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1293, in async_init flow, result = await self._async_init(flow_id, handler, context, data) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1323, in _async_init result = await self._async_handle_step(flow, flow.init_step, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 516, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) File "/config/custom_components/icloud3/config_flow.py", line 574, in async_step_user config_file.load_storage_icloud3_configuration_file() File "/config/custom_components/icloud3/support/config_file.py", line 68, in load_storage_icloud3_configuration_file success = read_storage_icloud3_configuration_file() File "/config/custom_components/icloud3/support/config_file.py", line 124, in read_storage_icloud3_configuration_file Gb.conf_file_data = load_json_file(filename) File "/config/custom_components/icloud3/helpers/common.py", line 311, in load_json_file data = json_util.load_json(filename)`

Any idea what went wrong here?

Cheers Nik

jacky-coke avatar Aug 14 '24 08:08 jacky-coke

I found a problem building the devices list when the Mobile App had not been set up.

Unzip the config_flow...zip file into the config_custom_components/icloud3 directory and restart HA. config_flow v3.0.5.7.1.zip

gcobb321 avatar Aug 14 '24 19:08 gcobb321

Thanks a lot, but still no joy:

image

`Logger: aiohttp.server Quelle: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:428 Erstmals aufgetreten: 10:49:46 (1 Vorkommnisse) Zuletzt protokolliert: 10:49:46

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 459, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 537, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, 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 83, 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 85, 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 366, in async_configure result = await self._async_configure(flow_id, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 413, in _async_configure result = await self._async_handle_step( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 516, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/icloud3/config_flow.py", line 2678, in async_step_device_list return await self.async_step_add_device() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/icloud3/config_flow.py", line 2869, in async_step_add_device await self._build_update_device_selection_lists() File "/config/custom_components/icloud3/config_flow.py", line 3276, in _build_update_device_selection_lists await self._build_mobapp_entity_list() File "/config/custom_components/icloud3/config_flow.py", line 3442, in _build_mobapp_entity_list f"{self._mobapp_fname(entity_attrs)} (" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/icloud3/config_flow.py", line 3465, in _mobapp_fname return entity_attrs['name'] or entity_attrs['original_name'] ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ KeyError: 'original_name'`

jacky-coke avatar Aug 15 '24 08:08 jacky-coke

I think this is also related to the Mobile App not being set up. Go to the Configure > Data Sources - iCloud & Mobile App and uncheck the Mobile App as a data source.

gcobb321 avatar Aug 16 '24 15:08 gcobb321

Thanks a lot but this still won't help 👎

`Logger: aiohttp.server Quelle: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:427 Erstmals aufgetreten: 05:12:02 (1 Vorkommnisse) Zuletzt protokolliert: 05:12:02

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 456, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 537, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, 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 83, 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 85, 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 366, in async_configure result = await self._async_configure(flow_id, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 413, in _async_configure result = await self._async_handle_step( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 516, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/icloud3/config_flow.py", line 2678, in async_step_device_list return await self.async_step_add_device() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/icloud3/config_flow.py", line 2869, in async_step_add_device await self._build_update_device_selection_lists() File "/config/custom_components/icloud3/config_flow.py", line 3276, in _build_update_device_selection_lists await self._build_mobapp_entity_list() File "/config/custom_components/icloud3/config_flow.py", line 3442, in _build_mobapp_entity_list f"{self._mobapp_fname(entity_attrs)} (" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/icloud3/config_flow.py", line 3465, in _mobapp_fname return entity_attrs['name'] or entity_attrs['original_name'] ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ KeyError: 'original_name'`

Since this did not lead to success, I deleted the integration and also the icloudv3-folder within custom_components folder, restarted HA and re-downloaded from HACS. Replaced the original config_flow.py with the above kindly provided one and after the next restart I added the integration again to HA. I was surprised to find all login-information to icloud already there (Username / Password); however, still no success, always these "Unknown errors"...

Just recognized: Within the attached log-File, I can at least see all my devices... icloud3-0.log

Any further ideas?

jacky-coke avatar Aug 18 '24 03:08 jacky-coke

@gcobb321: Could you find some time to look into this? It's really annoying and I was wondering if there is anything I can do to support you better; just let me know if you need any additional information.

jacky-coke avatar Sep 04 '24 16:09 jacky-coke

I think it has to do with the Mobile App not being set up.

Unzip config_flow_v5.0.5.7.1.zip into the icloud3 directory and restart HA. Let me know if it works and I'll push a v3.5.8 update with that change.

config_flow v3.0.5.7.1.zip

gcobb321 avatar Sep 04 '24 17:09 gcobb321

HA MobileApp is setup and used since months; location services are turned on, etc. Anything specific I shall check?

Just re-installed and tested, still no joy :-( "Unknown error occurred" icloud3-0.log

jacky-coke avatar Sep 04 '24 17:09 jacky-coke

@jacky-coke I can see in the log that you verified the iCloud account and then selected Add Device on the Configuration Device List screen. Errors that HA catches are not reported in the log file.

Go to Settings > System > Logs and look for an error message that says ~Error handling request`. Click on it and the cause of the error should be displayed. Copy that post it as a reply. It should give the line number and reason for the error that might help identifying what is going on

gcobb321 avatar Sep 04 '24 17:09 gcobb321


Logger: aiohttp.server
Quelle: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:433
Erstmals aufgetreten: 19:15:15 (1 Vorkommnisse)
Zuletzt protokolliert: 19:15:15

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 462, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 537, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, 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 83, 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 85, 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 366, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 413, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 516, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/config_flow.py", line 2678, in async_step_device_list
    return await self.async_step_add_device()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/config_flow.py", line 2869, in async_step_add_device
    await self._build_update_device_selection_lists()
  File "/config/custom_components/icloud3/config_flow.py", line 3276, in _build_update_device_selection_lists
    await self._build_mobapp_entity_list()
  File "/config/custom_components/icloud3/config_flow.py", line 3442, in _build_mobapp_entity_list
    f"{self._mobapp_fname(entity_attrs)} ("
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/icloud3/config_flow.py", line 3465, in _mobapp_fname
    return entity_attrs['name'] or entity_attrs['original_name']
                                   ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'original_name'

Thanks for the hint, was in a hurry getting the little one to bed: here you are ✌🏻

jacky-coke avatar Sep 04 '24 17:09 jacky-coke

@jacky-coke It is failing on the entity attribute 'original_name' not being in the entity registry.

Unzip this one and restart HA. config_flow.zip

gcobb321 avatar Sep 04 '24 17:09 gcobb321

Yeppah, this one worked 👍

image

jacky-coke avatar Sep 04 '24 18:09 jacky-coke

Thanks a lot!!!!

jacky-coke avatar Sep 04 '24 18:09 jacky-coke

Great. Let me know if there are any other issues. Look at the Mobile App selection screen to see if anything looks strange, especially in the 'Scan For' line. Does it show a devicename or Unknown?

gcobb321 avatar Sep 04 '24 18:09 gcobb321

Well.... I think I was a little too enthusiastic:

image

Will have a closer look tomorrow since I've got some stuff left to do for today: Thanks a lot for your support so far; I will keep you posted

jacky-coke avatar Sep 04 '24 18:09 jacky-coke

The screen I was referring to was the Update Devices screen Mobile App Device Tracker Entity selection field. The sensor display above is OK with the Unknown entries

image

gcobb321 avatar Sep 04 '24 18:09 gcobb321

Ah, okay: It shows one unknown device in the upper and the ‚Scan for‘ section but the rest looks well: All devices from family sharing are mentioned.

Von meinem iPhone gesendet

Am 04.09.2024 um 20:46 schrieb Gary Cobb @.***>:



The screen I was referring to was the Update Devices screen Mobile App Device Tracker Entity selection field. The sensor display above is OK with the Unknown entries

image.png (view on web)https://github.com/user-attachments/assets/31191caa-ae1c-4194-81f2-f0391fb13bbe

— Reply to this email directly, view it on GitHubhttps://github.com/gcobb321/icloud3/issues/369#issuecomment-2329748606, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATDKZEH34HDDRTJPMJFWBDLZU5IPXAVCNFSM6AAAAABMP2BOCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRZG42DQNRQGY. You are receiving this because you modified the open/close state.Message ID: @.***>

jacky-coke avatar Sep 04 '24 18:09 jacky-coke