Praveen
Praveen

Reputation: 439

Node-apn throwing Error 8 frequently

I came through this weird behaviour with node-apn throwing error 8 sometimes only. Debugged for same certificate, token and app build.

Details as follows

  1. Called Node APN service iOS token and data to send push notification, while the app was not launched in the device. No notifications were received.
  2. Debugged from server side and found that error 8 was thrown.
  3. Launched the app again and kept in background.
  4. Tried sending push notification again (same token, app build and set of certificates).
  5. Push notification was sent and received successfully.

Has anyone faced similar issue, and possible solution?

Upvotes: 0

Views: 331

Answers (1)

Amol M Kulkarni
Amol M Kulkarni

Reputation: 21629

The device token for production is different than the development one, so if you send a development token to production APNS servers (or vice versa), that's the cause of the problem Error 8

Check if the App ID & other details matches with the build, using following command:

openssl x509 -text -noout -in <cert file path>

Upvotes: 0

Related Questions