iosalamofirecfnetwork

*** Terminating app due to uncaught exception 'NSGenericException', reason: 'Start date cannot be later in time than end date!'


I am using Alamofire and after several hours of my app running on the simulator I got a crash with this error.

*** Terminating app due to uncaught exception 'NSGenericException', reason: 'Start date cannot be later in time than end date!'

I got this stack trace in console:

*** First throw call stack:
(
    0   CoreFoundation                      0x0000000111186d4b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x0000000110be821e objc_exception_throw + 48
    2   Foundation                          0x00000001107f0e3c -[_NSConcreteDateInterval dealloc] + 0
    3   CFNetwork                           0x00000001131a18e8 -[__NSCFURLSessionTaskMetrics _initWithTask:] + 868
    4   CFNetwork                           0x00000001131a1497 -[NSURLSessionTaskMetrics _initWithTask:] + 100
    5   CFNetwork                           0x0000000112f77bc7 -[__NSCFURLLocalSessionConnection _tick_finishing] + 351
    6   libdispatch.dylib                   0x00000001128e3978 _dispatch_call_block_and_release + 12
    7   libdispatch.dylib                   0x000000011290d0cd _dispatch_client_callout + 8
    8   libdispatch.dylib                   0x00000001128eae17 _dispatch_queue_serial_drain + 236
    9   libdispatch.dylib                   0x00000001128ebb4b _dispatch_queue_invoke + 1073
    10  libdispatch.dylib                   0x00000001128ee385 _dispatch_root_queue_drain + 720
    11  libdispatch.dylib                   0x00000001128ee059 _dispatch_worker_thread3 + 123
    12  libsystem_pthread.dylib             0x0000000112cbc736 _pthread_wqthread + 1299
    13  libsystem_pthread.dylib             0x0000000112cbc211 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Did someone get the similar crash?

Thanks


Solution

  • I had the same crash and did some research today and found this:

    http://www.openradar.me/28301343

    It looks Apple fixed the issue in iOS 10.2. just thought it may help you!