nomad-cli / houston

Apple Push Notifications; No Dirigible Required

Home Page:http://nomad-cli.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server session ticket A: tlsv1 alert unknown ca

fahimbabarpatel opened this issue · comments

Hello All,

I converted .p12 file to .pem file then executed below code

require 'houston'
APN = Houston::Client.production
APN.timeout=10000
APN.certificate = File.read("apple_push_notification_production.pem")
token = "tokenen247027fe250ace7e930d02ef9a49e4e33f526a4a39b5c2abf6f75629"
notification = Houston::Notification.new(device: token)
notification.alert = "Hello, World!"
notification.badge = 57
notification.sound = "sosumi.aiff"
notification.category = "INVITE_CATEGORY"
notification.content_available = true
notification.custom_data = {foo: "bar"}

APN.push(notification)


Getting below error:-


OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server session ticket A: tlsv1 alert unknown ca
from /home/root1/.rvm/gems/ruby-2.2.2/gems/houston-2.2.3/lib/houston/connection.rb:44:in connect' from /home/root1/.rvm/gems/ruby-2.2.2/gems/houston-2.2.3/lib/houston/connection.rb:44:inopen'
from /home/root1/.rvm/gems/ruby-2.2.2/gems/houston-2.2.3/lib/houston/connection.rb:19:in open' from /home/root1/.rvm/gems/ruby-2.2.2/gems/houston-2.2.3/lib/houston/client.rb:40:inpush'
from (irb):15
from /home/root1/.rvm/rubies/ruby-2.2.2/bin/irb:11:in `

'


After hitting APN.push(notification) some times even get below error


Errno::ECONNRESET: Connection reset by peer - SSL_connect


Machine configuration

OS - Ubunto 12.04 LTS
OpenSSL 1.0.1 14 Mar 2012
gem --version => 2.2.2
rvm --version =>rvm 1.26.0 (latest) by Wayne E. Seguin wayneeseguin@gmail.com, Michal Papis mpapis@gmail.com [https://rvm.io/]

I am not sure where I am going wrong.

Thanks! in Advance.

Hello All,

I ping "gateway.push.apple.com" and I got no result. Is I am facing this all issue due to my firewall ?

commented

Cannot reproduce. This is almost certainly an issue with your firewall.

@mattt Please give input in below queries:-

  • Is 'Houston' work for 'Apple Passbook app' ?
  • Is "DeviceIdentifier" not needed in "Parameter List" ?

Thanks!

@mattt I used command line and got below message but I am not able see any notification in iPhone 6+.
"1 push notification sent successfully"

Is any settings need to do in device ? Please let me know where I am going wrong.

Thanks!

commented

I'm seeing this as well, both from my laptop and from a heroku machine, so it doesn't appear to be a firewall issue.

I did, however, switch laptops and ended up with a slightly different environment than I'd been using previously, in terms of package versions, eg ruby 2.2.2 instead of 2.2.0 and rails 4.2.1 instead of 4.2.0...

commented

Oh, found it: the issue was that my certificate had been revoked. Any way to get a more informative error message in that case?

error OpenSSL::SSL::SSLError, SSL_connect returned=1 errno=0 state=SSLv3 read server session ticket A: sslv3 alert certificate unknown quickblox in iOS any one idea? how i will resolve this error

Is this confirmed to be a firewall issue?

I am also getting below issue:

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read finished A: sslv3 alert certificate unknown

Please suggest to resolve this issue.

Thanks

I was getting the same error.
As @spf2 mentioned, it occurred because of a revoked certificate in my case too.