Failed to register primary service worker

Hi, I get this error:
A bad HTTP response code (403) was received when fetching the script.
app.min.js:2 Failed to register primary service worker, trying to register with alternative service worker
Is there a way to fix it?

Hi,

Your Server or some of your security plugin is blocking the access to the service worker file at https://www.dancelifemap.com/wp-content/plugins/webpushr-web-push-notifications/sdk_files/webpushr-sw.js.php and returns with 403 Forbidden. So the plugin is registering the Service Worker from alternate (root) location. If you want to fix this, you need to whitelist this URL https://www.dancelifemap.com/wp-content/plugins/webpushr-web-push-notifications/sdk_files/webpushr-sw.js.php so that the link is accessible and plugin can register service worker from the default location.

Thank you, that makes sense. However my server is on Cloudways and as they explained, in order to give access to that file, I need to enable access to all PHP files and they do not recommend it for security reasons. Is this normal? What would you recommend?

No problem. The plugin is working normal as it is registering Service Worker from the alternate location.