Home Assistant release with the issue:
0.91.1
Last working Home Assistant release (if known):
0.90.2
Operating environment (Hass.io/Docker/Windows/etc.):
System param | value
-- | --
arch | x86_64
dev | false
docker | true
hassio | false
os_name | Linux
python_version | 3.7.3
timezone | Europe/Paris
version | 0.91.1
virtualenv | false
Component/platform:
https://www.home-assistant.io/components/html5/
Description of problem:
Home Assistant is not able to send push notifications anymore.
I added this component two weeks ago with an updated version of HA (0.90.x) and vapid from the begginnning, no migration.
I updated HA this week-end.
PS: after describing all the issue, I figure out that I got no internet service on 4th of april from 9AM to 4PM, and maybe it has something to deal with, because I had to declare again that I am the owner of the server at the Google Web Console. So maybe it has nothing to do with the new version of HA and the issue also consern 0.90.x.
configuration.yaml
# Notifications
notify:
- platform: html5
name: html5
vapid_pub_key: !secret firebase_pubk
vapid_prv_key: !secret firebase_prvk
vapid_email: !secret firebase_mail
Log overview

At the top I launch two automations using the component, and at the bottom, two times the component itself with data {"title": "TEST","message":"TEST"} in the dev-service panel.
Once it sends 404 error, then 410, alternatively (almost).
Traceback (if applicable):
#######
# 404 #
#######
Push failed: <Response [404]>:
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>404.</b> <ins>That鈥檚 an error.</ins>
<p> <ins>That鈥檚 all we know.</ins>
Traceback (most recent call last):
File "/usr/src/app/homeassistant/components/websocket_api/commands.py", line 122, in handle_call_service
connection.context(msg))
File "/usr/src/app/homeassistant/core.py", line 1138, in async_call
self._execute_service(handler, service_call))
File "/usr/src/app/homeassistant/core.py", line 1160, in _execute_service
await handler.func(service_call)
File "/usr/src/app/homeassistant/components/notify/__init__.py", line 117, in async_notify_message
await notify_service.async_send_message(**kwargs)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/components/html5/notify.py", line 467, in send_message
self._push_message(payload, **kwargs)
File "/usr/src/app/homeassistant/components/html5/notify.py", line 504, in _push_message
vapid_claims=self._vapid_claims
File "/usr/local/lib/python3.7/site-packages/pywebpush/__init__.py", line 384, in webpush
result, result.text))
pywebpush.WebPushException: Push failed: <Response [404]>:
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>404.</b> <ins>That鈥檚 an error.</ins>
<p> <ins>That鈥檚 all we know.</ins>
#######
# 410 #
#######
Push failed: <Response [410]>: <HTML>
<HEAD>
<TITLE>NotRegistered</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>NotRegistered</H1>
<H2>Error 410</H2>
</BODY>
</HTML>
Traceback (most recent call last):
File "/usr/src/app/homeassistant/components/websocket_api/commands.py", line 122, in handle_call_service
connection.context(msg))
File "/usr/src/app/homeassistant/core.py", line 1138, in async_call
self._execute_service(handler, service_call))
File "/usr/src/app/homeassistant/core.py", line 1160, in _execute_service
await handler.func(service_call)
File "/usr/src/app/homeassistant/components/notify/__init__.py", line 117, in async_notify_message
await notify_service.async_send_message(**kwargs)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/components/html5/notify.py", line 467, in send_message
self._push_message(payload, **kwargs)
File "/usr/src/app/homeassistant/components/html5/notify.py", line 504, in _push_message
vapid_claims=self._vapid_claims
File "/usr/local/lib/python3.7/site-packages/pywebpush/__init__.py", line 384, in webpush
result, result.text))
pywebpush.WebPushException: Push failed: <Response [410]>: <HTML>
<HEAD>
<TITLE>NotRegistered</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>NotRegistered</H1>
<H2>Error 410</H2>
</BODY>
</HTML>
####################
# Automation error #
####################
Error while executing automation automation.notify_certificate_expiry. Unknown error for call_service at pos 1:
Traceback (most recent call last):
File "/usr/src/app/homeassistant/components/automation/__init__.py", line 380, in action
await script_obj.async_run(variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 131, in async_run
await self._handle_action(action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 210, in _handle_action
action, variables, context)
File "/usr/src/app/homeassistant/helpers/script.py", line 299, in _async_call_service
context=context
File "/usr/src/app/homeassistant/helpers/service.py", line 88, in async_call_from_config
domain, service_name, service_data, blocking=blocking, context=context)
File "/usr/src/app/homeassistant/core.py", line 1138, in async_call
self._execute_service(handler, service_call))
File "/usr/src/app/homeassistant/core.py", line 1160, in _execute_service
await handler.func(service_call)
File "/usr/src/app/homeassistant/components/notify/__init__.py", line 117, in async_notify_message
await notify_service.async_send_message(**kwargs)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/components/html5/notify.py", line 467, in send_message
self._push_message(payload, **kwargs)
File "/usr/src/app/homeassistant/components/html5/notify.py", line 504, in _push_message
vapid_claims=self._vapid_claims
File "/usr/local/lib/python3.7/site-packages/pywebpush/__init__.py", line 384, in webpush
result, result.text))
pywebpush.WebPushException: Push failed: <Response [404]>:
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>404.</b> <ins>That鈥檚 an error.</ins>
<p> <ins>That鈥檚 all we know.</ins>
Additional information:
I've tried:
Nothing change
Maybe linked with #22577 but not sure
Same problem here.
Try to delete html5_push_registrations.conf and re-enable in browser too.
Back to old GCM keys and everything works fine.
Any ideas?
Hey there @robbiet480, mind taking a look at this issue as its been labeled with a integration (html5) you are listed as a codeowner for? Thanks!
Okey @choncba I've just did this, except that I kept my keys, and it worked.
Thanks !
But why the problem is happenning is the first place ?
I tried to delete html5_push_registrations.conf but I'm still getting the error:
Push failed: <Response [404]>:
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>404.</b> <ins>That鈥檚 an error.</ins>
<p> <ins>That鈥檚 all we know.</ins>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/websocket_api/commands.py", line 122, in handle_call_service
connection.context(msg))
File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1138, in async_call
self._execute_service(handler, service_call))
File "/usr/local/lib/python3.7/site-packages/homeassistant/core.py", line 1160, in _execute_service
await handler.func(service_call)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/notify/__init__.py", line 117, in async_notify_message
await notify_service.async_send_message(**kwargs)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/html5/notify.py", line 467, in send_message
self._push_message(payload, **kwargs)
File "/usr/local/lib/python3.7/site-packages/homeassistant/components/html5/notify.py", line 504, in _push_message
vapid_claims=self._vapid_claims
File "/usr/local/lib/python3.7/site-packages/pywebpush/__init__.py", line 384, in webpush
result, result.text))
pywebpush.WebPushException: Push failed: <Response [404]>:
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 404 (Not Found)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/logos/errorpage/error_logo-150x54-2x.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
</style>
<a href=//www.google.com/><span id=logo aria-label=Google></span></a>
<p><b>404.</b> <ins>That鈥檚 an error.</ins>
<p> <ins>That鈥檚 all we know.</ins>
It worked fine until yesterday, I don't know what happened meanwhile. I'm also using VAPID after I migrated from GCM.
I'm also experiencing pywebpush.WebPushException: Push failed: <Response [404]>:. First noticed it yesterday when i upgraded to 0.91.3. Never used GCM, set it up a couple of weeks ago with VAPID-keys.
I'm not sure what helped but I deleted html5_push_registrations.conf then I have temporarily switched back to GCM but when I tried to send a notification it didn't work (probably because GCM sopped working from 11th April) then I switched again back to VAPID and now it works. Again, I don't know what helped, before this I tried multiple times to delete html5_push_registrations.conf and re-register the browser for push notifications with no avail.
I started to get 410 errors again this morning, had to delete html5_push_registrations.conf and re-register again to make it work.
The same here after HA being offline for some time. Reboot helped.
EDIT: Helped for a while... it's still happening without HA being offline. Although in my case it's pywebpush.WebPushException: WebPushException: Push failed: 403 Forbidden
Closing as this appears fixed by 0.93 (see #23613 for more info).
Most helpful comment
I started to get 410 errors again this morning, had to delete html5_push_registrations.conf and re-register again to make it work.