contentstack / contentstack-ios

iOS SDK for Contentstack's Content Delivery API
MIT License
2 stars 2 forks source link

Crash happening at CSIOCoreHTTPNetworking.m - Line 230 #13

Closed apcnir closed 2 years ago

apcnir commented 3 years ago

Hello, I want to report an isue that we are getting while using the version 3.9.0 of ContentStack, basically we are seeing several crash reports from Firebase, I provided more details below.

Here's the exception name:

 Fatal Exception: NSInvalidArgumentException
*** +[NSJSONSerialization dataWithJSONObject:options:error:]: value parameter is nil

Here's the line that's marking having the issue CSIOCoreHTTPNetworking.m - Line 230 -[CSIOCoreHTTPNetworking saveToCacheDataTask:responseObject:] + 230

Here's the stack trace of the issue

Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x1a3fa6754 exceptionPreprocess 1 libobjc.A.dylib 0x1b8a6d7a8 objc_exception_throw 2 Foundation 0x1a526586c -[NSThread isCancelled] 3 Contentstack 0x10622b1f0 -[CSIOCoreHTTPNetworking saveToCacheDataTask:responseObject:] + 230 (CSIOCoreHTTPNetworking.m:230) 4 Contentstack 0x10622bffc 114-[CSIOCoreHTTPNetworking requestForStack:withURLPath:requestType:params:additionalHeaders:cachePolicy:completion:]_block_invoke + 374 (CSIOCoreHTTPNetworking.m:374) 5 Contentstack 0x10622d1dc 59-[CSURLSessionManager dataTaskWithRequest:success:failure:]_block_invoke_2 + 140 (CSURLSessionManager.m:140) 6 FirebasePerformance 0x10652732c __InstrumentDataTaskWithRequestCompletionHandler_block_invoke_2 + 300 (FPRNSURLSessionInstrument.m:300) 7 FirebasePerformance 0x10652732c InstrumentDataTaskWithRequestCompletionHandler_block_invoke_2 + 300 (FPRNSURLSessionInstrument.m:300) 8 CFNetwork 0x1a45ca3dc CFNetServiceBrowserSearchForServices 9 CFNetwork 0x1a45dc768 _CFHTTPMessageSetResponseProxyURL 10 Foundation 0x1a5330fa8 NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK 11 Foundation 0x1a521e878 -[NSBlockOperation main] 12 Foundation 0x1a53333d0 __NSOPERATION_IS_INVOKING_MAIN 13 Foundation 0x1a521e500 -[NSOperation start] 14 Foundation 0x1a5333e74 NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION 15 Foundation 0x1a5333900 NSOQSchedule_f 16 libdispatch.dylib 0x1a3ba2484 _dispatch_block_async_invoke2 17 libdispatch.dylib 0x1a3b9381c _dispatch_client_callout 18 libdispatch.dylib 0x1a3b96cf4 _dispatch_continuation_pop 19 libdispatch.dylib 0x1a3b96384 _dispatch_async_redirect_invoke 20 libdispatch.dylib 0x1a3ba4fe0 _dispatch_root_queue_drain 21 libdispatch.dylib 0x1a3ba57d8 _dispatch_worker_thread2 22 libsystem_pthread.dylib 0x1efc22768 _pthread_wqthread 23 libsystem_pthread.dylib 0x1efc2974c start_wqthread

If by any chance you require more information, please let me know, thanks in advance!

uttamukkoji commented 3 years ago

Hi @apcnir,

Thanks for raising issue. We will check this on our side and update you once we resolve this issue.

uttamukkoji commented 3 years ago

Hi @apcnir ,

We are unable to reproduce issue on our side, but to resolve this issue we have added nil check on the response. We have release new version for iOS SDK. Can you please update to latest version and check if you are still facing this issue?

uttamukkoji commented 2 years ago

Hi @apcnir ,

Closing this ticket as there are no further activity needed. If you have any concern or issue you can re-open or create new issue.