Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2555] Ti.Network.HTTPClient and text/calendar

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2013-01-29T18:28:35.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterHans Joachim
AssigneeMauro Parra-Miranda
Created2013-01-25T20:13:58.000+0000
Updated2016-03-08T07:41:37.000+0000

Description

*Problem description* When fetching an iCalender (Mime-Type text/calendar), HTTPClient tries to parse the response data as XML. *Log*
[ERROR][XMLModule(  319)] (KrollRuntimeThread) [713993,794962] Error parsing XML
[ERROR][XMLModule(  319)] org.xml.sax.SAXParseException: unterminated entity ref (position:ENTITY_REF &@210:73 in java.io.InputStreamReader@45156100) 
[ERROR][XMLModule(  319)] 	at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:153)
[ERROR][XMLModule(  319)] 	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:110)
[ERROR][XMLModule(  319)] 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)
[ERROR][XMLModule(  319)] 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:68)
[ERROR][XMLModule(  319)] 	at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:641)
[ERROR][XMLModule(  319)] 	at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:82)
[ERROR][XMLModule(  319)] 	at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)
[ERROR][XMLModule(  319)] 	at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:63)
[ERROR][XMLModule(  319)] 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:932)
[ERROR][XMLModule(  319)] 	at android.os.Handler.dispatchMessage(Handler.java:95)
[ERROR][XMLModule(  319)] 	at android.os.Looper.loop(Looper.java:123)
[ERROR][XMLModule(  319)] 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
[ERROR][TiHttpClient(  319)] (KrollRuntimeThread) [3,794965] Error parsing XML
[ERROR][TiHttpClient(  319)] org.xml.sax.SAXParseException: unterminated entity ref (position:ENTITY_REF &@210:73 in java.io.InputStreamReader@45156100) 
[ERROR][TiHttpClient(  319)] 	at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:153)
[ERROR][TiHttpClient(  319)] 	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:110)
[ERROR][TiHttpClient(  319)] 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)
[ERROR][TiHttpClient(  319)] 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:68)
[ERROR][TiHttpClient(  319)] 	at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:641)
[ERROR][TiHttpClient(  319)] 	at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:82)
[ERROR][TiHttpClient(  319)] 	at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)
[ERROR][TiHttpClient(  319)] 	at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:63)
[ERROR][TiHttpClient(  319)] 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:932)
[ERROR][TiHttpClient(  319)] 	at android.os.Handler.dispatchMessage(Handler.java:95)
[ERROR][TiHttpClient(  319)] 	at android.os.Looper.loop(Looper.java:123)
[ERROR][TiHttpClient(  319)] 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
[DEBUG][dalvikvm(  319)] GC_FOR_MALLOC freed 549 objects / 988256 bytes in 47ms
[ERROR][XMLModule(  319)] (KrollRuntimeThread) [370,795335] Error parsing XML
[ERROR][XMLModule(  319)] org.xml.sax.SAXParseException: unterminated entity ref (position:ENTITY_REF &@210:73 in java.io.InputStreamReader@45151048) 
[ERROR][XMLModule(  319)] 	at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:153)
[ERROR][XMLModule(  319)] 	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:110)
[ERROR][XMLModule(  319)] 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)
[ERROR][XMLModule(  319)] 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:68)
[ERROR][XMLModule(  319)] 	at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:641)
[ERROR][XMLModule(  319)] 	at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:82)
[ERROR][XMLModule(  319)] 	at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)
[ERROR][XMLModule(  319)] 	at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:63)
[ERROR][XMLModule(  319)] 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:932)
[ERROR][XMLModule(  319)] 	at android.os.Handler.dispatchMessage(Handler.java:95)
[ERROR][XMLModule(  319)] 	at android.os.Looper.loop(Looper.java:123)
[ERROR][XMLModule(  319)] 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
[ERROR][TiHttpClient(  319)] (KrollRuntimeThread) [3,795338] Error parsing XML
[ERROR][TiHttpClient(  319)] org.xml.sax.SAXParseException: unterminated entity ref (position:ENTITY_REF &@210:73 in java.io.InputStreamReader@45151048) 
[ERROR][TiHttpClient(  319)] 	at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:153)
[ERROR][TiHttpClient(  319)] 	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:110)
[ERROR][TiHttpClient(  319)] 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)
[ERROR][TiHttpClient(  319)] 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:68)
[ERROR][TiHttpClient(  319)] 	at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:641)
[ERROR][TiHttpClient(  319)] 	at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:82)
[ERROR][TiHttpClient(  319)] 	at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)
[ERROR][TiHttpClient(  319)] 	at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:63)
[ERROR][TiHttpClient(  319)] 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:932)
[ERROR][TiHttpClient(  319)] 	at android.os.Handler.dispatchMessage(Handler.java:95)
[ERROR][TiHttpClient(  319)] 	at android.os.Looper.loop(Looper.java:123)
[ERROR][TiHttpClient(  319)] 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
[DEBUG][dalvikvm(  319)] GC_FOR_MALLOC freed 552 objects / 988368 bytes in 42ms
[ERROR][XMLModule(  319)] (KrollRuntimeThread) [359,795697] Error parsing XML
[ERROR][XMLModule(  319)] org.xml.sax.SAXParseException: unterminated entity ref (position:ENTITY_REF &@210:73 in java.io.InputStreamReader@45151048) 
[ERROR][XMLModule(  319)] 	at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:153)
[ERROR][XMLModule(  319)] 	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:110)
[ERROR][XMLModule(  319)] 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)
[ERROR][XMLModule(  319)] 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:68)
[ERROR][XMLModule(  319)] 	at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:641)
[ERROR][XMLModule(  319)] 	at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:82)
[ERROR][XMLModule(  319)] 	at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)
[ERROR][XMLModule(  319)] 	at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:63)
[ERROR][XMLModule(  319)] 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:932)
[ERROR][XMLModule(  319)] 	at android.os.Handler.dispatchMessage(Handler.java:95)
[ERROR][XMLModule(  319)] 	at android.os.Looper.loop(Looper.java:123)
[ERROR][XMLModule(  319)] 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
[ERROR][TiHttpClient(  319)] (KrollRuntimeThread) [4,795701] Error parsing XML
[ERROR][TiHttpClient(  319)] org.xml.sax.SAXParseException: unterminated entity ref (position:ENTITY_REF &@210:73 in java.io.InputStreamReader@45151048) 
[ERROR][TiHttpClient(  319)] 	at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:153)
[ERROR][TiHttpClient(  319)] 	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:110)
[ERROR][TiHttpClient(  319)] 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)
[ERROR][TiHttpClient(  319)] 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:68)
[ERROR][TiHttpClient(  319)] 	at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:641)
[ERROR][TiHttpClient(  319)] 	at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:82)
[ERROR][TiHttpClient(  319)] 	at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)
[ERROR][TiHttpClient(  319)] 	at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:63)
[ERROR][TiHttpClient(  319)] 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:932)
[ERROR][TiHttpClient(  319)] 	at android.os.Handler.dispatchMessage(Handler.java:95)
[ERROR][TiHttpClient(  319)] 	at android.os.Looper.loop(Looper.java:123)
[ERROR][TiHttpClient(  319)] 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
[WARN][TiBlob  (  319)] (KrollRuntimeThread) [16709,812410] getFile not supported for non-file blob types.
[WARN][TiBlob  (  319)] (KrollRuntimeThread) [17,812427] getNativePath not supported for non-file blob types.
[DEBUG][dalvikvm(  319)] GC_FOR_MALLOC freed 559 objects / 989984 bytes in 41ms
[DEBUG][dalvikvm(  319)] GC_FOR_MALLOC freed 12 objects / 616 bytes in 41ms
[INFO][dalvikvm-heap(  319)] Grow heap (frag case) to 9.249MB for 555730-byte allocation
[DEBUG][dalvikvm(  319)] GC_FOR_MALLOC freed 0 objects / 0 bytes in 120ms
[ERROR][Proxy   (  319)] Unable to lookup Proxy.prototype.getProperty

Comments

  1. Daniel Sefton 2013-01-29

    Thanks for the report, but we need a lot more information, including: Studio version, SDK version, Android OS version and device or emulator (looks like an Android report from the logs). Most importantly we need some code. If you could provide a simple test case that we can run ourselves, that would be great.

JSON Source