facebookincubator / SocketRocket

A conforming Objective-C WebSocket client library.
Other
9.53k stars 2.01k forks source link

Repetitive crashes with V0.6.0 #636

Closed skware closed 2 years ago

skware commented 2 years ago

Hello,

Since we updated to V0.6.0, we are getting significant a amount of crash showing up in Crashlytics . We were not getting any crash with SocketRocket prior to this version.

Here is the stack trace -[SafeDKCrashReporter length]: unrecognized selector sent to instance 0x281d3a6d0 Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x129dc0 exceptionPreprocess 1 libobjc.A.dylib 0x287a8 objc_exception_throw 2 CoreFoundation 0x2d2d0 -[NSOrderedSet initWithSet:copyItems:] 3 CoreFoundation 0x12c918 __forwarding 4 CoreFoundation 0x12ec10 _CF_forwarding_prep_0 5 SocketRocket 0xe6f8 -[SRWebSocket _innerPumpScanner] + 1567 (SRWebSocket.m:1567) 6 SocketRocket 0xeb48 -[SRWebSocket _pumpScanner] + 1324 (SRWebSocket.m:1324) 7 SocketRocket 0xf3bc -[SRWebSocket safeHandleEvent:stream:] + 1514 (SRWebSocket.m:1514) 8 SocketRocket 0xf034 __34-[SRWebSocket stream:handleEvent:]_block_invoke_2 + 1429 (SRWebSocket.m:1429) 9 libdispatch.dylib 0x2a84 _dispatch_call_block_and_release 10 libdispatch.dylib 0x481c _dispatch_client_callout 11 libdispatch.dylib 0xc004 _dispatch_lane_serial_drain 12 libdispatch.dylib 0xcc00 _dispatch_lane_invoke 13 libdispatch.dylib 0x174bc _dispatch_workloop_worker_thread 14 libsystem_pthread.dylib 0x37a4 (Missing) 15 libsystem_pthread.dylib 0xa74c (Missing)

Screenshot 2021-11-19 at 09 13 07 Screenshot 2021-11-19 at 08 52 52

Any idea of what could go wrong?

Thanks

olga-giza commented 2 years ago

Hey @skware ! 👋 Did you find the reason? We have same issue on our app 🤔

skware commented 2 years ago

hey @olga-giza , yes this in fact was caused by a third party framework (Applovin quality service). Once we removed it, no more crashs at all.

olga-giza commented 2 years ago

Oh, nice! Thanks for the info 🎉

skware commented 2 years ago

@olga-giza to be more precise the problem was cause by a dependency of AppLovin Quality service called SafeDK, it seems like this one does not play well with socket rocket when in the same project