{ "id": "115909", "key": "TIMOB-14224", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15597", "description": "2013 Sprint 17", "name": "2013 Sprint 17", "archived": true, "released": true, "releaseDate": "2013-08-23" }, { "id": "15599", "description": "2013 Sprint 17 API", "name": "2013 Sprint 17 API", "archived": true, "released": true, "releaseDate": "2013-08-23" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-08-23T23:37:45.000+0000", "created": "2013-06-13T21:26:19.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "supportTeam" ], "versions": [ { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [ { "id": "30878", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "117578", "key": "TIMOB-14651", "fields": { "summary": "Android: Add support for HttpClient Cookie Path Validation", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "34224", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "124598", "key": "TIMOB-16155", "fields": { "summary": "Android: Accessing URL results in \"Temporary moved\" error", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "30391", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "117578", "key": "TIMOB-14651", "fields": { "summary": "Android: Add support for HttpClient Cookie Path Validation", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-14T20:24:44.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "h6.Issue\r\nOnce we call abort() method on xhr (which we need to cancel download), all the subsequent calls to xhr client are failing. The request is going to the server but from the server we are getting the below error:\r\n\r\nh6.stack trace\r\n{code}\r\n06-13 16:18:22.125: W/ResponseProcessCookies(21195): Cookie rejected: \"BasicClientCookie[version=0,name=ObFormLoginCookie,domain=sso.cisco.com,path=/autho/login/loginaction.html,expiry=null]\". Illegal path attribute \"/autho/login/loginaction.html\". Path of origin: \"/obrareq.cgi\"\r\n{code}\r\n\r\n- Thread\r\nA similar discussion about how fix this: http://stackoverflow.com/questions/8279970/accept-all-cookies-via-httpclient\r\n", "attachment": [], "flagged": false, "summary": "Android: xhr.abort() call makes all subsequent xhr calls fail completely", "creator": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "environment": "Android Device 2.3.5 & emulator 4.x\r\nTiSDK 3.1.0.GA & 3.2 CI build", "comment": { "comments": [ { "id": "257756", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~egomez] is it possible to extract out an example into a short code snippet showing the failure?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-13T21:38:32.000+0000", "updated": "2013-06-13T21:39:26.000+0000" }, { "id": "261142", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Aborting the xhr request tears down the underlying TCP connection.\r\n\r\nIf you actually see the response from the server after the abort you'll see the code for a Login Page (so the client needs to re-authenticate after abort).\r\n\r\nThe server supports Basic Access Authentication, so setting a basic auth request header instead of the cookie information will work every time (even after abort)\r\n\r\n{code}\r\n\tvar basic_authStr = 'Basic ' +Titanium.Utils.base64encode(USERNAME+':' + PASSWORD);\r\n\txhr.setRequestHeader(\"Authorization\", basic_authStr);\r\n\txhr.open('GET', url);\r\n\txhr.send();\r\n{code}\r\n\r\nResolving this as not our bug", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-07-09T21:13:38.000+0000", "updated": "2013-07-09T21:16:42.000+0000" }, { "id": "261855", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Please see feedback to points:\r\n\r\nh6.Work arounds\r\n(1) Do a silent login after abort.\r\n\r\nh6.Feedback:\r\nWe cannot ask user to re-login after every abort.\r\nAs per Cisco policy we should not store the user credential anywhere is app, so we cannot got for Basic authentication. Our Cisco framework gives us a Cookie and which we need re-use, for further server communication.\r\n\r\n(2) Don't abort. Just ignore the results.\r\n\r\nh6.Feedback:\r\nThis will slow the app, because even we are not downloading the content the data chunk will be downloading to the device.\r\n\r\n(3) The server seems to support basic authorization. We essentially changed the code in Search.js to send an Authorization Header instead of the ObSSOCookie to get it to work fine even after abort.\r\n\r\nh6.Feedback:\r\nAs mentioned in #1, we should not store user credentials, and we should use the cookies for further server communication.\r\n\r\nh6.Customer's remarks\r\n\"Please provide us a solution to use the cookies, for further communication. This mechanism of Cookies is working fine with iOS implementation and working fine with our apps on iPhone and iPad.\"", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-07-15T19:28:20.000+0000", "updated": "2013-07-15T19:28:20.000+0000" }, { "id": "265291", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master PR: https://github.com/appcelerator/titanium_mobile/pull/4549", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-07T06:12:31.000+0000", "updated": "2013-08-07T06:12:31.000+0000" }, { "id": "265914", "author": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Hi, I've tested out PR and works great.\n\nAs I just wanted to make sure their app runs smoothly and without outstanding issues. I found the following outcome:\n\nh5.Details\nUser once logged in, attempts to get file \"A\". If he \"aborts\" current download the exception below is thrown. When he resumes (click \"Download\") then he won't be able to abort this file download over again (to be clear: the download will finalize successfully).\n\nh6.Device stack trace \nRazr Droid 2.3.5 on TiSDK 3.2 CI build\n{code}\n08-11 20:38:34.076: W/DefaultHttpClient(4586): Error consuming content after an exception.\n08-11 20:38:34.076: W/DefaultHttpClient(4586): java.net.SocketException: Socket is closed\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.checkOpen(OpenSSLSocketImpl.java:339)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.access$100(OpenSSLSocketImpl.java:57)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:776)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:134)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:174)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:188)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.impl.io.ContentLengthInputStream.close(ContentLengthInputStream.java:121)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.entity.BasicHttpEntity.consumeContent(BasicHttpEntity.java:142)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.conn.BasicManagedEntity.consumeContent(BasicManagedEntity.java:114)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:662)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:637)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1277)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat java.lang.Thread.run(Thread.java:1019)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): Error consuming content after an exception.\n08-11 20:38:34.076: W/DefaultHttpClient(4586): java.net.SocketException: Socket is closed\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.checkOpen(OpenSSLSocketImpl.java:339)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.access$100(OpenSSLSocketImpl.java:57)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:776)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:134)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:174)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:188)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.impl.io.ContentLengthInputStream.close(ContentLengthInputStream.java:121)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.entity.BasicHttpEntity.consumeContent(BasicHttpEntity.java:142)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.conn.BasicManagedEntity.consumeContent(BasicManagedEntity.java:114)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:662)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:637)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1277)\n08-11 20:38:34.076: W/DefaultHttpClient(4586): \tat java.lang.Thread.run(Thread.java:1019)\n{code}\n\nOnce File \"A\" was downloaded successfully, user attempts to get File \"B\". Download progress starts off. User aborts. Exception below is thrown. If he resumes by clicking \"Download\" button they won't be able to abort anymore. But again the file \"B\" will be downloaded successfully: \n\n{code}\n08-11 20:47:24.561: D/TiHttpClient(4586): (TiHttpClient-24) [353743,546582] client is not valid, unable to clear expired and idle connections\n08-11 20:47:24.561: E/TiHttpClient(4586): (TiHttpClient-24) [0,546582] HTTP Error (java.lang.NullPointerException): java.lang.NullPointerException\n08-11 20:47:24.561: E/TiHttpClient(4586): java.lang.NullPointerException\n08-11 20:47:24.561: E/TiHttpClient(4586): \tat ti.modules.titanium.network.TiHTTPClient$LocalResponseHandler.finishedReceivingEntityData(TiHTTPClient.java:376)\n08-11 20:47:24.561: E/TiHttpClient(4586): \tat ti.modules.titanium.network.TiHTTPClient$LocalResponseHandler.handleResponse(TiHTTPClient.java:308)\n08-11 20:47:24.561: E/TiHttpClient(4586): \tat ti.modules.titanium.network.TiHTTPClient$LocalResponseHandler.handleResponse(TiHTTPClient.java:216)\n08-11 20:47:24.561: E/TiHttpClient(4586): \tat org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:657)\n08-11 20:47:24.561: E/TiHttpClient(4586): \tat org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:637)\n08-11 20:47:24.561: E/TiHttpClient(4586): \tat ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1277)\n08-11 20:47:24.561: E/TiHttpClient(4586): \tat java.lang.Thread.run(Thread.java:1019)\n08-11 20:47:27.162: I/TiAPI(4586): onerror ---->java.lang.NullPointerException\n{code}\n\nh6.Outcomes\n- From Android docs: http://developer.android.com/reference/org/apache/http/HttpEntity.html#consumeContent()\n{code}\nThis method is called to indicate that the content of this entity is no longer required. All entity implementations are expected to release all allocated resources as a result of this method invocation. Content streaming entities are also expected to dispose of the remaining content, if any. Wrapping entities should delegate this call to the wrapped entity. \nThis method is of particular importance for entities being received from a connection. The entity needs to be consumed completely in order to re-use the connection with keep-alive.\n{code}\n\nDo they need to warn users Abort method would work only once? Are these entities throwing an exception when this method is called multiple times?\n\nIf you need further clarity, or anymore info let me know, thanks.", "updateAuthor": { "name": "egomez", "key": "egomez", "displayName": "Eduardo Gomez", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-08-12T02:11:03.000+0000", "updated": "2013-08-12T02:11:03.000+0000" }, { "id": "268014", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/4549", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-23T23:38:31.000+0000", "updated": "2013-08-23T23:38:31.000+0000" }, { "id": "412269", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-14T20:24:44.000+0000", "updated": "2017-03-14T20:24:44.000+0000" } ], "maxResults": 17, "total": 17, "startAt": 0 } } }