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
- 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.
- Debugged from server side and found that error 8 was thrown.
- Launched the app again and kept in background.
- Tried sending push notification again (same token, app build and set of certificates).
- Push notification was sent and received successfully.
Has anyone faced similar issue, and possible solution?
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: