1

As every app these days have firebase push notifications, so do our app. Everything works fine like sending notifications and all. But I started getting this error :

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'FCM error: cannot have last checkin timestamp in future'

logs for above error:

2019-03-26 15:27:49.375300+0530 appName[665:131254] * Assertion failure in -FIRInstanceIDCheckinPreferences hasValidCheckinInfo, /Users/username/Desktop/appName/Pods/FirebaseInstanceID/Firebase/InstanceID/FIRInstanceIDCheckinPreferences.m:66 2019-03-26 15:27:49.379038+0530 appName[665:131254] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'FCM error: cannot have last checkin timestamp in future'

Cause of error: User changes the device time to a date and time before the last checkin timestamp.

Firebase SDK version used is 5.19.0

If user sets the device time to automatic, this error does not occur. I'm not able to catch this exception as this is occurring even before didFinishLaunchingWithOptions

Any help regarding handling this issue is appreciated.

4 Answers4

2

I am observing this crash if Device date is changed

Krishna Kirana
  • 438
  • 4
  • 10
1

You need to have an exception handler at the entry point of you application. Read this post: What is the entry point of swift code execution? to understand what is the entry point of your iOS app.

Raunak
  • 3,314
  • 1
  • 22
  • 28
1

As pointed out in the comments, this is a development mode only assertion and should not occur in release mode.

See the implementation here.

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
0

This happens when you set device's date to something in the past.

Soufian Hossam
  • 487
  • 5
  • 16