Sometimes when you work with onesignal push notifications you may have an error : 

there is an error :
ConfigHelper.js:52 Uncaught (in promise) f: OneSignal: This web push config can only be used on https://your-site.com. Your current origin is https://www.your-site.com.

Change the web configuration page URL to :
https://www.your-site.com

And add below code to your .htaccess file :

RewriteEngine On
RewriteCond %{HTTP_HOST} ^your-site.com
RewriteRule (.*) https://www.your-site.com/$1 [R=301,L]

After changes, go to plugin again and click to save the plugin.