Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17865] iOS: Ti.Network.createHTTPClient times out on GET request with POST data

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2015-02-17T16:54:16.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsregression
ReporterEduardo Gomez
AssigneeIngo Muschenetz
Created2014-10-15T15:38:22.000+0000
Updated2017-03-22T21:48:46.000+0000

Description

Issue description

I have been getting a Timeout Error for the get xhr httpclient request after upgrading to the latest 3.4 SDK. We upgrade from 3.2.3.GA, and everything was working fine till I have updated to latest SDK but after the update i cannot proceed ahead as i am always getting a timeout error on the get request.

Steps to reproduce

Grab app.js and launch iOS simulator

Click XHR to request server response

Monitor Logs

[INFO] :   onError of communicator was called: {"type":"error","source":{"method":"GET","async":true,"timeout":90000,"url":"https://sso.cisco.com/autho/dummy/dummy.html"},"code":-1005,"error":"The network connection was lost.","success":false}
[ERROR] :  Timeout: Cisco server is down{"method":"GET","async":true,"timeout":90000,"url":"https://sso.cisco.com/autho/dummy/dummy.html"}
This might also fail to connect: https://link.opera.com/

Comments

  1. Soumya Kanti Kar 2015-01-05

    We have also been experiencing a similar issue. The application is working fine in Android, but we are getting an issue in iOS. We are testing it in iPhone 6 Plus and also on iPhone 5S. Both the devices are running on iOS 8. Update: Another point to note is that the issue is not happening on iOS 7, it is occurring only in iOS 8.
  2. Vishal Duggal 2015-02-17

    The documentation clearly states that the optional parameters for the "send" method on the HTTPClient are for a POST request. On older versions of the titanium SDK we were using a third party library (ASI) that automatically converted GET and HEAD requests to POST requests if there was a HTTPBody. Essentially covering up a developer mistake. The new networking library no longer does this. On Android the situation is a little different. If send is called with a HTTPBody and the request is GET we modify the original url to include the HTTP parameters as the query in the request. iOS does not do this. That is why the sample works on Android. Either ways this is a developer mistake and we will not be fixing this issue.
  3. Luis F. Garcia 2015-03-09

  4. Lee Morris 2017-03-22

    Closing ticket as invalid with reference to previous comments.

JSON Source