Alamofire DataRequestResponse queue Serializer completionHandler Error

I’v got a crash on fabric several time and have no Idea to solve it, on my developing app when I test locally I have no crash

my request:

 

var alamofireManager: SessionManager?

  func Request(_ call_method: Alamofire.HTTPMethod, url: 
  URL, parameters: [String: Any]?, callback: @escaping(_ res: T) -> Void?, 
  headers: [String: String]?) {

      NetworkManager.shared.setNetworkManager() // set timeout and server policies

      alamofireManager?
      .request(url, method: call_method, parameters: parameters, encoding: URLEncoding() , headers: headers)
      .responseObject { [weak self] (response: DataResponse) in
          switch response.result {
          case .success(let data):
              callback(data)
          case .failure(let error):
              print("Data Response Failed...(error)")
          } .  
      }
  }

 

Fabric:

Crashed: com.apple.main-thread .

0 myApp .       0x1007c6f74 (Missing) .

1 myApp         0x1007cbabc (Missing) .

2 myApp         0x10080010c (Missing) .

3 myApp         0x100810998 (Missing) .

4 Alamofire .    0x100fde7a4     $S9Alamofire11DataRequestC8response5queue0D10Serializer17completionHandlerACXDSo012OS_dispatch_E0CSg_xyAA0B8ResponseVy16SerializedObjectQzGctAA0bkF8ProtocolRzlFyycfU_yycfU_TA + 56.

5 Alamofire      0x100fbd8e8 $SIeg_IeyB_TR + 36 .

6 libdispatch.dylib       0x1814d4aa0 _dispatch_call_block_and_release + 24 .

7 libdispatch.dylib       0x1814d4a60 _dispatch_client_callout + 16 . 8 libdispatch.dylib 0x1814e165c      _dispatch_main_queue_callback_4CF$VARIANT$mp + 1012 .

9 CoreFoundation         0x181b8b070 .       CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12 .

10 CoreFoundation       0x181b88bc8          __CFRunLoopRun + 2272 .   

11 CoreFoundation       0x181aa8da8          CFRunLoopRunSpecific + 552 .

12 GraphicsServices     0x183a8d020          GSEventRunModal + 100 . 

13 UIKit .                       0x18bac5758          UIApplicationMain + 236 .

14 myApp 0x1007b5b08 (Missing) .

15 libdyld.dylib 0x181539fc0 start + 4 .

Powered by WPeMatico

You may also like...

Comments are closed.