ruby-push-notifications icon indicating copy to clipboard operation
ruby-push-notifications copied to clipboard

getaddrinfo: nodename nor servname provided, or not known (SocketError)

Open RajOfficeTroops opened this issue 5 years ago • 0 comments

The host url that I'm requesting is https://api.push.apple.com/.... The actual url is the push token appended to the above url:

Therefore the actual url becomes https://api.push.apple.com/..../<push_token> which is uri

notification = RubyPushNotifications::APNS::APNSNotification.new tokens, { aps: { alert: 'Hello APNS World!', sound: 'true', badge: 1 } }

pusher = RubyPushNotifications::APNS::APNSPusher.new(File.read('Certificates.pem'), true, password, { host: uri })

On pusher.push [notification] I get getaddrinfo: nodename nor servname provided, or not known (SocketError).

The uri works perfectly via curl.

RajOfficeTroops avatar May 12 '20 13:05 RajOfficeTroops