core: HTML5 notifications not working in 2021.4.0b5
The problem
HTML5 notifications have stopped working since upgrading to 2021.4.0b5.
What is version of Home Assistant Core has the issue?
2021.4.0b5
What was the last working version of Home Assistant Core?
2021.4.0b4
What type of installation are you running?
Home Assistant OS
Integration causing the issue
html5
Link to integration documentation on our website
https://www.home-assistant.io/integrations/html5/
Example YAML snippet
action:
- service: notify.html5_1oasis
data:
title: 1 Oasis
message: SYSTEM | Server Reboot
Anything in the logs that might be useful for us?
Logger: homeassistant.helpers.script.websocket_api_script
Source: custom_components/html5/notify.py:576
First occurred: 6:51:01 PM (2 occurrences)
Last logged: 6:51:14 PM
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Missing 'sub' from claims. 'sub' is your admin email as a mailto: link.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 359, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 559, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1515, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/components/notify/__init__.py", line 160, in _async_notify_message_service
await self.async_send_message(**kwargs)
File "/usr/src/homeassistant/homeassistant/components/notify/__init__.py", line 137, in async_send_message
await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/html5/notify.py", line 492, in send_message
self._push_message(payload, **kwargs)
File "/config/custom_components/html5/notify.py", line 525, in _push_message
vapid_headers = create_vapid_headers(
File "/config/custom_components/html5/notify.py", line 576, in create_vapid_headers
return vapid.sign(vapid_claims)
File "/usr/local/lib/python3.8/site-packages/py_vapid/__init__.py", line 320, in sign
sig = sign(self._base_sign(claims), self.private_key)
File "/usr/local/lib/python3.8/site-packages/py_vapid/__init__.py", line 270, in _base_sign
raise VapidException(
py_vapid.VapidException: Missing 'sub' from claims. 'sub' is your admin email as a mailto: link.
Have tried on 2 different systems and the errors are consistent across both.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 8
- Comments: 16 (5 by maintainers)
I just put a personal gmail address in the config on homeassistant. Its working fine for now.
It should just take a new build/release of Home Assistant. pywebpush relies on py-vapid>=1.7.0
https://github.com/web-push-libs/pywebpush/blob/a2dbc6f0f1fce632652ca6ea7654eabb5544cc9a/requirements.txt#L5