{ "id": "61361", "key": "TIMOB-729", "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": "11223", "name": "Release 1.3.0", "archived": true, "released": true, "releaseDate": "2010-05-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:54:03.000+0000", "created": "2011-04-15T02:35:16.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:54:03.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": "{html}

Relevant error from log:
\n04-06 03:12:54.182: WARN/DefaultRequestDirector(17082):\nAuthentication error: Unable to respond to any of these challenges:\n{}

{html}", "attachment": [], "flagged": false, "summary": "Android: KS auth error in twitter / mashup example", "creator": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "123903", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

I'm havin a go at this (just mentioning so we don't duplicate\neffort)

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:35:17.000+0000", "updated": "2011-04-15T02:35:17.000+0000" }, { "id": "123904", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

Kudos to Don for suggesting to me to comment-out the\nTiHTTPClient.java line that sets\nsetRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\");. Twitter\nworks after that.

\n

i checked the Ti iPhone SDK. In TiNetworkHTTPClientProxy.m, the\nuser agent is set, but not X-Requested-With. Do we really need\nX-Requested-With?

\n

(Interestingly, this command line works for me, so Im not sure\nwhat is going on at the Twitter end to reject the calls we were\nmaking):

\n

curl -H \"X-Requested-With: XMLHttpRequest\" \"http://username:password@twitter.com/statuses/friends_timeline.json...\"

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:35:17.000+0000", "updated": "2011-04-15T02:35:17.000+0000" }, { "id": "123905", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "{html}

Addendum: Worried as I was that maybe there also might be an\nangle involved with the Apache HTTP client (which Android uses), I\nchanged Ti iphone sdk's TiNetworkHTTPClientProxy.m to set the\n\"X-Requested-With\", and indeed it failed. So that just confirms\nthat the Apache HTTP client is NOT the culprit. The error occurs\n\"cross-platform\" when that X-Requested-With header is included.

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:35:17.000+0000", "updated": "2011-04-15T02:35:17.000+0000" }, { "id": "123906", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [c6731d8c21f8485795ab32bc1fba97a73dbd40ec])\n[#729\nstate:resolved] Auth failure with twitter is fixed by removing the\nthe X-Request-With header. Thanks to @billdawson for tracking this\ndown. \nhttp://github.com/appcelerator/titanium_mobile/commit/c6731d8c21f84...

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:35:18.000+0000", "updated": "2011-04-15T02:35:18.000+0000" }, { "id": "123907", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [c883ec4ec485ea88552d8eb33d29b2383abce66e])\n[#729\nstate:resolved] Updated to conditionally not send the\nX-Requested-With header if twitter.com \nhttp://github.com/appcelerator/titanium_mobile/commit/c883ec4ec485e...

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:35:18.000+0000", "updated": "2011-04-15T02:35:18.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }