Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6411] Android: HTTPClient - send() creates benign error messages in log

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-03-11T22:33:31.000+0000
Affected Version/sRelease 1.7.5, Release 1.8.0, Release 1.8.0.1
Fix Version/sSprint 2012-02, Release 2.0.0, Release 1.8.1
ComponentsAndroid
Labelsmodule_network, qe-testadded
ReporterTony Lukasavage
AssigneeJosh Roesslein
Created2011-12-01T12:53:50.000+0000
Updated2012-03-11T22:33:31.000+0000

Description

Issue

----- The HTTPClient test case listed below throws a series of exceptions in the android log, citing missing libraries and constants for constructing the outgoing HTTP request. The exceptions *DO NOT* impact the functionality of HTTPClient, the call still works, it just throws a lot of ugly errors.

Test case

-----
var win = Ti.UI.createWindow({
	backgroundColor: '#fff',
	navBarHidden: true,
	exitOnClose: true	
});

var xhr = Titanium.Network.createHTTPClient();
xhr.open('GET', 'http://www.google.com');
xhr.send();

win.open();

Log

-----
12-01 15:43:07.359: ERROR/dalvikvm(564): Could not find class 'org.apache.http.entity.mime.content.StringBody', referenced from method ti.modules.titanium.network.TiHTTPClient.addPostData
12-01 15:43:07.359: WARN/dalvikvm(564): VFY: unable to resolve new-instance 866 (Lorg/apache/http/entity/mime/content/StringBody;) in Lti/modules/titanium/network/TiHTTPClient;
12-01 15:43:07.359: DEBUG/dalvikvm(564): VFY: replacing opcode 0x22 at 0x000a
12-01 15:43:07.359: DEBUG/dalvikvm(564): VFY: dead code 0x000c-0014 in Lti/modules/titanium/network/TiHTTPClient;.addPostData (Ljava/lang/String;Ljava/lang/String;)V
12-01 15:43:07.359: ERROR/dalvikvm(564): Could not find class 'org.apache.http.entity.mime.content.FileBody', referenced from method ti.modules.titanium.network.TiHTTPClient.addTitaniumFileAsPostData
12-01 15:43:07.369: WARN/dalvikvm(564): VFY: unable to resolve new-instance 865 (Lorg/apache/http/entity/mime/content/FileBody;) in Lti/modules/titanium/network/TiHTTPClient;
12-01 15:43:07.369: DEBUG/dalvikvm(564): VFY: replacing opcode 0x22 at 0x0008
12-01 15:43:07.369: ERROR/dalvikvm(564): Could not find class 'org.apache.http.entity.mime.content.FileBody', referenced from method ti.modules.titanium.network.TiHTTPClient.addTitaniumFileAsPostData
12-01 15:43:07.369: WARN/dalvikvm(564): VFY: unable to resolve new-instance 865 (Lorg/apache/http/entity/mime/content/FileBody;) in Lti/modules/titanium/network/TiHTTPClient;
12-01 15:43:07.369: DEBUG/dalvikvm(564): VFY: replacing opcode 0x22 at 0x0062
12-01 15:43:07.379: DEBUG/dalvikvm(564): VFY: dead code 0x000a-0026 in Lti/modules/titanium/network/TiHTTPClient;.addTitaniumFileAsPostData (Ljava/lang/String;Ljava/lang/Object;)I
12-01 15:43:07.379: DEBUG/dalvikvm(564): VFY: dead code 0x0064-0070 in Lti/modules/titanium/network/TiHTTPClient;.addTitaniumFileAsPostData (Ljava/lang/String;Ljava/lang/Object;)I
12-01 15:43:07.439: DEBUG/TiHttpClient(564): (KrollRuntimeThread) [1991,3653] Setting ready state to 1
12-01 15:43:07.450: ERROR/dalvikvm(564): Could not find class 'org.apache.http.entity.mime.MultipartEntity', referenced from method ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run
12-01 15:43:07.450: WARN/dalvikvm(564): VFY: unable to resolve new-instance 863 (Lorg/apache/http/entity/mime/MultipartEntity;) in Lti/modules/titanium/network/TiHTTPClient$ClientRunnable;
12-01 15:43:07.450: DEBUG/dalvikvm(564): VFY: replacing opcode 0x22 at 0x00e4
12-01 15:43:07.470: DEBUG/dalvikvm(564): VFY: dead code 0x00e6-016a in Lti/modules/titanium/network/TiHTTPClient$ClientRunnable;.run ()V
12-01 15:43:07.470: DEBUG/dalvikvm(564): VFY: dead code 0x01ff-027d in Lti/modules/titanium/network/TiHTTPClient$ClientRunnable;.run ()V
12-01 15:43:07.480: DEBUG/dalvikvm(564): VFY: dead code 0x0331-0346 in Lti/modules/titanium/network/TiHTTPClient$ClientRunnable;.run ()V

