Saturday, November 8, 2025
1 change · 19.0
Resolved issues and error corrections
This update prevents an internal error that could appear when a browser’s service worker for Odoo was manually removed and push notifications were re-enabled. It makes the notification setup more reliable, so users are less likely to see a failed push notification message after refreshing the page.
Original PR description
When you manually unregister the ServiceWorker linked to your Odoo,
you may receive a notification "Failed to enable push notifications".
This occurs because the ServiceWorker associated with the previous
subscription is gone and the browser has lost the link between the
subscription and the Odoo instance.
To handle this case, we ensure waiting the activated state of the
registration of the service worker before subscribing to the web push
notification.
Steps to reproduce:
- In Odoo, enable push notifications.
- Inside another tab, go to the internal Chrome URL:
chrome://serviceworker-internals/?devtools
- Unsubscribe the ServiceWorker linked to your Odoo instance.
- In the Odoo instance tab, press F5.
=> You will see an internal notification stating
"Failed to enable push notifications" => BUG.
Forward-Port-Of: odoo/odoo#235039
Forward-Port-Of: odoo/odoo#234930