manish kumar
manish kumar

Reputation: 21

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

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.

Upvotes: 1

Views: 469

Answers (4)

Soufian Hossam
Soufian Hossam

Reputation: 507

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

Upvotes: 0

Krishna Kirana
Krishna Kirana

Reputation: 478

I am observing this crash if Device date is changed

Upvotes: 2

Paul Beusterien
Paul Beusterien

Reputation: 29572

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

See the implementation here.

Upvotes: 1

Raunak
Raunak

Reputation: 3414

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.

Upvotes: 1

Related Questions