Quantcast
Channel: Questions in topic: "webrequest"
Viewing all articles
Browse latest Browse all 387

UnityWebRequest.error return "cannot connect to destination host" on iOS13.5.1

$
0
0
I wanted to post a card to trello using UnityWebRequest.Post, but UnityWebRequest.error return "cannot connect to destination host" on iOS13 (tested on iOS13.5.1). It worked on iOS12.3.1, Android, and UnityEditor. Any idea what is going wrong? Here are the code: private void CheckWebRequestStatus( string errorMessage, UnityWebRequest uwr ) { if ( !string.IsNullOrEmpty( uwr.error ) ) { Debug.Log( errorMessage + ": " + uwr.error ); } } public IEnumerator UploadCardCO(TrelloCard card) { WWWForm post = new WWWForm(); post.AddField("name", card.name); post.AddField("desc", card.desc); post.AddField("pos", card.pos); post.AddField("due", card.due); post.AddField("idList", card.idList); UnityWebRequest uwr = UnityWebRequest.Post(cardBaseUrl + "?" + "key=" + key + "&token=" + token, post); uwr.timeout = m_uploadCardWebRequestTimeOut; yield return uwr.SendWebRequest(); CheckWebRequestStatus( "Could not upload new card to Trello", uwr ); } Here are the XCode log: 2020-08-27 14:10:24.786708+0800 MYAPP[929:197965] Task <6A508741-B288-4B15-BC95-516F58A4D2D3>.<1> HTTP load failed, 561/1771 bytes (error code: -1005 [4:-4]) 2020-08-27 14:10:24.795008+0800 MYAPP[929:197965] Task <6A508741-B288-4B15-BC95-516F58A4D2D3>.<1> HTTP load failed, 561/1771 bytes (error code: -1005 [4:-4]) 2020-08-27 14:10:24.798028+0800 MYAPP[929:197958] Task <6A508741-B288-4B15-BC95-516F58A4D2D3>.<1> finished with error [-1005] Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=-4, NSUnderlyingError=0x281712d00 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey={length = 16, capacity = 16, bytes = 0x100201bb1288d6130000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <6A508741-B288-4B15-BC95-516F58A4D2D3>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalUploadTask <6A508741-B288-4B15-BC95-516F58A4D2D3>.<1>" ), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=https://api.trello.com/1/cards/?key=KEY&token=TOKEN, NSErrorFailingURLKey=https://api.trello.com/1/cards/?key=KEY&token=TOKEN, _kCFStreamErrorDomainKey=4} Could not upload new card to Trello: Cannot connect to destination host Any advice, solution or suggestion would be much appreciated.

Viewing all articles
Browse latest Browse all 387

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>