-
Notifications
You must be signed in to change notification settings - Fork 13
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 3 DEVICES dialogue throws "unknown error" upon save #6
Comments
HA log file. /config/home-assistant.log |
|
This is after I tried to configure the devices as noted at the open of the issue:
|
|
|
Beta 2 has been posted. You will find it here |
@gcobb321 dropped in the new build, restarted HA, went back to configuring. Started with logging into iCloud (success) and on to
|
Commented out the ICLOUD3 platform entries in configuration.yaml and redid all steps except file replacement.
|
Delete ‘/config/.storage/icloud3/configuration’ (The iCloud3 configuration file) and restart HA. That will migrate the days again. If you get the same error:
The error referenced a ‘ john_iphone’ which it couldn’t find. I’m wondering if it is set in secrets or no longer exists. HA makes it hard to figure out what caused an error by just saying something went wrong. I’ll put some error trapping in the code that originally caused the error tomorrow and send you the update before posting a new beta release. Gary |
The bottom image from your iPad mini shows iCloud3 Event Log v3 where the other does not show the v3 (old version) so the cache did not clear. Are you using Cringe, Safari, Edfe or something else. The docs have the steps I use to clear Chrome and Edge here. Did you go back to the tab with screen and select ‘refresh’? The _2 after the device _tracker refers to the one set up for the iOS app, not iCloud3. You can see the actual iOS app device names on the mobile app Integration screen. The FamShr Device under Tracked Devices showers John iPhone but then shows NOT IN FAMILY SHARE LIST. That says there was a problem accessing the iCloud account to get those names. I can see one line for the FmF devices (test2…) at the bottom of the screen and would like to see the the rest of the startup events. Export the Event Log and send to [email protected]. Do Event Log > Actions > Export Event Log. The file is in the /config directory with the HA files. Also, Event Log > Actions > Show Tracking Monitors shows a lot more detail about what happens under the covers. Also Configurator > Menu page 2 > other parameters > log level > Rawdata will dump the iCloud account traffic and detail iCloud3 details to the HA log file (home-assistant.log). Restart HA and send me that file to. See here for an example of what it shows |
Brave browser stubbornly ignored hard refresh so I manually cleared the cache from within it's settings. All instances now seeing the v3 Event Log Viewer as expected. I'll restart iC3v3 and export the logs ~~~momentarily~~~. Sent. |
@gcobb321 did you receive the logs yesterday? |
I did and was about ready to look at them. |
HA, no worries - just wanted to make sure my ESP hadn’t eaten them!
…--
John Alan
01000011 01110101 01110010 01101001 01101111 01110011 01101001 01110100 01111001 00100000 01101001 01110011 00100000 01110100 01101000 01100101 00100000 01101101 01101111 01110011 01110100 00100000 01110110 01100001 01101100 01110101 01100001 01100010 01101100 01100101 00100000 01100110 01100101 01100001 01110100 01110101 01110010 01100101 00100000 01101111 01100110 00100000 01101001 01101110 01110100 01100101 01101100 01101100 01101001 01100111 01100101 01101110 01110100 00100000 01101100 01101001 01100110 01100101 00101110
On Dec 20, 2022, at 09:04, Gary Cobb ***@***.***> wrote:
I did and was about ready to look at them.
—
Reply to this email directly, view it on GitHub <#6 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADDD4KDGB6WNAEWGLZZOZ6TWOG4GDANCNFSM6AAAAAATCRXJLI>.
You are receiving this because you authored the thread.
|
Right at the start, there is an error logging into your iCloud account and no location data was available. That leads to a device id (from the iCloud account) error not found since there was no data. All that was doing was trying to fill in some device model description which is not really needed. It also prevented some other device setup to be done. The Event Log shows John IPhone only linking through the iOS app. Have you been able to log into the iCloud account yet? The HA log only shows basic error messages and I would like to see all the iCloud account raw data if you still can not connect to your account. Configurator > Menu Page 2 > Other Parameters > Log Level - RawData restart HA and send me the HA log file again. |
Have you checked the ICLOUD ACCOUNT screen to make sure the username and password converted correctly. The password is now encrypted in the configuration file. Maybe it didn’t decrypt correctly. The Show… option on that screen will display them.
————————
Gary Cobb
…On Dec 20, 2022 at 9:05 AM -0500, John ***@***.***>, wrote:
HA, no worries - just wanted to make sure my ESP hadn’t eaten them!
--
John Alan
01000011 01110101 01110010 01101001 01101111 01110011 01101001 01110100 01111001 00100000 01101001 01110011 00100000 01110100 01101000 01100101 00100000 01101101 01101111 01110011 01110100 00100000 01110110 01100001 01101100 01110101 01100001 01100010 01101100 01100101 00100000 01100110 01100101 01100001 01110100 01110101 01110010 01100101 00100000 01101111 01100110 00100000 01101001 01101110 01110100 01100101 01101100 01101100 01101001 01100111 01100101 01101110 01110100 00100000 01101100 01101001 01100110 01100101 00101110
> On Dec 20, 2022, at 09:04, Gary Cobb ***@***.***> wrote:
>
>
> I did and was about ready to look at them.
>
> —
> Reply to this email directly, view it on GitHub <#6 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADDD4KDGB6WNAEWGLZZOZ6TWOG4GDANCNFSM6AAAAAATCRXJLI>.
> You are receiving this because you authored the thread.
>
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Did the login and devices start tracking in iCloud3 or are you still having problems? I kinda forgot where things stand with your issue then. I am working on several right now and will probably do a beta 3 this afternoon but wanted to try to cure your issue if it still exists.
Thanks for being on the bleeding edge
————————
Gary Cobb
…On Dec 20, 2022 at 10:27 AM -0500, John ***@***.***>, wrote:
On this dialogue?
Everything is clear and correct.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I hear ya on losing track, been working a few things here myself. The issue at the moment is that the only device being tracked is john_iphone. None of the others, though configured, are tracking. Ok, this is interesting... I went to grab you a screenshot of the configured devices and got this again: |
After you get that error, go to HA Settings > System > Logs. It should shot an Exception error message at the top of the list with a bunch of code and line numbers showing where it happened. Send me a screenshot.
————————
Gary Cobb
…On Dec 20, 2022 at 10:35 AM -0500, John ***@***.***>, wrote:
I hear ya on losing track, been working a few things here myself.
The issue at the moment is that the only device being tracked is john_iphone. None of the others, though configured, are tracking.
Ok, this is interesting... I went to grab you a screenshot of the configured devices and got this again:
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
|
I thought I had fixed that in beats 2. Guess not. Go to ICLOUD ACCOUNT and do a login. Then come back to ICLOUD3 DEVICES and see if you still get the error
————————
Gary Cobb
…On Dec 20, 2022 at 10:44 AM -0500, John ***@***.***>, wrote:
Log Details (ERROR)
This error originated from a custom integration.
Logger: aiohttp.server
Source: custom_components/icloud3/support/pyicloud_ic3.py:272
Integration: iCloud3 Device Tracker ([documentation](https://gcobb321.github.io/icloud3_v3_docs/#/), [issues](https://github.com/gcobb321/icloud3/issues))
First occurred: 10:33:33 (2 occurrences)
Last logged: 10:38:27
Error handling request
Traceback (most recent call last):
File "/config/custom_components/icloud3/support/pyicloud_ic3.py", line 151, in request
response = Session.request(self, method, url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/local/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1293, in _send_request
self.putrequest(method, url, **skips)
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 219, in putrequest
return _HTTPConnection.putrequest(self, method, url, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 180, in protected_loop_func
check_loop(func, strict=strict)
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 168, in check_loop
raise RuntimeError(
RuntimeError: Blocking calls must be done in the executor or a separate thread; Use `await hass.async_add_executor_job()`; at custom_components/icloud3/support/pyicloud_ic3.py, line 151: response = Session.request(self, method, url, **kwargs)
During handling of the above exception, another exception occurred:
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 81, 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 136, 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 73, 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 281, in async_configure
result = await self._async_handle_step(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/icloud3/config_flow.py", line 567, in async_step_menu
return await self.async_step_device_list()
File "/config/custom_components/icloud3/config_flow.py", line 1534, in async_step_device_list
self._build_device_form_selection_lists()
File "/config/custom_components/icloud3/config_flow.py", line 2057, in _build_device_form_selection_lists
self._build_opt_famshr_devices_list()
File "/config/custom_components/icloud3/config_flow.py", line 2071, in _build_opt_famshr_devices_list
devices_desc = start_ic3.get_famshr_devices(self.PyiCloud)
File "/config/custom_components/icloud3/support/start_ic3.py", line 1317, in get_famshr_devices
PyiCloud.FamilySharing.refresh_client()
File "/config/custom_components/icloud3/support/pyicloud_ic3.py", line 951, in refresh_client
response = self.Session.post(self._fmip_refresh_url,
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 635, in post
return self.request("POST", url, data=data, json=json, **kwargs)
File "/config/custom_components/icloud3/support/pyicloud_ic3.py", line 156, in request
self._raise_error(-2, "Failed to establish a new connection")
File "/config/custom_components/icloud3/support/pyicloud_ic3.py", line 272, in _raise_error
raise api_error
custom_components.icloud3.support.pyicloud_ic3.PyiCloudAPIResponseException: Failed to establish a new connection (Status Code -2)
Logger: icloud3
Source: util/async_.py:168
First occurred: 10:02:26 (3 occurrences)
Last logged: 10:38:27
Blocking calls must be done in the executor or a separate thread; Use `await hass.async_add_executor_job()`; at custom_components/icloud3/support/pyicloud_ic3.py, line 151: response = Session.request(self, method, url, **kwargs)
Traceback (most recent call last):
File "/config/custom_components/icloud3/support/pyicloud_ic3.py", line 151, in request
response = Session.request(self, method, url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/local/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1293, in _send_request
self.putrequest(method, url, **skips)
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 219, in putrequest
return _HTTPConnection.putrequest(self, method, url, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 180, in protected_loop_func
check_loop(func, strict=strict)
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 168, in check_loop
raise RuntimeError(
RuntimeError: Blocking calls must be done in the executor or a separate thread; Use `await hass.async_add_executor_job()`; at custom_components/icloud3/support/pyicloud_ic3.py, line 151: response = Session.request(self, method, url, **kwargs)
Logger: homeassistant.util.async_
Source: util/async_.py:180
First occurred: 10:02:26 (3 occurrences)
Last logged: 10:38:27
Detected blocking call to putrequest inside the event loop. This is causing stability issues. Please report issue to the custom integration author for icloud3 doing blocking calls at custom_components/icloud3/support/pyicloud_ic3.py, line 151: response = Session.request(self, method, url, **kwargs)
This error originated from a custom integration.
Logger: icloud3
Source: custom_components/icloud3/support/pyicloud_ic3.py:272
Integration: iCloud3 Device Tracker (documentation, issues)
First occurred: 10:02:26 (1 occurrences)
Last logged: 10:02:26
Failed to establish a new connection (Status Code -2)
Traceback (most recent call last):
File "/config/custom_components/icloud3/support/pyicloud_ic3.py", line 151, in request
response = Session.request(self, method, url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/local/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1293, in _send_request
self.putrequest(method, url, **skips)
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 219, in putrequest
return _HTTPConnection.putrequest(self, method, url, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 180, in protected_loop_func
check_loop(func, strict=strict)
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 168, in check_loop
raise RuntimeError(
RuntimeError: Blocking calls must be done in the executor or a separate thread; Use `await hass.async_add_executor_job()`; at custom_components/icloud3/support/pyicloud_ic3.py, line 151: response = Session.request(self, method, url, **kwargs)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/icloud3/config_flow.py", line 1252, in async_step_icloud_account
await self._log_into_icloud_account(user_input, self.step_id)
File "/config/custom_components/icloud3/config_flow.py", line 1385, in _log_into_icloud_account
self._build_device_form_selection_lists()
File "/config/custom_components/icloud3/config_flow.py", line 2057, in _build_device_form_selection_lists
self._build_opt_famshr_devices_list()
File "/config/custom_components/icloud3/config_flow.py", line 2071, in _build_opt_famshr_devices_list
devices_desc = start_ic3.get_famshr_devices(self.PyiCloud)
File "/config/custom_components/icloud3/support/start_ic3.py", line 1317, in get_famshr_devices
PyiCloud.FamilySharing.refresh_client()
File "/config/custom_components/icloud3/support/pyicloud_ic3.py", line 951, in refresh_client
response = self.Session.post(self._fmip_refresh_url,
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 635, in post
return self.request("POST", url, data=data, json=json, **kwargs)
File "/config/custom_components/icloud3/support/pyicloud_ic3.py", line 156, in request
self._raise_error(-2, "Failed to establish a new connection")
File "/config/custom_components/icloud3/support/pyicloud_ic3.py", line 272, in _raise_error
raise api_error
custom_components.icloud3.support.pyicloud_ic3.PyiCloudAPIResponseException: Failed to establish a new connection (Status Code -2)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Weird, same result.
And I did do a forced browser cache clear just in case. |
I think this is fixed in beta 3. I’ll close this issue when beta 3 is available. |
Ho Ho Ho. Happy holidays. 🎄🎅 If you don’t have plans, enjoy iCloud3 v3.0.0 beta 3 Gary |
@gcobb321 I ran into this all day today trying to get icloud3 v3 to work. I noticed I had some “ghost device names” (_1 appended to the names) and I also noted that in the console view of my browser developer tools, it would throw an error 500. So it would say “unknown error” when saving and the developer tools throwing HTTP/1.1 500 errors. I was able to work out that this was because of apparently ghost entries. I killed those entries, renamed my device_tracker entities. Restarted home assistant. Also renamed the devices in iCloud. Had to wait maybe 45 minutes but when everything automatically started populating in the drop down boxes. It wasn’t apparent this was the issue and it took a lot of brute forcing to result in a state that would let you save the devices in the configuration. |
Moving thru the configuration, I logged into my account:
(Oddly, did not receive the prompt from Apple for the 2FA code)
Move on to the next item, iCLOUD 3 DEVICES
Click
Submit
and receive errorThe text was updated successfully, but these errors were encountered: