watkins-matt / home-assistant-google-keep-sync

Custom component for Home Assistant that enables bidirectional synchronization with Google Keep lists.
MIT License
46 stars 4 forks source link

List becoming unavailable #32

Closed DCooper-nz closed 4 days ago

DCooper-nz commented 1 month ago

My list synced from google keep becomes 'unavailable' for 15 mins every hour, otherwise its working fine. When its unavailable I can't change anything which is annoying. Not sure what to do to fix it.

Cheers Dave

watkins-matt commented 1 month ago

Hi,

Do you have any related log messages from Home Assistant from when you see this happening? And are you using any automations with the integration or using the service? Also, does it happen consistently at the same times or is it random?

It's hard to say without more information, but my best guess there may be some kind of synchronization issue occurring since the synchronization interval is also 15 minutes.

barrycarrjr commented 4 weeks ago

I am experiencing a similar issue relating to the list not being available.

These are the only references I see in the log for "google keep"

2024-08-11 20:23:38.202 DEBUG (MainThread) [custom_components.google_keep_sync.coordinator] Finished fetching google_keep_sync data in 0.136 seconds (success: True)

2024-08-11 20:38:25.720 DEBUG (MainThread) [custom_components.google_keep_sync.coordinator] Finished fetching google_keep_sync data in 0.140 seconds (success: True)

watkins-matt commented 4 weeks ago

Can you give me any more information on how you have the integration set up? I haven't been able to replicate this issue so I'm not sure if it's something specific to the setup the two of you have. Ideally, I need to find a way to reproduce this issue on my end to be able to fix it.

Some questions that might help me narrow it down:

  1. Are you using the latest version of Home Assistant and the integration?
  2. What configuration options are you using?
  3. How many lists are you synchronizing?
  4. Are you using the service or any automations that interact with the lists or integration?
  5. Do you have multiple entries of the integration configured (like for two accounts)?
  6. Are you seeing the same behavior where the list becomes unavailable for 15 minutes and comes back afterward?
barrycarrjr commented 3 weeks ago
  1. Are you using the latest version of Home Assistant and the integration?

Integration Version 0.9.8.1

Core 2024.8.1

Supervisor 2024.08.0

Operating System 12.4

Frontend 20240809.0

  1. What configuration options are you using?

image

  1. How many lists are you synchronizing?

6, but note they do not display on the configuration option page

  1. Are you using the service or any automations that interact with the lists or integration?

No

  1. Do you have multiple entries of the integration configured (like for two accounts)?

No

  1. Are you seeing the same behavior where the list becomes unavailable for 15 minutes and comes back afterward?

No. I never see any list appear for me to select.

DCooper-nz commented 3 weeks ago

I have this error in the log:

Logger: custom_components.google_keep_sync.coordinator Source: helpers/update_coordinator.py:344 integration: Google Keep Sync (documentation) First occurred: August 4, 2024 at 7:16:46 PM (181 occurrences) Last logged: 9:24:19 AM

Error fetching google_keep_sync data: Error communicating with API: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

barrycarrjr commented 3 weeks ago
  1. Are you using the latest version of Home Assistant and the integration?

Integration Version 0.9.8.1

Core 2024.8.1

Supervisor 2024.08.0

Operating System 12.4

Frontend 20240809.0

  1. What configuration options are you using?

image

  1. How many lists are you synchronizing?

6, but note they do not display on the configuration option page

  1. Are you using the service or any automations that interact with the lists or integration?

No

  1. Do you have multiple entries of the integration configured (like for two accounts)?

No

  1. Are you seeing the same behavior where the list becomes unavailable for 15 minutes and comes back afterward?

No. I never see any list appear for me to select.

Also I just turned on debugging and attempted to set it back up again and the same results. No list and no errors in log.

It SEEMS like its working but i feel like when it attempts to get the lists something isnt parsing properly.

watkins-matt commented 3 weeks ago

Can you try the following to see if it makes a difference:

  1. Delete the integration from the integration page.
  2. Restart both Home Assistant and your router.
  3. Get a new token (don't use an app password or saved token) using the docker method from the Readme.
  4. Reconfigure the integration using the new token. Choose only a single list to synchronize.
watkins-matt commented 3 weeks ago

@barrycarrjr The issue you are seeing might be different since you aren't seeing any errors in the logs. It's very strange that you would be receiving no data without any errors.

All the parsing is handled by the underlying library gkeepapi. It should throw an error that would be visible in logs if it was the source of the issue.

My best guess right now is that this may be either an authentication issue, a networking issue specific to your network (like calls being limited or blocked by a firewall) or calls are being potentially rate-limited by Google.

watkins-matt commented 3 weeks ago

If possible enable beta versions in HACS and update to the new beta 0.9.9b. Then post the debug log here. It includes additional debug logging messages that may help solve the issue.

barrycarrjr commented 3 weeks ago

If possible enable beta versions in HACS and update to the new beta 0.9.9b. Then post the debug log here. It includes additional debug logging messages that may help solve the issue.

@watkins-matt

  1. I deleted v0.9.8.1
  2. restarted HA
  3. downloaded v0.9.9b
  4. restarted HA

Should the version number match? It's still showing v0.9.8.1 for me.

image image image

watkins-matt commented 3 weeks ago

I didn't increment the version this time so it will still show the old version number. It looks like you did it correctly.

There should be noticeably more information in the log if you click the Enable Debug Logging button.

barrycarrjr commented 3 weeks ago

I didn't increment the version this time so it will still show the old version number. It looks like you did it correctly.

There should be noticeably more information in the log if you click the Enable Debug Logging button.

  1. i added my credentials and token (also tried using app password)
  2. i enabled debugging home-assistant_google_keep_sync_2024-08-19T00-32-32.249Z.log
  3. i created a new test list and enabled checkboxes

It's very strange. It's not getting any lists at all. I have 8 total and 2 do not have checkboxes enabled

image image

watkins-matt commented 3 weeks ago

Yes, very strange, based on the log, it says "Fetched 0 lists from Google Keep" so everything is succeeding, it just thinks there are no lists in the account.

Are you using a secondary account like in the security suggestions portion of the Readme? Because this could happen if the secondary account is not added as a collaborator for any lists you want to synchronize.

And none of the lists are archived or in the trash correct?

Also Google Keep considers any note without checkboxes to be a note and not a list, so those are not synchronizable unless checkboxes are added. Although this should not affect the other lists with checkboxes.

watkins-matt commented 4 days ago

Closing this due to inactivity. If we are able to come up with a reproducible example of this happening I would be happy to reopen the issue.