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

Constant reconfiguration/re-auth with 3.1 #352

Closed bkr1969 closed 2 weeks ago

bkr1969 commented 2 weeks ago

I reported this yesterday, but it seems to have disappeared. Why am I constantly being asked to reconfigure? I had 27 instances within the first hour of updating. Doesn't allow for accurate tracking. I have downgraded for now but the previous version doesn't seem to be working at all:

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 07:20:56 (1 occurrences)
Last logged: 07:20:56

Error setting up entry iCloud3 for device_tracker
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/config_entry.py", line 55, in async_setup_entry
    return await component.async_setup_entry(entry)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 183, in async_setup_entry
    raise ValueError(
ValueError: Config entry iCloud3 (01J3ES4C7C254BXHFQ2RVXWEW2) for icloud3.device_tracker has already been setup!

I am NOT being tracked at this point with the previous version.

Removed the add-on completely and re-installed 3.1. Still getting errors:

This error originated from a custom integration.

Logger: custom_components.icloud3
Source: custom_components/icloud3/helpers/messaging.py:465
integration: iCloud3 v3: iDevice Tracker (documentation, issues)
First occurred: 07:30:10 (4 occurrences)
Last logged: 07:30:25

Apple Acct > BrianRedmond, Authentication Needed

4 errors in 4 minutes?

gcobb321 commented 2 weeks ago

Sorry for the delay but I am 1 guy with a lot going on.

Apple determines if a validation code is needed in one of the response fields it sends back to iCloud3. You can find this in your 'icloud3-0.log' file.

🔺 geekstergary, POST, REQUEST,  _AUTHENTICATE_WITH_TOKEN/847
❗   items={'url': 'setup.…………/setup/ws/1/accountLogin', 'retry': 0, 'json': None}
❗   params={'dsid': '1325993913'}
❗   data.items={'accountCountryCode': 'US', 'dsWebAuthToken': 'M/sa+5……iULQ==', 'extended_login': True, 'trustToken': 'HSARMT……8DSRVX'}
11-04 23:15:37 ICLOUD
🔻 geekstergary, POST, RESPONSE, _AUTHENTICATE_WITH_TOKEN/847 
❗   items={'code': 200, 'ok': True}
❗   data.items={'hsaTrustedBrowser': False, 'hsaChallengeRequired': True}

hsaTrustedBrowser': False, 'hsaChallengeRequired': True --> a verification code is needed hsaTrustedBrowser': True, 'hsaChallengeRequired': False --> a verification code is not needed

iCloud3 uses this to display the message. Apple determines if it is needed, not iCloud3. In my experience, Apple will reset this to not needed after a valid code is entered through iCloud3. An code more than 15-minutes or so has expired and the only way to get a new one is to Request it on the Enter/Request verification code screen. Sometimes the code is displayed immediately, other times it takes a while. Apple determines when to send one. Sometimes, restarting iCloud3 or requesting a location update in Event Log > Actions will refresh the data and prompt Apple to send a code after 10-minutes or so.

gcobb321 commented 2 weeks ago

Closing this after the v3.1.1 release. Reopen it if you experience further problems.