Skip to content

Safari Registration Bug

Jason Pang edited this page Apr 11, 2017 · 14 revisions

Issue

For some Safari settings, Safari returns a SafariRemoteNotificationPermission {deviceToken: null, permission: "denied"}.

Things to Check For

Ordered by most likely to least likely:

  1. The Safari Site URL's origin must match the origin in your address bar. Even if your hosts file allows for an alias, you must use the actual origin listed in the Site URL when subscribing. The Site URL is even case-sensitive.

  2. If this client's app was created before late 2016, without a custom icon loaded, our previous icon was bugged with a non-72 DPI.

  3. The safari_web_id parameter must match the Safari Web ID in the app's platform settings. Make sure it isn't being overridden by another value, or that the web.onesignal.auto prefix wasn't missed if they're using our autogenerated certificate.

  4. The icon must be square (width equal to height).

  5. Make sure you're not browsing Safari in a Private window.

  6. Make sure you're not using Safari on iOS. Safari on Windows is not supported. Some users might download Safari 5.1.7 to test out push notifications, but the only Safari that is supported is Safari 7.1+ on the Mac OS X operating system.

  7. The icon's DPI must be 72x72.

This can be checked using ImageMagick, with the command identify -format "%w x %h %x x %y" PATH_TO_FILE.

  1. If a custom certificate is used, it may be invalid. Recreate the Safari platform using an auto-generated certificate.

  2. Finally, the auto-generated certificate may not be working correctly. Recreate the Safari platform using another auto-generated certificate.

  3. A client has gotten this to work just by restarting Safari.