prebid-mobile-ios icon indicating copy to clipboard operation
prebid-mobile-ios copied to clipboard

Crash report: skadn may not be an object

Open shinwan2 opened this issue 1 year ago • 0 comments

Describe the bug Crashlytics reported this crash in our app. Our app uses both BannerAdUnit and NativeAdUnit. It seems that the skadn is not a Dictionary so below line fails.

https://github.com/prebid/prebid-mobile-ios/blob/0c986c32ff171fc6b40c90e836020ed60936b670/PrebidMobile/PrebidMobileRendering/Prebid/PBMCore/ORTB/Prebid/PBMORTBBidExtSkadn.m#L25

Crash log

Fatal Exception: NSInvalidArgumentException
-[__NSArray0 objectForKeyedSubscript:]: unrecognized selector sent to instance 0x225c98350

0  CoreFoundation                 0x9cb4 __exceptionPreprocess
1  libobjc.A.dylib                0x183d0 objc_exception_throw
2  CoreFoundation                 0x17eab8 +[NSObject(NSObject) _copyDescription]
3  CoreFoundation                 0x200e8 ___forwarding___
4  CoreFoundation                 0x86900 _CF_forwarding_prep_0
5  SmartNews                      0x18d69e0 -[PBMORTBBidExtSkadn initWithJsonDictionary:] + 25 (PBMORTBBidExtSkadn.m:25)
6  SmartNews                      0x18d5bb8 -[PBMORTBBidExt initWithJsonDictionary:] + 42 (PBMORTBBidExt.m:42)
7  SmartNews                      0x1926938 closure #1 in BidResponse.init(jsonDictionary:)
8  SmartNews                      0x19270ac thunk for @escaping @callee_guaranteed (@guaranteed [String : Any]) -> (@owned C?) (<compiler-generated>)
9  SmartNews                      0x18d16b4 -[PBMORTBAbstractResponse initWithJsonDictionary:extParser:] + 34 (PBMORTBAbstractResponse.m:34)
10 SmartNews                      0x18d507c -[PBMORTBBid initWithJsonDictionary:extParser:] + 78 (PBMORTBBid.m:78)
11 SmartNews                      0x18dfdd0 -[PBMORTBSeatBid initWithJsonDictionary:extParser:bidExtParser:] + 73 (PBMORTBSeatBid.m:73)
12 SmartNews                      0x18d895c -[PBMORTBBidResponse initWithJsonDictionary:extParser:seatBidExtParser:bidExtParser:] + 75 (PBMORTBBidResponse.m:75)
13 SmartNews                      0x1926de4 specialized @nonobjc PBMORTBBidResponse.init(jsonDictionary:extParser:seatBidExtParser:bidExtParser:) (<compiler-generated>)
14 SmartNews                      0x19269fc @objc BidResponse.init(jsonDictionary:) (<compiler-generated>)
15 SmartNews                      0x18b53cc +[PBMBidResponseTransformer transformResponse:error:] + 43 (PBMBidResponseTransformer.m:43)
16 SmartNews                      0x18b48d4 __45-[PBMBidRequester requestBidsWithCompletion:]_block_invoke_2 + 116 (PBMBidRequester.m:116)
17 SmartNews                      0x196a9d4 specialized PrebidServerConnection.proccessResponse(_:urlResponse:responseData:error:fullServerCallback:) + 201 (PrebidServerConnection.swift:201)
18 SmartNews                      0x1968a18 closure #1 in PrebidServerConnection.post(_:contentType:data:timeout:callback:) + 110 (PrebidServerConnection.swift:110)
19 SmartNews                      0x31eb1c thunk for @escaping @callee_guaranteed @Sendable (@guaranteed Data?, @guaranteed NSURLResponse?, @guaranteed Error?) -> () (<compiler-generated>)
20 SmartNews                      0xf0a578 __InstrumentUploadTaskWithRequestFromDataCompletionHandler_block_invoke_2 + 445 (FPRNSURLSessionInstrument.m:445)
21 SmartNews                      0xf0a578 __InstrumentUploadTaskWithRequestFromDataCompletionHandler_block_invoke_2 + 445 (FPRNSURLSessionInstrument.m:445)
22 CFNetwork                      0x2009c CFURLRequestSetMainDocumentURL
23 CFNetwork                      0x2fbd8 _CFNetworkErrorCopyLocalizedDescriptionWithHostname
24 libdispatch.dylib              0x2320 _dispatch_call_block_and_release
25 libdispatch.dylib              0x3eac _dispatch_client_callout
26 libdispatch.dylib              0xb534 _dispatch_lane_serial_drain
27 libdispatch.dylib              0xc0d8 _dispatch_lane_invoke
28 libdispatch.dylib              0x16cdc _dispatch_workloop_worker_thread
29 libsystem_pthread.dylib        0xddc _pthread_wqthread
30 libsystem_pthread.dylib        0xb7c start_wqthread

To Reproduce Not sure on how to configure the skadn.

Expected behavior It should not crash.

Screenshots Screenshot 2023-09-26 at 16 39 44

Smartphone (please complete the following information):

  • Device: All iPhone and iPad devices.
  • OS: iOS 15, 16, 17.

shinwan2 avatar Sep 26 '23 07:09 shinwan2