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

Nabucasa throwing error after upgrade to 0.110.1 #35964

Closed
estebanz01 opened this issue May 22, 2020 · 7 comments · Fixed by #36836
Closed

Nabucasa throwing error after upgrade to 0.110.1 #35964

estebanz01 opened this issue May 22, 2020 · 7 comments · Fixed by #36836

Comments

@estebanz01
Copy link

The problem

After upgrading to 0.110.1, I'm seeing this error multiple times on HA core:

May 22 05:00:28 raspberrypi hass[248]: 2020-05-22 05:00:28 ERROR (MainThread) [hass_nabucasa.iot] Error handling message
May 22 05:00:28 raspberrypi hass[248]: Traceback (most recent call last):
May 22 05:00:28 raspberrypi hass[248]:   File "/srv/homeassistant/lib/python3.7/site-packages/hass_nabucasa/iot.py", line 94, in _async_handle_handler_message
May 22 05:00:28 raspberrypi hass[248]:     result = await handler(self.cloud, message["payload"])
May 22 05:00:28 raspberrypi hass[248]:   File "/srv/homeassistant/lib/python3.7/site-packages/hass_nabucasa/iot.py", line 154, in async_handle_webhook
May 22 05:00:28 raspberrypi hass[248]:     return await cloud.client.async_webhook_message(payload)
May 22 05:00:28 raspberrypi hass[248]:   File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/cloud/client.py", line 188, in async_webhook_message
May 22 05:00:28 raspberrypi hass[248]:     found["webhook_id"], request
May 22 05:00:28 raspberrypi hass[248]:   File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/webhook/__init__.py", line 79, in async_handle_webhook
May 22 05:00:28 raspberrypi hass[248]:     peer_ip = request[KEY_REAL_IP]
May 22 05:00:28 raspberrypi hass[248]: TypeError: 'MockRequest' object is not subscriptable

Environment

  • Home Assistant Core release with the issue: 0.110.1
  • Last working Home Assistant Core release (if known): 0.109.6
  • Operating environment (Home Assistant/Supervised/Docker/venv): venv core raspberry pi
  • Integration causing this issue: hass-nabucasa.iot
  • Link to integration documentation on our website:

Problem-relevant configuration.yaml

Traceback/Error logs

May 22 05:00:28 raspberrypi hass[248]: 2020-05-22 05:00:28 ERROR (MainThread) [hass_nabucasa.iot] Error handling message
May 22 05:00:28 raspberrypi hass[248]: Traceback (most recent call last):
May 22 05:00:28 raspberrypi hass[248]:   File "/srv/homeassistant/lib/python3.7/site-packages/hass_nabucasa/iot.py", line 94, in _async_handle_handler_message
May 22 05:00:28 raspberrypi hass[248]:     result = await handler(self.cloud, message["payload"])
May 22 05:00:28 raspberrypi hass[248]:   File "/srv/homeassistant/lib/python3.7/site-packages/hass_nabucasa/iot.py", line 154, in async_handle_webhook
May 22 05:00:28 raspberrypi hass[248]:     return await cloud.client.async_webhook_message(payload)
May 22 05:00:28 raspberrypi hass[248]:   File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/cloud/client.py", line 188, in async_webhook_message
May 22 05:00:28 raspberrypi hass[248]:     found["webhook_id"], request
May 22 05:00:28 raspberrypi hass[248]:   File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/webhook/__init__.py", line 79, in async_handle_webhook
May 22 05:00:28 raspberrypi hass[248]:     peer_ip = request[KEY_REAL_IP]
May 22 05:00:28 raspberrypi hass[248]: TypeError: 'MockRequest' object is not subscriptable

Additional information

Maybe it's caused by #35865 ?

@silviudc
Copy link

I am also experiencing the same when going from 0.109.6 to 0.110.1

2020-05-24 09:20:46 ERROR (MainThread) [hass_nabucasa.iot] Error handling message Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/hass_nabucasa/iot.py", line 94, in _async_handle_handler_message result = await handler(self.cloud, message["payload"]) File "/usr/local/lib/python3.7/site-packages/hass_nabucasa/iot.py", line 154, in async_handle_webhook return await cloud.client.async_webhook_message(payload) File "/usr/src/homeassistant/homeassistant/components/cloud/client.py", line 188, in async_webhook_message found["webhook_id"], request File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 79, in async_handle_webhook peer_ip = request[KEY_REAL_IP] TypeError: 'MockRequest' object is not subscriptable

@silviudc
Copy link

Still happening on 0.110.3

@ratsputin
Copy link

Just happened on 0.110.5

Possibly related to the following error during the upgrade:

ERROR: hass-nabucasa 0.34.2 has requirement pytz~=2019.3, but you'll have pytz 2020.1 which is incompatible.

@silviudc
Copy link

silviudc commented Jun 7, 2020

Still not fixed with 0.110.5:
2020-06-07 09:37:01 ERROR (MainThread) [hass_nabucasa.iot] Error handling message Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/hass_nabucasa/iot.py", line 94, in _async_handle_handler_message result = await handler(self.cloud, message["payload"]) File "/usr/local/lib/python3.7/site-packages/hass_nabucasa/iot.py", line 154, in async_handle_webhook return await cloud.client.async_webhook_message(payload) File "/usr/src/homeassistant/homeassistant/components/cloud/client.py", line 188, in async_webhook_message found["webhook_id"], request File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 79, in async_handle_webhook peer_ip = request[KEY_REAL_IP] TypeError: 'MockRequest' object is not subscriptable 2020-06-07 09:37:01 ERROR (MainThread) [hass_nabucasa.iot] Error handling message Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/hass_nabucasa/iot.py", line 94, in _async_handle_handler_message result = await handler(self.cloud, message["payload"]) File "/usr/local/lib/python3.7/site-packages/hass_nabucasa/iot.py", line 154, in async_handle_webhook return await cloud.client.async_webhook_message(payload) File "/usr/src/homeassistant/homeassistant/components/cloud/client.py", line 188, in async_webhook_message found["webhook_id"], request File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 79, in async_handle_webhook peer_ip = request[KEY_REAL_IP] TypeError: 'MockRequest' object is not subscriptable

@holdestmade
Copy link

holdestmade commented Jun 15, 2020

Same error here, every 5 minutes or so, 0.111.2

@holdestmade
Copy link

holdestmade commented Jun 15, 2020

ERROR (MainThread) [hass_nabucasa.iot] Error handling message: TypeError: 'MockRequest' object is not subscriptable #36732

@balloob
Copy link
Member

balloob commented Jun 15, 2020

This issue is caused by your system receiving a webhook via the cloud that is no longer registered internally, but is still receiving data. Will include a fix in 0.111.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants