Skip to content
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

Blink Integration Stopped Working after Core update #103312

Closed
airwolf79 opened this issue Nov 3, 2023 · 18 comments · Fixed by #103438
Closed

Blink Integration Stopped Working after Core update #103312

airwolf79 opened this issue Nov 3, 2023 · 18 comments · Fixed by #103438

Comments

@airwolf79
Copy link

The problem

Since this weeks new core update, the Blink integration has stopped working.

This is my log:

2023-11-03 14:43:31.606 ERROR (MainThread) [homeassistant.components.blink.coordinator] Unexpected error fetching blink data: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/blink/coordinator.py", line 33, in _async_update_data
return await self.api.refresh(force=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/blinkpy/blinkpy.py", line 98, in refresh
await sync_module.refresh(force_cache=(force or force_cache))
File "/usr/local/lib/python3.11/site-packages/blinkpy/sync_module.py", line 271, in refresh
await self.cameras[camera_name].update(camera_info, force_cache=force_cache)
File "/usr/local/lib/python3.11/site-packages/blinkpy/camera.py", line 221, in update
self.extract_config_info(config)
File "/usr/local/lib/python3.11/site-packages/blinkpy/camera.py", line 229, in extract_config_info
self.name = config.get("name", "unknown")
^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

What version of Home Assistant Core has the issue?

core-2023.11.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Blink

Link to integration documentation on our website

https://www.home-assistant.io/integrations/blink/

Diagnostics information

home-assistant_blink_2023-11-03T13-50-09.289Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Nov 3, 2023

Hey there @fronzbot, mind taking a look at this issue as it has been labeled with an integration (blink) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of blink can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign blink Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


blink documentation
blink source
(message by IssueLinks)

@fronzbot
Copy link
Contributor

fronzbot commented Nov 3, 2023

CC @mkmer

@mkmer
Copy link
Contributor

mkmer commented Nov 3, 2023

This looks like it had an error logging in to Blink and retrieving the camera data. It probably should handle this a bit better.
Did you try reloading the integration or restarting HA?

@JShoota
Copy link

JShoota commented Nov 3, 2023

Exact same issue here.

I removed the integration and re-added it. It accepts my username and pw, but did not ask for the 2FA code. I went into the Blink app and removed Home Assistant as a device, removed and added again and this time it prompted for 2FA. Unfortunately, still receiving the error as detailed above.

Happy to help with troubleshooting.

@mkmer
Copy link
Contributor

mkmer commented Nov 3, 2023

Darn, I put the diagnostic stuff in, but it's not merged yet.
I've been running it for months as a custom, and it's been stable. I'll have to try the dev environment and see if it breaks.

Please verify the latest library is loaded, maybe something happened there.

@mercurystorm
Copy link

I have the same issued, reloading the addon does not fix anything

@schlotz69
Copy link

Same issue here since today after installing latest HA update

@francescodoffizi
Copy link

francescodoffizi commented Nov 4, 2023

Same issue here

2023-11-04 09:23:42.729 ERROR (MainThread) [homeassistant.components.blink.coordinator] Unexpected error fetching blink data: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/blink/coordinator.py", line 33, in _async_update_data
return await self.api.refresh(force=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/blinkpy/blinkpy.py", line 98, in refresh
await sync_module.refresh(force_cache=(force or force_cache))
File "/usr/local/lib/python3.11/site-packages/blinkpy/sync_module.py", line 271, in refresh
await self.cameras[camera_name].update(camera_info, force_cache=force_cache)
File "/usr/local/lib/python3.11/site-packages/blinkpy/camera.py", line 221, in update
self.extract_config_info(config)
File "/usr/local/lib/python3.11/site-packages/blinkpy/camera.py", line 229, in extract_config_info
self.name = config.get("name", "unknown")
^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'get'

@mkmer
Copy link
Contributor

mkmer commented Nov 4, 2023

Anyone capable of trying this change out for me? It requires a bit of hacking in the installed library... but it is small
https://github.com/fronzbot/blinkpy/pull/800/files
It's unfortunate that it's not concurring with my configuration at home - I'll need some help to get to the bottom of it.

@mercurystorm
Copy link

If i knew where to find this file to edit.. i would happily try!

@mercurystorm
Copy link

Ok i found it the homeassistant docker container in
/usr/local/lib/python3.11/site-packages/blinkpy/camera.py

and it has resolved the issue!

@chriselsen
Copy link

Same here: Changing the above file resolved the issue for me.

@mkmer
Copy link
Contributor

mkmer commented Nov 5, 2023

Thanks guys! As soon as @fronzbot can release the fix, we will bump the version in HA. Should be an upcoming point release (soon).

@mkmer
Copy link
Contributor

mkmer commented Nov 5, 2023

One more question: Do you guys have sync modules on your account?

@francescodoffizi
Copy link

One more question: Do you guys have sync modules on your account?

No I don't have the sync module

@mkmer mkmer mentioned this issue Nov 5, 2023
20 tasks
@JShoota
Copy link

JShoota commented Nov 5, 2023

Yes, I have the sync module.

@mercurystorm
Copy link

I do not have a sync module

@mkmer
Copy link
Contributor

mkmer commented Nov 5, 2023

Thanks. I was hoping everyone did not have sync modules. I think we have a fix coming soon base on the tests others have done for us.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants