NSInternalInconsistencyException Crash in Kinvey library, cannot determine what's causing it.
started a topic
over 6 years ago
For some reason certain test accounts are causing our app to crash on iOS (and not Android). It's not clear from the call stack exactly what query or object creation is causing the issue. There is an exception being raised but it's happened in an internal library so we can't see whats happening:
*** Assertion failure in -[KCS_SBJsonStreamParserAdapter parser:found:], /Users/mike/work/ios-library/tags/1.27.1/KinveyKit/KinveyKit/3rdParty/SBJson/KCS_SBJsonStreamParserAdapter.m:83
2014-09-04 14:33:21.435 Moti-Mate[62123:3503] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: obj'
libc++abi.dylib: terminating with uncaught exception of type NSException
We tried disabling all business logic but it had no effect. Some accounts cause the issue and some don't and it's not clear at what point they are returning invalid data. Regardless I would expect the library to return an error rather than raising an exception. It seems like it would be simple to debug if we were able to see the source code.
Is there anything we could possibly do, or would likely cause this kind of exception? We are using the latest version of the library 1.27.1
sorry for the delay in getting back to you. This looks like an issue with json parser, when it is attempting to parse an ISO date. It looks like a date object is containing an empty string, as opposed to the actual date.
Can you check for any value that looks like `ISODate(“")` or `ISODate()`? That would cause this issue.