-
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
Apple ID get's locked every 1-3 days and ic3 often fails at startup even when account is not locked #317
Comments
I've encountered a similar situation. Unfortunately, I haven't been able to get IC3 to accept the new AppleID credentials. |
@garyak |
@Snuffy2 You have Log level debug. You really want ’rawdata’ . Rawdata dumps the data request and what was returned from Apple to the log file. It shows the devices that are returned when iCloud3 starts and all the raw Location data when it is running. Turn it on in Configure Settings > Page 2 > Format Parameters screen so it stays on overnight. Selecting it from the Event Log > Actions > xx will turn it off at midnight. Then let’s see what Apple is returning. There is a ‘locked: True’ field in the data that might show what was going on when it was set. 3-days of log files are kept and they e at midnight. -0 is today, -1 is yesterday and-2 is the day before. If it takes several days to show to, you might need to rename them each day so they are not lost. If this seems to happen more on one device, put that device name in the filter field on the Configure Settings > Page 2 > Format Parameters screen. That will limit the raw data to only that device and I don’t have to go through a lot of hay to find the needle. |
@gcobb321 I reloaded fresh code as I was getting new waze errors. All errors are now gone from the event log, but still not connected to icloud after updating credentials. Logs in OK, but doesn't appear to save as I go back to enter the verification code. Request new verification from the Event Log pull-down isn't working for me now. Also, the configure button on the Event Log just circles back instead of initiating the config routine. |
@garyak Can you go to configure via Settings > Devices Anna Services > iCloud3 > Configure? |
Yes. Can access the configuration screens from devices and services. Configuration file at .storage/icloud3 shows null values for user credentials. Adding a -2 to the sensor entities on the cards for both devices returned values. "iCloud Location Tracking is not being used." |
It sounds like HA may have created duplicate sensor entities with the _2 suffix. And maybe the dev trkr entities too. It did that to me last night with my iPad. The mobile app has 4 of them. You may have to go to the devices and settings and rename the entities or go into the iCloud3 Configure Settings > and select them again. |
@gcobb321 after I got prompted to re-authenticate tonight I noticed few hours later after I did re-authentificated and reloaded the integration all sensors created by the Icloud V3 integration got duplicated and got the _2 suffix. The problem now is I can not rename them by remove the _2 suffix because those entity names still exist, if I try to delete them trying to use th clokwheel within the entity window I can not because it show me that the entity have no unique ID. You have any suggestion how I can remove these "unavailable" entities? EDIT : it looks like all entities got removed during startup after re-authenticate, but they still show up in HA OTHER EDIT : I did try to remove the battery sensor from the sensors section of config, pushed submit and after choose exit and restart, now I not have any battery level available and all other sensors are re created with _3 suffix and now have 3 same entities of which two unavailable and not able to delete because no unique_id .... also am not able to select battery sensor anymore now in sensor config, when I select and click submit I get the message a error occurred. |
You can disable unwanted entities. |
@garyak No I can not because I can not enter the entity because it not have a unique-id, and every reload I do creates a duplicate of the sensors with a next in line number suffix |
@smarthomefamilyverrips I haven't run into your problem before. If available, you could restore a recent backup. I usually have gotten duplicate entries with numeric (-2) additions when I reinstall over the top of a previous installation. I now delete the previous integration and restart HA before installing a new instance of IC3. The difficult option is to stop HA core and edit the core.entity_registry file to remove, I reccomend you backup the original file before you edit. |
@smarthomefamilyverrips This problem should really be in its own issue since it does not relate to the title of the problem even though it is similar to the one GaryK was having. To remove the unavailable entities, click the check box to select all entities and then select remove..HA will only remove the ones that are unstable and leave the rest. Then restart HA and rename the ones wits the _2 to their correct name without the _2 |
@gcobb321 what checkbox you mean? |
@gcobb321 if you mean the checkbox within the settings>devices & services>entities it not let me select them..... I do see them in the list but it only let me select the available entities (the ones with suffix _3) I asume this is also because the old entities not have a unique_id... any other suggestion? |
@smarthomefamilyverrips settings >devices and services >settings >entities. Then click the icon to the right of the filters icon on the top row display the check boxes next to the entities. Check the one on the top row to select everything |
@gcobb321 as stated in my last comment this only select the entities with the _3 suffix but not the unavailable entities (see screenshot) |
@smarthomefamilyverrips You may have to disable iCloud3 and restart HA 2 times. Then try again to clean out everything. Then reenable iCloud3 and restart HA again. I would do a backup first in case of problems |
@gcobb321 I will try this then and let you know if worked |
@gcobb321 instead of disable the integration I did power cycle my HA Blue and that did remove all duplicate entities, Only now I am unable to create a new battery sensor, If i select it within sensor section by checking the checkbox and click submit it gives me message "unknow error occured"and the blow is in the HA logs Logger: aiohttp.server Error handling request |
@smarthomefamilyverrips That is an iCloud3 bug. That code should have been removed in v3.0.5.5 that fixed the HA recorder issue that I missed. I'm working on that module for another issue and will post it here when it is ready. |
@gcobb321 Ok I understand, but how I am able to add battery sensors now then as it not let me from the sensor configuration? |
@smarthomefamilyverrips It may have been added. The last thing that was being done was generating the error msg after it had been created. Check to see if it exists. If not, you will have to wait for the update. |
@gcobb321 If I select the battery sensor by checking the checkbox and click submit indeed the battery sensors get created even while I just stay on the sensor configuration window instead of going back to previous window after clcking submit and still get the error message..... only the battery checkbox afterwards still is blank if I check and when I restart HA it makes the battery sensors become unavailable..... so I geuss I need to wait for update as you suggested, any ETA on this? I also can try a beta if it helps you to see if solves this sensor select issue. |
@smarthomefamilyverrips Unzip config_flow.zip into the icloud3 directory and restart HA. |
@gcobb321 if I use that I get "failed to setup, import error" and integration not starts following in logs Logger: homeassistant.config_entries Error importing platform config_flow from integration icloud3 to set up icloud3 configuration entry: cannot import name 'get_file_list' from 'custom_components.icloud3.helpers.common' (/config/custom_components/icloud3/helpers/common.py) AND Logger: homeassistant.util.loop Detected blocking call to import_module with args ('custom_components.icloud3.config_flow',) in /usr/src/homeassistant/homeassistant/loader.py, line 1296: return importlib.import_module(f"{self.pkg_path}.{platform_name}") inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#import_module 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/src/homeassistant/homeassistant/config_entries.py", line 734, in async_setup_locked await self.async_setup(hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 553, in async_setup await integration.async_get_platform("config_flow") File "/usr/src/homeassistant/homeassistant/loader.py", line 1100, in async_get_platform platforms = await self.async_get_platforms((platform_name,)) File "/usr/src/homeassistant/homeassistant/loader.py", line 1165, in async_get_platforms platforms.update(self._load_platforms(platform_names)) File "/usr/src/homeassistant/homeassistant/loader.py", line 1090, in _load_platforms platform_name: self._load_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _load_platform cache[full_name] = self._import_platform(platform_name) File "/usr/src/homeassistant/homeassistant/loader.py", line 1296, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") EDIT: I did place the old config_flow file back again and the integration started again, only again like before after the HA restart the battery sensors got unavailable, going into sensor configure and select the battery sensor checkbox and push submit gave also same error message but same as before it did make the battery sensors become available again I will just await the update and hope this fixes my issue 👍 |
@gcobb321 if I replace the configuration file in .storage/icloud3 with a configuration file of a back-up made yesterday morning before I did uncheck the battery sensor in the sensor configuration it will not check again the battery sensor and not make it unavailable anymore when I restart HA? This is my configuration file now: { And this is my Backed-Up configuration file { |
my iCloud v3 also stopped working and I can't get it to log in again or anything.. |
This is pretty vague.
|
I was just able to make it work again, turns out my icloud account got locked (I don't know why) and I could unlock it by going on https://www.icloud.com/ |
This issue now happens again to me. |
The difficulty is figuring out what is causing this is it has never have happened to me and I have never seen any Log records that show the Apple account events from before it was locked to when it was locked. I would appreciate it if someone whose account locked several times would do this:
|
I'm reporting these together as I suspect they are related. I have several apple devices linked to my apple ID but I think that ic3 is the only non-apple thing that directly uses my apple credentials. I have 5 trackers setup in ic3, myself and 4 family members all shared via Family Sharing. For about the last month, my Apple ID has been getting locked every 1-3 days.
I'll notice that icloud3 isn't updating and notice in the ic3 logs that there are errors. I'll then open icloud.com (not in Safari) and after logging in get notified my account is locked. I'll follow the steps to unlock my account and then get an email from Apple confirming that my account is now unlocked. Additionally, I can then go to icloud.com and browse my account sucessfully.
Once unlocked, I'll then go to ic3 and select Restart icloud3. Sometimes it restarts fine and all 5 trackers come up. However ~50% of the time only my tracker comes up and the rest show yellow triangles. The debug log for starting up where it only finds my device is here:
icloud3-0_bad_init.log
Additionally, since this frequent Apple ID locking has started, when I restart ic3, it is about 50/50 whether it will startup correctly or only have my tracker working with the rest having yellow triangles. This happens when my account isn't currently locked and that I haven't had to unlock it in the last several hours to days.
Any thoughts on this? Both the frequent Applid ID locking and the ic3 failed startup?
The text was updated successfully, but these errors were encountered: