Skip to content

Safari Registration Bug

Jason Pang edited this page Nov 8, 2016 · 14 revisions

Issue

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

Initial Solutions / Workarounds

  • Confusingly, some Safari configurations are completely correct, and when removing the Safari platform and re-creating it with the same settings, a valid deviceToken is subsequently returned and the permission prompt is shown
  • Sometimes all icons need to be set in the package

Debugging Attempts

  1. Following instructions on Troubleshooting Push Notifications:

$ sudo touch /Library/Logs/apsd.log $ sudo defaults write /Library/Preferences/com.apple.apsd APSWriteLogs -bool TRUE $ sudo defaults write /Library/Preferences/com.apple.apsd APSLogLevel -int 7 $ sudo killall apsd ```

Yields no output when directly calling `registerForPushNotifications()` to see the `Permission denied` error.
  1. Mac OS X's Console.app shows no output when directly calling registerForPushNotifications().

Solution

Change Safari icons upload to just one textbox to guarantee correct icon size. Won't fix underlying mysterious problem, but will make our packages technically correct and easier for users to make correct which should reduce occurrence of this issue.

Clone this wiki locally