0

I am having issues after I changed the subdomain of my app, it was working the day before but now it doesn't it shows me the message

OneSignal: Could not load iFrame with URL https://acacito.onesignal.com/webPushIframe. Please check that your 'subdomainName' matches that on your OneSignal Chrome platform settings.

<script>
  var OneSignal = window.OneSignal || [];

  var OneSignal = window.OneSignal || [];
  OneSignal.push(["init", {
    appId: "MyAppID", // copied correctly the UUID
    autoRegister: false, /* Set to true to automatically prompt visitors */
    subdomainName: 'acacito',
    httpPermissionRequest: {
      enable: true
    },
    notifyButton: {
        enable: true /* Set to false to hide */
    }
  }]);
</script>

I have been trying to make it work deleting cookies or any data related that could be stored in the browser and it doesn't work. Also reloading with Ctr+Shift+r, not sure what happens.

Pang
  • 9,564
  • 146
  • 81
  • 122
Boris Barroso
  • 1,802
  • 2
  • 22
  • 41

1 Answers1

0

At the time of this writing, this error can occur if:

  • The Site URL in your onesignal.com dashboard settings does not begin with the same URL you're using to access your site.

    For example, if your dashboard platform setting's Site URL is http://my-site.com, you have to access your site beginning with the URL http://my-site.com. You can access http://my-site.com/page1, and you can access http://my-site.com/folder/page2, but you have to begin with http://my-site.com. Technically, the Site URL is the origin your OneSignal configuration is allowed to run under, and OneSignal doesn't allow any other site origin from initializing OneSignal with the same subdomain.

    For more complicated cases:

    • If you're developing locally on http://localhost:8181, your Site URL should also be http://localhost:8181 (with the port number).
    • If you have an alias defined in your hosts file, you still have to use the origin specified in your Site URL. The OneSignal web SDK looks at what's on the address bar and compares it to what's in the Site URL textbox.
  • The value for subdomainName (in this case acacito) does not match the value you chose in your onesignal.com dashboard settings for Chrome web push.

    Just be sure to use the same value.

Jason
  • 6,878
  • 5
  • 41
  • 55