{ "id": "62281", "key": "TIMOB-1649", "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": "11226", "name": "Release 1.5.0 M01", "archived": true, "released": true, "releaseDate": "2010-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:56:46.000+0000", "created": "2011-04-15T02:58:22.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "android", "defect" ], "versions": [], "issuelinks": [], "assignee": { "name": "mculpepper", "key": "mculpepper", "displayName": "Marshall Culpepper", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:56:46.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}

Treat no argument as send({});. See Helpdesk\n38031

\n

To work around simply use an empty dictionary.\nhttp.send({});

\n

Simple fail case app.js:

\n
\nTitanium.UI.setBackgroundColor('#000');\nvar http = Ti.Network.createHTTPClient();\nhttp.onerror = function(e) {\n    Ti.API.error(e.error);\n};\nhttp.open('POST','http://www.appcelerator.com');\nhttp.send();\nTi.API.info('after send call');\n
\n

In the console you will see an error notice of a\nNullPointerException

{html}", "attachment": [], "flagged": false, "summary": "Android: HTTPClient.send with no Argument causes NPE", "creator": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "126274", "author": { "name": "lukemelia", "key": "lukemelia", "displayName": "Luke Melia", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Hmm, I am running into a case where this workaround doesn't\navoid the NPE. (I'm the original reporter from Helpdesk 38031).\nI'll try to isolate it further, but it is a simple POST.

{html}", "updateAuthor": { "name": "lukemelia", "key": "lukemelia", "displayName": "Luke Melia", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:58:23.000+0000", "updated": "2011-04-15T02:58:23.000+0000" }, { "id": "126275", "author": { "name": "lukemelia", "key": "lukemelia", "displayName": "Luke Melia", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Confirmed that it's the same bug. If I build from source with\nthe guard commented out, it works fine.

{html}", "updateAuthor": { "name": "lukemelia", "key": "lukemelia", "displayName": "Luke Melia", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:58:23.000+0000", "updated": "2011-04-15T02:58:23.000+0000" }, { "id": "126276", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Raising the priority.

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

(from [1c38abac9bea7598b1fa46de18a34e472343454c])\n[#1649 state:fixed-in-qa] Do not try to add null\nform entity to request \nhttps://github.com/appcelerator/titanium_mobile/commit/1c38abac9bea...

{html}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-04-15T02:58:25.000+0000", "updated": "2011-04-15T02:58:25.000+0000" }, { "id": "126278", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

passed regression tested against android 1.6 sim

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:58:25.000+0000", "updated": "2011-04-15T02:58:25.000+0000" }, { "id": "126279", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Matt are you running against more than one sim? If not once\nyou've verified it fixed, please move it into the resolved state\nwhen you comment.

\n

Thanks for tackling these, it's a big help.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:58:25.000+0000", "updated": "2011-04-15T02:58:25.000+0000" }, { "id": "126280", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Yes, I will run it against 1.6 then 2.1 and then move it to\nfixed state; unfortunately once a sim is up its a pain to restart\nit so I have to walk the list with 1.6 and then go back and do them\nagain against 2.1. In the past I have run multiple sims at a time,\nbut my new machine doesn't seem to have the power to handle it. If\nyou thing of a better way let me know.

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:58:25.000+0000", "updated": "2011-04-15T02:58:25.000+0000" }, { "id": "126281", "author": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

passed regression tested against android 2.1 sim.

{html}", "updateAuthor": { "name": "mschmulen", "key": "mschmulen", "displayName": "Matt Schmulen", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:58:26.000+0000", "updated": "2011-04-15T02:58:26.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }