org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@e79ec62)

Appcelerator JIRA | Michael Bahl | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Http requests on android against BasicAuth protected pages fail, when multiple requests are fired before the previous request is completed. I have created a sample project which allows you to send single http requests (x1) which will work and you can execute 10 requests (x10) in a row. The first 5 requests will be executed every 5 seconds, these requests will work as expected. From the sixth request on all remaining 5 requests get fired at once and cause an issue. Sample project: https://github.com/MichelBahl/AC-4446 *Hint:* I watched into network traffic with wireshark, I recognized that when I execute a BasicAuth request the android network module starts two http requests, the first without credentials, these requests ends up with an 401 error, the second one with credentials works as expected, maybe the issue I described is related to this flaw in the network module. *Error Message:* [ERROR] TiHTTPClient: (TiHttpClient-10) [66387,66387] HTTP Error (java.io.IOException): 401 : Access Denied [ERROR] TiHTTPClient: java.io.IOException: 401 : Access Denied [ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1227) [ERROR] TiHTTPClient: at java.lang.Thread.run(Thread.java:818) [ERROR] TiHTTPClient: (TiHttpClient-12) [3,66390] HTTP Error (java.io.IOException): 401 : Access Denied [ERROR] TiHTTPClient: java.io.IOException: 401 : Access Denied [ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1227) [ERROR] TiHTTPClient: at java.lang.Thread.run(Thread.java:818) [ERROR] XMLModule: (main) [3,66393] Error parsing XML [ERROR] XMLModule: org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@e79ec62) [ERROR] XMLModule: at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:146) [ERROR] XMLModule: at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107) [ERROR] XMLModule: at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82) [ERROR] XMLModule: at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:68) [ERROR] XMLModule: at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:562) [ERROR] XMLModule: at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:129) [ERROR] XMLModule: at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method) [ERROR] XMLModule: at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:73) [ERROR] XMLModule: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1155) [ERROR] XMLModule: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] XMLModule: at android.os.Looper.loop(Looper.java:148) [ERROR] XMLModule: at android.app.ActivityThread.main(ActivityThread.java:5417) [ERROR] XMLModule: at java.lang.reflect.Method.invoke(Native Method) [ERROR] XMLModule: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) [ERROR] XMLModule: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) [ERROR] TiHTTPClient: (main) [2,66395] Error parsing XML [ERROR] TiHTTPClient: org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@e79ec62) [ERROR] TiHTTPClient: at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:146) [ERROR] TiHTTPClient: at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107) [ERROR] TiHTTPClient: at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82) [ERROR] TiHTTPClient: at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:68) [ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:562) [ERROR] TiHTTPClient: at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:129) [ERROR] TiHTTPClient: at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method) [ERROR] TiHTTPClient: at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:73) [ERROR] TiHTTPClient: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1155) [ERROR] TiHTTPClient: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] TiHTTPClient: at android.os.Looper.loop(Looper.java:148) [ERROR] TiHTTPClient: at android.app.ActivityThread.main(ActivityThread.java:5417) [ERROR] TiHTTPClient: at java.lang.reflect.Method.invoke(Native Method) [ERROR] TiHTTPClient: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) [ERROR] TiHTTPClient: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

    Appcelerator JIRA | 7 months ago | Michael Bahl
    org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@e79ec62)
  2. 0

    Http requests on android against BasicAuth protected pages fail, when multiple requests are fired before the previous request is completed. I have created a sample project which allows you to send single http requests (x1) which will work and you can execute 10 requests (x10) in a row. The first 5 requests will be executed every 5 seconds, these requests will work as expected. From the sixth request on all remaining 5 requests get fired at once and cause an issue. Sample project: https://github.com/MichelBahl/AC-4446 *Hint:* I watched into network traffic with wireshark, I recognized that when I execute a BasicAuth request the android network module starts two http requests, the first without credentials, these requests ends up with an 401 error, the second one with credentials works as expected, maybe the issue I described is related to this flaw in the network module. *Error Message:* [ERROR] TiHTTPClient: (TiHttpClient-10) [66387,66387] HTTP Error (java.io.IOException): 401 : Access Denied [ERROR] TiHTTPClient: java.io.IOException: 401 : Access Denied [ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1227) [ERROR] TiHTTPClient: at java.lang.Thread.run(Thread.java:818) [ERROR] TiHTTPClient: (TiHttpClient-12) [3,66390] HTTP Error (java.io.IOException): 401 : Access Denied [ERROR] TiHTTPClient: java.io.IOException: 401 : Access Denied [ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1227) [ERROR] TiHTTPClient: at java.lang.Thread.run(Thread.java:818) [ERROR] XMLModule: (main) [3,66393] Error parsing XML [ERROR] XMLModule: org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@e79ec62) [ERROR] XMLModule: at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:146) [ERROR] XMLModule: at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107) [ERROR] XMLModule: at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82) [ERROR] XMLModule: at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:68) [ERROR] XMLModule: at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:562) [ERROR] XMLModule: at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:129) [ERROR] XMLModule: at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method) [ERROR] XMLModule: at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:73) [ERROR] XMLModule: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1155) [ERROR] XMLModule: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] XMLModule: at android.os.Looper.loop(Looper.java:148) [ERROR] XMLModule: at android.app.ActivityThread.main(ActivityThread.java:5417) [ERROR] XMLModule: at java.lang.reflect.Method.invoke(Native Method) [ERROR] XMLModule: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) [ERROR] XMLModule: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) [ERROR] TiHTTPClient: (main) [2,66395] Error parsing XML [ERROR] TiHTTPClient: org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@e79ec62) [ERROR] TiHTTPClient: at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:146) [ERROR] TiHTTPClient: at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107) [ERROR] TiHTTPClient: at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82) [ERROR] TiHTTPClient: at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:68) [ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:562) [ERROR] TiHTTPClient: at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:129) [ERROR] TiHTTPClient: at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method) [ERROR] TiHTTPClient: at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:73) [ERROR] TiHTTPClient: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1155) [ERROR] TiHTTPClient: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] TiHTTPClient: at android.os.Looper.loop(Looper.java:148) [ERROR] TiHTTPClient: at android.app.ActivityThread.main(ActivityThread.java:5417) [ERROR] TiHTTPClient: at java.lang.reflect.Method.invoke(Native Method) [ERROR] TiHTTPClient: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) [ERROR] TiHTTPClient: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

    Appcelerator JIRA | 7 months ago | Michael Bahl
    org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@e79ec62)
  3. 0

    Titanium - PHP+JSON error parsing

    Stack Overflow | 2 years ago | strano
    org.xml.sax.SAXParseException: Unexpected token (position:TEXT {"registered":fa...@2:1 in java.io.InputStreamReader@429a8648)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Can't connect to a node js server in Android

    Stack Overflow | 3 years ago | Uriel Arvizu
    org.xml.sax.SAXParseException: Unexpected token (position:TEXT faa_rzQcGIc9Vzvt...@1:72 in java.io.InputStreamReader@411485a8)
  6. 0

    Appcelerator Developer Center Q&A Unanswered Questions 20

    rssing.com | 2 years ago
    org.xml.sax.SAXParseException: Unexpected token (position:TEXT []@1:3 in java.io.InputStreamReader@423bf438)
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.xml.sax.SAXParseException

    Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@e79ec62)

    at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse()
  2. Android
    DocumentBuilderImpl.parse
    1. org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:146)
    1 frame
  3. Java RT
    DocumentBuilder.parse
    1. javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107)
    1 frame
  4. ti.modules.titanium
    HTTPClientProxy.getResponseXML
    1. ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)
    2. ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:68)
    3. ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:562)
    4. ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:129)
    4 frames
  5. org.appcelerator.kroll
    KrollProxy.handleMessage
    1. org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)
    2. org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:73)
    3. org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1155)
    3 frames
  6. Android Platform
    ActivityThread.main
    1. android.os.Handler.dispatchMessage(Handler.java:98)
    2. android.os.Looper.loop(Looper.java:148)
    3. android.app.ActivityThread.main(ActivityThread.java:5417)
    3 frames
  7. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    1 frame
  8. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
    2 frames