{"action":"created","issue":{"url":"https://api.github.com/repos/argon/node-apn/issues/250","labels_url":"https://api.github.com/repos/argon/node-apn/issues/250/labels{/name}","comments_url":"https://api.github.com/repos/argon/node-apn/issues/250/comments","events_url":"https://api.github.com/repos/argon/node-apn/issues/250/events","html_url":"https://github.com/argon/node-apn/issues/250","id":61180124,"number":250,"title":"socket hangup when using default settings","user":{"login":"elirankon","id":3116749,"avatar_url":"https://avatars.githubusercontent.com/u/3116749?v=3","gravatar_id":"","url":"https://api.github.com/users/elirankon","html_url":"https://github.com/elirankon","followers_url":"https://api.github.com/users/elirankon/followers","following_url":"https://api.github.com/users/elirankon/following{/other_user}","gists_url":"https://api.github.com/users/elirankon/gists{/gist_id}","starred_url":"https://api.github.com/users/elirankon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elirankon/subscriptions","organizations_url":"https://api.github.com/users/elirankon/orgs","repos_url":"https://api.github.com/users/elirankon/repos","events_url":"https://api.github.com/users/elirankon/events{/privacy}","received_events_url":"https://api.github.com/users/elirankon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/argon/node-apn/labels/gateway","name":"gateway","color":"bfe5bf"},{"url":"https://api.github.com/repos/argon/node-apn/labels/socket","name":"socket","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-13T18:43:01Z","updated_at":"2015-03-14T16:01:50Z","closed_at":null,"body":"Hi,\r\n\r\nI'm getting a socket hangup when using the default settings (cert.pem, key.pem, dev_env = dev).\r\n\r\nthis is my code:\r\n```js\r\nvar apnConnection = new apn.Connection({\r\n    passphrase: '1',\r\n    production: false\r\n});\r\n\r\nexports.sendApn = function(apnMessage) {\r\n    dbOperations.getAPNClients(function(apnClients) {\r\n        var gameId = apnMessage.data.gameId || apnMessage.data.bidEntity.gameId;\r\n        if (apnClients == null || !apnClients[gameId]) {\r\n            console.log(\"no apn clients on channel\");\r\n            return;\r\n        }\r\n\r\n        async.each(apnClients[gameId], function(apnClient, callback) {\r\n            var device = new apn.Device(apnClient);\r\n\r\n            var note = new apn.Notification();\r\n\r\n            note.expiry = Math.floor(Date.now() / 1000) + 2; // Expires 5 seconds from now.\r\n            note.alert = \"New bets are available\";\r\n            note.payload = {\r\n                data: apnMessage.data\r\n            };\r\n\r\n            apnConnection.pushNotification(note, device);\r\n            callback();\r\n        });\r\n    });\r\n};\r\n```\r\n\r\nI get the following error:\r\n```sh\r\n{ [Error: socket hang up] code: 'ECONNRESET', sslError: undefined } \r\n```\r\n\r\nAny ideas? I followed the guide step by step."},"comment":{"url":"https://api.github.com/repos/argon/node-apn/issues/comments/80551918","html_url":"https://github.com/argon/node-apn/issues/250#issuecomment-80551918","issue_url":"https://api.github.com/repos/argon/node-apn/issues/250","id":80551918,"user":{"login":"argon","id":107645,"avatar_url":"https://avatars.githubusercontent.com/u/107645?v=3","gravatar_id":"","url":"https://api.github.com/users/argon","html_url":"https://github.com/argon","followers_url":"https://api.github.com/users/argon/followers","following_url":"https://api.github.com/users/argon/following{/other_user}","gists_url":"https://api.github.com/users/argon/gists{/gist_id}","starred_url":"https://api.github.com/users/argon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/argon/subscriptions","organizations_url":"https://api.github.com/users/argon/orgs","repos_url":"https://api.github.com/users/argon/repos","events_url":"https://api.github.com/users/argon/events{/privacy}","received_events_url":"https://api.github.com/users/argon/received_events","type":"User","site_admin":false},"created_at":"2015-03-14T16:01:50Z","updated_at":"2015-03-14T16:01:50Z","body":"It looks like you need to generate a new certificate. Apple have revoked it for some reason.\n\n\\A\n\n> On 14 Mar 2015, at 15:59, Eliran Kononowicz <notifications@github.com> wrote:\n> \n> I'm getting\n> \n>  [Error: 139827194697600:error:14094414:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate revoked:../deps/openssl/openssl/ssl/s3_pkt.c:1293:SSL alert number 44 \n> \\\n> Reply to this email directly or view it on GitHub.\n> \n"}}