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

Android: Ti.Network.HttpClient JSON response text is truncated

    Details

      Description

      In Ti.Network.HttpClient API this.responseText is truncated and incomplete in case of android while its complete in case of IOS.

      Please find the attached app.js and media.js to reproduce the same. Folowing error occurs:

      E/V8Exception( 2937): Exception occurred at app.js:22: Uncaught TypeError: Cannot read property '0' of undefined
      E/XMLModule( 2937): (KrollRuntimeThread) [136,7131] Error parsing XML
      E/XMLModule( 2937): org.xml.sax.SAXParseException: Unexpected token (position:TEXT )]}'{"conn": "mo...@1:10771 in java.io.InputStreamReader@4245c080) 
      E/XMLModule( 2937):     at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:146)
      E/XMLModule( 2937):     at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107)
      E/XMLModule( 2937):     at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)
      E/XMLModule( 2937):     at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:624)
      E/XMLModule( 2937):     at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:84)
      E/XMLModule( 2937):     at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)
      E/XMLModule( 2937):     at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:58)
      E/XMLModule( 2937):     at org.appcelerator.kroll.runtime.v8.V8Function.call(V8Function.java:44)
      E/XMLModule( 2937):     at org.appcelerator.kroll.runtime.v8.V8Function$1.run(V8Function.java:71)
      E/XMLModule( 2937):     at android.os.Handler.handleCallback(Handler.java:615)
      E/XMLModule( 2937):     at android.os.Handler.dispatchMessage(Handler.java:92)
      E/XMLModule( 2937):     at android.os.Looper.loop(Looper.java:137)
      E/XMLModule( 2937):     at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:109)
      E/TiHttpClient( 2937): (KrollRuntimeThread) [13,7144] Error parsing XML
      E/TiHttpClient( 2937): org.xml.sax.SAXParseException: Unexpected token (position:TEXT )]}'{"conn": "mo...@1:10771 in java.io.InputStreamReader@4245c080) 
      E/TiHttpClient( 2937):  at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:146)
      E/TiHttpClient( 2937):  at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107)
      E/TiHttpClient( 2937):  at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)
      E/TiHttpClient( 2937):  at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:624)
      E/TiHttpClient( 2937):  at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:84)
      E/TiHttpClient( 2937):  at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)
      E/TiHttpClient( 2937):  at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:58)
      E/TiHttpClient( 2937):  at org.appcelerator.kroll.runtime.v8.V8Function.call(V8Function.java:44)
      E/TiHttpClient( 2937):  at org.appcelerator.kroll.runtime.v8.V8Function$1.run(V8Function.java:71)
      E/TiHttpClient( 2937):  at android.os.Handler.handleCallback(Handler.java:615)
      E/TiHttpClient( 2937):  at android.os.Handler.dispatchMessage(Handler.java:92)
      E/TiHttpClient( 2937):  at android.os.Looper.loop(Looper.java:137)
      E/TiHttpClient( 2937):  at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:109)
      

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              rsharma Rupesh Sharma
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code