alexalok / dotAPNS

dotAPNS is a library used to send push notifications to Apple devices using Apple Push Notification service via HTTP/2 API.
Apache License 2.0
114 stars 34 forks source link

Some times getting Error when call method apns.send() #82

Closed Trushal0066 closed 3 years ago

Trushal0066 commented 3 years ago

I am getting below error when call apns.send(). Can you please provide me solution for this ?

Error 12007 calling WINHTTP_CALLBACK_STATUS_REQUEST_ERROR

alexalok commented 3 years ago

12007 is an error for ERROR_WINHTTP_NAME_NOT_RESOLVED. According to MS Docs, this error indicates that the server name cannot be resolved. Looks like some kind of network issue, i.e. DNS request fails.

I assume you use Windows, please try to execute the following commands in the cmd:

  1. nslookup api.development.push.apple.com
  2. nslookup api.push.apple.com

Do they both successfully return the IP addresses or do they/one of them fail? An example of a successful answer:

nslookup api.development.push.apple.com
Server:  UnKnown
Address:  192.168.1.1

Non-authoritative answer:
Name:    api.sandbox.push-apple.com.akadns.net
Addresses:  17.188.138.71
          17.188.138.73
          17.188.138.70
Aliases:  api.development.push.apple.com
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.