UITableView _endCellAnimationsWithContext: assertion failure without reason - ios

I'm using a UITableView to display some settings to the user. When reloading a section or inserting some rows with animation, it is possible to make a mistake in the the delegate/datasource functions causing an
Assertion failure in -[UITableView _endCellAnimationsWithContext:], /SourceCache/UIKit/UIKit-3232.3/UITableView.m:1560
This has happened to me many times, but usually it also states what I did wrong, like so:
Assertion failure in -[UITableView _endCellAnimationsWithContext:],
/SourceCache/UIKit/UIKit-2380.17/UITableView.m:1070
Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'Invalid update: invalid
number of rows in section 0.
As of late, the reason is not displayed in the console anymore, just the assertion failure and a SIGABRT line.
This is very annoying and makes debugging very time consuming. Any clue what I can do to restore this feature?

After posting my question and re-reading it, I realised that the portion of the message I was missing was the part of the uncaught exception
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0.
I then realised I am using the PLCrashReporter since a month or two to report uncaught exceptions to our server. Disabling the crashreporter restored the reason bit of the message in the console.
doh!

Related

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.
I am observing this crash if Device date is changed
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.
As pointed out in the comments, this is a development mode only assertion and should not occur in release mode.
See the implementation here.
This happens when you set device's date to something in the past.

There doesn't seem to be a valid compiled storyboard

Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: 'There doesn't seem to be a
valid compiled storyboard at path
I am getting this error after storing more than 100 row in local database.
Can anybody tell me how should i handle this?

App crashes with BLE under Swift

I am developing a Swift App using Bluetooth LE, that crashes from time to time - not really reproducable.
I get always the same error message but can't find anything to lighten things up.
*** Assertion failure in -[CBUUID initWithData:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreBluetooth/CoreBluetooth-327.1/CBUUID.m:170
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Data <> does not
represent a valid UUID'
Does anybody has a idea what the error might be?
Thanks in advance
Reto

iOS uncaught exception isKindOfClass:NSArray.class

I have been getting the below error while running my project in xcode 6.1.1, Can any please help to know what workarounds can be done to remove the below error.
[ERROR] Uncaught Exception: Invalid parameter not satisfying: [arguments isKindOfClass:NSArray.class]
libc++abi.dylib: terminating with uncaught exception of type NSException
Thanks
djrecker
I see something similar to this once in a blue moon. Have you tried cleaning the project? (In the menu: Product->Clean
Unfortunately I don't know what causes it (and I've been too lazy to attempt tracking it down), but that always clears it up for me when I see it.

Does anyone know why this exception is being thrown in ios/cordova?

I'm working on a hybrid app with a custom InAppBrowser plugin and seemingly randomly an exception gets thrown.
I don't have any way to consistently reproduce this bug. I open that app and browser around and eventually when clicking my browser plugin's close button this will happen.
It happens within cordova after I call this line here
Where the exception actually happens
CordovaLib.xcodeproj/Classes/Commands/CDVCommandDelegateImpl.m
I have spent hours trying to find what is happening and I can't find any information online that helps. I've tried wrapping it in a try/catch to at least see if I can bypass it and that doesn't work either
The actual logged error is:
*** Assertion failure in -[DDWebKitOperation dealloc], /SourceCache/MobileDataDetectorsUI/MobileDataDetectorsUI-109.1/URLification/DDOperation.m:202
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Container should already be nil'
Does anyone know what could be causing this and how to fix it?
Thanks.
I've seen this crash in UIView's that use data detectors. In my case it was in a unit test, so the fix was to delete the data detector in the test.

Resources