nomad-cli / houston

Apple Push Notifications; No Dirigible Required
http://nomad-cli.com
MIT License
2.93k stars 229 forks source link

Silent failure due to environment/certificate incompatibility #93

Closed iandonovan closed 3 years ago

iandonovan commented 9 years ago

I've fixed this issue, but I reckon it might be good to leave a note of it here:

I was getting silent failures when sending push notifications -- the notification object, after calling push(), had no errors on it, but nothing was being sent out. After a bit of digging, I noticed that it was because I had the client set as Houston::Client.production (to match the Rails environment), where the certificate file was not for a production environment. Switching over to Houston::Client.development fixed the problem.

I know this isn't Houston's issue, per se, but I did notice that folks were having problems with silent failures. This might be a lead for some of you. I don't even know if it's possible for Houston to look at the certificate and determine its proper environment, then alert me of a mismatch, but I hope this helps people in the interim.

courtsimas commented 8 years ago

Could be worth submitting a PR to the Readme - maybe in a reminder section at the bottom, so people read it there, and once it's merged in, close the issue so it doesn't look like there's an open issue for this.

:+1: good find.

dkniffin commented 8 years ago

I just ran into this problem as well. It turns out it's not related to the environment the cert is created for; it's the iOS provisioning profile.

adeeb1 commented 8 years ago

I run into this problem more than I should. Since I have a few provisioning profiles for any given app, I always forget to specify the correct iOS provisioning profile. Make sure that the provisioning profile you use to sign your app has Push Notifications enabled in the "Capabilities" tab of your Target in Xcode.

bbrookler commented 8 years ago

I had an issue sending via command line, adding '-e production' fixed it for me.