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

iCloud3 Location Request Error #291

Closed smarthomefamilyverrips closed 7 months ago

smarthomefamilyverrips commented 8 months ago

@gcobb321 After latest update I get few times a day the below error

This error originated from a custom integration.

Logger: custom_components.icloud3 Source: custom_components/icloud3/helpers/messaging.py:414 integration: iCloud3 v3: iDevice Tracker (documentation, issues) First occurred: 08:31:35 (1 occurrences) Last logged: 08:31:35

lory_iphone_new iCloud3 Location Request Error > An error occured refreshing the iCloud Location. iCloud may be down or there is an internet connection issue. iCloud3 will try again later. (cannot access local variable 'response' where it is not associated with a value)

gcobb321 commented 8 months ago

That is a normal error when iCloud3 gets a ‘web address not available 404’ error. It will do a retry in a few minutes.

smarthomefamilyverrips commented 8 months ago

@gcobb321 but why this suddenly started to happen then for last period? I never had this before. Is there something I can do to stop this errors from happening?

gcobb321 commented 8 months ago

Is your HA server connected to the Internet? Check network settings for your HA server. This indicates iCloud3 can not get data from your iCloud account. Maybe restart HA

smarthomefamilyverrips commented 8 months ago

Yes my home assistant blue is connected to internet by cable. Restart I did try several times already

gcobb321 commented 8 months ago

Let’s turn on rawdata Log level - Event Log > Actions > Start RawData Logging and restart HA. That should dump the data between the HA server and iCloud to icloud-0.log. Then, after you get the error, email that file to geekstergary@gmail.com and I’ll look at it to make sure it is not an iCloud3 problem.

Can you get to FindMy on your iPhone? And see all of your devices? Do you have any notification about allowing access to your iCloud account where a verification code needs to be entered? Or any Reauth messages on the Devices and settings screen?

smarthomefamilyverrips commented 8 months ago

Let’s turn on rawdata Log level - Event Log > Actions > Start RawData Logging and restart HA. That should dump the data between the HA server and iCloud to icloud-0.log. Then, after you get the error, email that file to geekstergary@gmail.com and I’ll look at it to make sure it is not an iCloud3 problem.

Can you get to FindMy on your iPhone? And see all of your devices? Do you have any notification about allowing access to your iCloud account where a verification code needs to be entered? Or any Reauth messages on the Devices and settings screen?

Yes I can enter FindMy on Iphone and see all devices, and I not get any re-auth requests

I just happened again (see below error log)

I did email you the raw data logs

This error originated from a custom integration.

Logger: custom_components.icloud3 Source: custom_components/icloud3/helpers/messaging.py:430 integration: iCloud3 v3: iDevice Tracker (documentation, issues) First occurred: 17:31:40 (1 occurrences) Last logged: 17:31:40

lory_iphone_new iCloud3 Location Request Error > An error occured refreshing the iCloud Location. iCloud may be down or there is an internet connection issue. iCloud3 will try again later. (cannot access local variable 'response' where it is not associated with a value)

smarthomefamilyverrips commented 8 months ago

This error originated from a custom integration.

Logger: custom_components.icloud3 Source: custom_components/icloud3/helpers/messaging.py:430 integration: iCloud3 v3: iDevice Tracker (documentation, issues) First occurred: 18:11:40 (1 occurrences) Last logged: 18:11:40

lory_iphone_new iCloud3 Location Request Error > An error occured refreshing the iCloud Location. iCloud may be down or there is an internet connection issue. iCloud3 will try again later. (cannot access local variable 'response' where it is not associated with a value)

@gcobb321 It happened again but i did turn raw data logging already of

gcobb321 commented 8 months ago

I saw the error message you are describing. The original cause is a communication error somewhere trying to contact iCloud servers for the location. This is usually a temporary problem and iCloud3 requests the location again in a few minutes. It did the retry and the location was received. The error is mostly informative and is meant to indicate the communication problem. If everything is OK on your end, there is nothing you can do. It maybe an external network issue or Apple is down (it has happened).

What is going on is iCloud3 requested a location update from iCloud Location Servers and it did not send a response or the response it sent was empty. This caused the first error message (iCloud Loc Servers not available...), which was correct. After the no response, iCloud3 kept going and tried to process the data, which didn't exist. That generated the second error message (Response not defined...) which it should not have done. Then it tries again to see if the Server is not available and it got the same error messages again.

I've made a change to only display the first actual error message and then, not to try to process the non-existing data.

Gary

Unzip the support.zip into the icloud3/support directory. support.zip

smarthomefamilyverrips commented 8 months ago

@gcobb321 I will try the fix tomorrow 👍

gcobb321 commented 8 months ago

You will probably still get the communication error but you shouldn’t get the other one afterwards. And it might be a while before it happens. Naturally, I can not test it so let me know.

smarthomefamilyverrips commented 8 months ago

You will probably still get the communication error but you shouldn’t get the other one afterwards. And it might be a while before it happens. Naturally, I can not test it so let me know.

@gcobb321 I did copy the files into support folder, I will let you know how is going.

smarthomefamilyverrips commented 8 months ago

@gcobb321 so far I not received the error message anymore in my logs. I will give it a few more days and will let you know how did go.

gcobb321 commented 8 months ago

Thanks for letting me know

smarthomefamilyverrips commented 7 months ago

@gcobb321 since the ZIP package and afterwards updating to latest release I not did see the error in my logs anymore 👍

I will close the issue as it seems to be solved, thank you for the help! 🥇