With the latest upgrade I’ve had my HTML5 notifications stop working.
Nothing with my configs was changed, except for upgrading hass.io to the latest builds, but nevertheless, I checked the setup for the HTML5 notifications and everything is the same.
The logs do show errors whenever a notification for HTML5 is triggered:
Logger: homeassistant.helpers.script.websocket_api_script
Source: components/html5/notify.py:573
First occurred: 3:06:17 PM (1 occurrences)
Last logged: 3:06:17 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.
Logger: homeassistant.components.websocket_api.http.connection
Source: components/html5/notify.py:573
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 3:06:17 PM (1 occurrences)
Last logged: 3:06:17 PM
[140223063684000] Error handling message: Unknown error
I also turned off notifications for the web browser/webapp and turned it back on to re-register notifications on my mobile with HA, but still the error.
A temporary fix is to change the email address in your html5 config to another address without hyphens, this is working for me now with my personal gmail.
Yes I changed the vapid_email to my gmail address and it worked.
There was a PR waiting to fix the upstream issue that was causing this which has now been merged so that would likely be why the firebase email is working again.
Strange though, I just tried to change mine back to the firebase email and getting the same error still.
Actually, you use the Notification API to check for existing permissions exactly as you described. What makes Chrome for Android unique is that the Notification API currently doesn’t work to create the actual notification. But it does work to check for permissions and for requesting permission. Once you have permission, you then use the ServiceWorker API to actually cause a notification to be shown.