Comments

  1. Andrew Skinner 2011-12-31

    Due to the missing class org.apache.http.entity.mime.content.StringBody we are unable to POST files using the HTTPClient. This is critical for our app, and I would think a lot of others. Counter to the poster of the issue, this problem definitely DOES affect functionality of the HTTPClient.
  2. Josh Roesslein 2012-01-11

    Resolved by [PR #1158](https://github.com/appcelerator/titanium_mobile/pull/1158).
  3. Wilson Luu 2012-01-13

    Closing bug. Verified fix on: SDK build: 1.9.0.v20120112153134 Runtime: V8, Rhino Titanium Studio, build: 1.0.8.201201122152 Device: Droid 3 (2.3.4)
  4. Bharat Bhushan 2012-02-09

    I am also facing the same issue............. Fetching "app.js" with Fastdev... D/dalvikvm( 359): GREF has increased to 201 E/dalvikvm( 359): Could not find class 'org.apache.http.entity.mime.content.StringBody', referenced from method ti.modules.titanium.network.TiHTTPClient.addPostData W/dalvikvm( 359): VFY: unable to resolve new-instance 695 (Lorg/apache/http/entity/mime/content/StringBody;) in Lti/modules/titanium/network/TiHTTPClient; D/dalvikvm( 359): VFY: replacing opcode 0x22 at 0x000a D/dalvikvm( 359): VFY: dead code 0x000c-0014 in Lti/modules/titanium/network/TiHTTPClient;.addPostData (Ljava/lang/String;Ljava/lang/String;)V E/dalvikvm( 359): Could not find class 'org.apache.http.entity.mime.content.FileBody', referenced from method ti.modules.titanium.network.TiHTTPClient.addTitaniumFileAsPostData W/dalvikvm( 359): VFY: unable to resolve new-instance 694 (Lorg/apache/http/entity/mime/content/FileBody;) in Lti/modules/titanium/network/TiHTTPClient; D/dalvikvm( 359): VFY: replacing opcode 0x22 at 0x0008 E/dalvikvm( 359): Could not find class 'org.apache.http.entity.mime.content.FileBody', referenced from method ti.modules.titanium.network.TiHTTPClient.addTitaniumFileAsPostData W/dalvikvm( 359): VFY: unable to resolve new-instance 694 (Lorg/apache/http/entity/mime/content/FileBody;) in Lti/modules/titanium/network/TiHTTPClient; D/dalvikvm( 359): VFY: replacing opcode 0x22 at 0x0062 D/dalvikvm( 359): VFY: dead code 0x000a-0026 in Lti/modules/titanium/network/TiHTTPClient;.addTitaniumFileAsPostData (Ljava/lang/String;Ljava/lang/Object;)I D/dalvikvm( 359): VFY: dead code 0x0064-0070 in Lti/modules/titanium/network/TiHTTPClient;.addTitaniumFileAsPostData (Ljava/lang/String;Ljava/lang/Object;)I D/TiHttpClient( 359): (KrollRuntimeThread) [449,2153] Setting ready state to 1 E/dalvikvm( 359): Could not find class 'org.apache.http.entity.mime.MultipartEntity', referenced from method ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run W/dalvikvm( 359): VFY: unable to resolve new-instance 692 (Lorg/apache/http/entity/mime/MultipartEntity;) in Lti/modules/titanium/network/TiHTTPClient$ClientRunnable; D/dalvikvm( 359): VFY: replacing opcode 0x22 at 0x00d0 D/dalvikvm( 359): VFY: dead code 0x00d2-0152 in Lti/modules/titanium/network/TiHTTPClient$ClientRunnable;.run ()V D/dalvikvm( 359): VFY: dead code 0x01e1-025a in Lti/modules/titanium/network/TiHTTPClient$ClientRunnable;.run ()V D/dalvikvm( 359): VFY: dead code 0x0301-0314 in Lti/modules/titanium/network/TiHTTPClient$ClientRunnable;.run ()V D/dalvikvm( 120): GREF has increased to 201 I/ActivityManager( 62): Starting: Intent { cmp=com.appcelerator.com/ti.modules.titanium.ui.TiTabActivity (has extras) } from pid 359
  5. Neeraj Gupta 2012-02-09

    Bharat - Do you see these messages even with the latest master CI build?

JSON Source