catch security exception thrown on getting apns with some devices