Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17162] Android: TiHTTPClient.getResponseHeader throws NullPointerException

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2014-06-16T14:11:44.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.3.0
ComponentsAndroid
Labelshttp, httpclient, module_android, qe-manualtest
ReporterPier Paolo Ramon
AssigneeHieu Pham
Created2014-06-13T22:24:01.000+0000
Updated2014-08-08T18:55:21.000+0000

Description

[WARN]  W/System.err: java.lang.NullPointerException
[WARN]  W/System.err: 	at ti.modules.titanium.network.TiHTTPClient.getResponseHeader(TiHTTPClient.java:772)
[WARN]  W/System.err: 	at ti.modules.titanium.network.HTTPClientProxy.getResponseHeader(HTTPClientProxy.java:93)
[WARN]  W/System.err: 	at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)
[WARN]  W/System.err: 	at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:69)
[WARN]  W/System.err: 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1121)
[WARN]  W/System.err: 	at android.os.Handler.dispatchMessage(Handler.java:95)
[WARN]  W/System.err: 	at android.os.Looper.loop(Looper.java:137)
[WARN]  W/System.err: 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
At https://github.com/appcelerator/titanium_mobile/blob/3_3_0_RC/android/modules/network/src/java/ti/modules/titanium/network/TiHTTPClient.java#L772 you’re using responseHeaders when theHeaders were used for the non-null check.

Comments

  1. Ingo Muschenetz 2014-06-16

    Thank you for the ticket. Do you have a code snippet you used to reproduce the issue?
  2. Ingo Muschenetz 2014-06-16

    NM. This should have been fixed as a result of a later checkin (see https://github.com/appcelerator/titanium_mobile/pull/5795). Can you confirm it is fixed by using a CI build?
  3. Ingo Muschenetz 2014-06-16

    Fixed as a result of https://github.com/appcelerator/titanium_mobile/pull/5795.
  4. Pier Paolo Ramon 2014-06-16

    I’ll check it as soon as possible, but you could have to wait a day or two. There was another issue associated with this error and I couldn’t tell them apart. Thank you for the responsiveness!
  5. Pier Paolo Ramon 2014-06-17

    It’s no more reproducible with 3.4.0.v20140616174112. Awesome!
  6. Ingo Muschenetz 2014-06-17

    Great to hear. Thanks!
  7. Pier Paolo Ramon 2014-06-17

    Thanks for the great work you’re doing in the 3.3.0 release!
  8. Lokesh Choudhary 2014-06-17

    [~hpham]- can you please provide any test code snippet/steps to test the fix for this ticket.
  9. Lokesh Choudhary 2014-06-19

JSON Source