Alamofire / Foundation

Official Policies for the Alamofire Software Foundation

Home Page:http://alamofire.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

assertionFailure - needNewBodyStream did not find UploadRequest

aarashgoodarzi opened this issue · comments

I'm trying to send a POST request using alamofire. but on a request i'm keeping get this error:

assertionFailure("needNewBodyStream did not find UploadRequest.")

 Alamofire/SessionDelegate.swift, line 178
   2020-12-09 16:48:32.746737+0330 Dericoin[29553:862552] Fatal error: needNewBodyStream did not find UploadRequest.: file Alamofire/SessionDelegate.swift, line 178

my request :

let paramsDict: [String: Any]? = [...]
let headersDict: [String: Any]? = [...]    
AF.request("https://....", method: .post, parameters: paramsDict, encoding: URLEncoding.default, headers: headersDict)
                .responseJSON { response in
                    //something
            }

i'm using Alamofire v5.4 and also tested v5.2 and v5.3; iOS 14 and Swift 5. any suggestion?