Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26010

Android: TiHTTPClient getResponseHeader throws a NullPointerException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 7.3.0
    • Component/s: Android
    • Environment:

      Ti SDK: 7.1.0.GA
      OS: macOS High Sierra
      Tested on: Android 7

    • Story Points:
      3
    • Sprint:
      2018 Sprint 09 SDK

      Description

      Calling

      http.getResponseHeader()

      throws an exception:

      [WARN]  W/System.err: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.Map.isEmpty()' on a null object reference
      [WARN]  W/System.err: 	at ti.modules.titanium.network.TiHTTPClient.getResponseHeader(TiHTTPClient.java:716)
      [WARN]  W/System.err: 	at ti.modules.titanium.network.HTTPClientProxy.getResponseHeader(HTTPClientProxy.java:135)
      [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:75)
      [WARN]  W/System.err: 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1200)
      [WARN]  W/System.err: 	at android.os.Handler.dispatchMessage(Handler.java:98)
      [WARN]  W/System.err: 	at android.os.Looper.loop(Looper.java:154)
      [WARN]  W/System.err: 	at android.app.ActivityThread.main(ActivityThread.java:6186)
      [WARN]  W/System.err: 	at java.lang.reflect.Method.invoke(Native Method)
      [WARN]  W/System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
      [WARN]  W/System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
      

      I was trying to send some data to sentry.io, maybe inside the response there were no headers.

        Attachments

          Activity

            People

            • Assignee:
              hknoechel Hans Knöchel
              Reporter:
              Andrea.Vitale Andrea Vitale
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6327
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code