Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23986] Android: BasicAuth requests fail.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 5.5.1
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterMichael Bahl
AssigneeUnknown
Created2016-09-10T17:09:08.000+0000
Updated2018-02-28T19:55:04.000+0000

Description

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)

Comments

  1. Sharif AbuDarda 2016-10-05

    Hello, I can reproduce the issue with the sample code provided. For me the issue occur on the seventh request. Below is the error log for my test
       [INFO] :   doClickButton
       [INFO] :   b:: 0
       [INFO] :   b:: 1
       [INFO] :   b:: 2
       [INFO] :   b:: 3
       [INFO] :   b:: 4
       [INFO] :   b:: 5
       [INFO] :   b:: 10
       [INFO] :   b:: 10
       [INFO] :   b:: 10
       [INFO] :   b:: 10
       [INFO] :   b:: 10
       [INFO] :   SUCCESS
       [INFO] :   
       [INFO] :   SUCCESS
       [INFO] :   
       [INFO] :   SUCCESS
       [INFO] :   
       [INFO] :   SUCCESS
       [INFO] :   
       [INFO] :   SUCCESS
       [INFO] :   
       [INFO] :   SUCCESS
       [INFO] :   
       [ERROR] :  TiHTTPClient: (TiHttpClient-15) [161459,168162] 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)
       [WARN] :   art: Suspending all threads took: 108.966ms
       [INFO] :   art: Background sticky concurrent mark sweep GC freed 35633(3MB) AllocSpace objects, 16(440KB) LOS objects, 31%% free, 8MB/13MB, paused 123.005ms total 348.572ms
       [ERROR] :  XMLModule: (main) [506,168668] Error parsing XML
       [ERROR] :  XMLModule: org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@6b652a3)
       [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) [0,168668] Error parsing XML
       [ERROR] :  TiHTTPClient: org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@6b652a3)
       [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)
       [WARN] :   TiBlob: (main) [1,168669] getNativePath not supported for non-file blob types.
       [WARN] :   TiBlob: (main) [0,168669] getFile not supported for non-file blob types.
       [INFO] :   Err: {"source":{"connected":false,"status":401,"bubbleParent":true,"password":"058ff5be-7c20-40be-acd6-0d603397b0a3","autoRedirect":true,"tlsVersion":3,"allResponseHeaders":"null:HTTP/1.1 401 Access Denied\nArr-Disable-Session-Affinity:True\nCache-Control:no-cache\nContent-Length:58\nContent-Type:text/html\nDate:Wed, 05 Oct 2016 16:27:26 GMT\nExpires:-1\nPragma:no-cache\nServer:Microsoft-IIS/8.0\nWWW-Authenticate:Basic realm=\"Login with a user name of httpwatch and a different password each time\"\nX-Android-Received-Millis:1475684847028\nX-Android-Response-Source:NETWORK 401\nX-Android-Selected-Protocol:http/1.1\nX-Android-Sent-Millis:1475684846620\nX-AspNet-Version:4.0.30319\nX-Powered-By:ASP.NET\n","autoEncodeUrl":true,"username":"httpwatch","responseXML":null,"statusText":"Access Denied","apiName":"Ti.Network.HTTPClient","validatesSecureCertificate":false,"readyState":3,"domain":null,"responseText":"You do not have permission to view this directory or page.","responseData":{"height":0,"bubbleParent":true,"type":2,"mimeType":"text/html","apiName":"Ti.Blob","nativePath":null,"file":null,"text":"You do not have permission to view this directory or page.","length":58,"width":0},"location":"http://www.httpwatch.com/httpgallery/authentication/authenticatedimage/","connectionType":"GET","_events":{"disposehandle":{}}},"error":"401 : Access Denied","code":401,"success":false}
       [INFO] :   
       [INFO] :   
       [INFO] :   SUCCESS
       [INFO] :   
       [ERROR] :  TiHTTPClient: (TiHttpClient-17) [565,169234] 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) [7,169241] Error parsing XML
       [ERROR] :  XMLModule: org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@5e109a0)
       [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) [0,169241] Error parsing XML
       [ERROR] :  TiHTTPClient: org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@5e109a0)
       [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)
       [WARN] :   TiBlob: (main) [1,169242] getNativePath not supported for non-file blob types.
       [WARN] :   TiBlob: (main) [0,169242] getFile not supported for non-file blob types.
       [INFO] :   Err: {"source":{"connected":false,"status":401,"bubbleParent":true,"password":"5bdafb4c-1371-470a-a5ce-007720334def","autoRedirect":true,"tlsVersion":3,"allResponseHeaders":"null:HTTP/1.1 401 Access Denied\nArr-Disable-Session-Affinity:True\nCache-Control:no-cache\nContent-Length:58\nContent-Type:text/html\nDate:Wed, 05 Oct 2016 16:27:26 GMT\nExpires:-1\nPragma:no-cache\nServer:Microsoft-IIS/8.0\nWWW-Authenticate:Basic realm=\"Login with a user name of httpwatch and a different password each time\"\nX-Android-Received-Millis:1475684848099\nX-Android-Response-Source:NETWORK 401\nX-Android-Selected-Protocol:http/1.1\nX-Android-Sent-Millis:1475684846211\nX-AspNet-Version:4.0.30319\nX-Powered-By:ASP.NET\n","autoEncodeUrl":true,"username":"httpwatch","responseXML":null,"statusText":"Access Denied","apiName":"Ti.Network.HTTPClient","validatesSecureCertificate":false,"readyState":3,"domain":null,"responseText":"You do not have permission to view this directory or page.","responseData":{"height":0,"bubbleParent":true,"type":2,"mimeType":"text/html","apiName":"Ti.Blob","nativePath":null,"file":null,"text":"You do not have permission to view this directory or page.","length":58,"width":0},"location":"http://www.httpwatch.com/httpgallery/authentication/authenticatedimage/","connectionType":"GET","_events":{"disposehandle":{}}},"error":"401 : Access Denied","code":401,"success":false}
       [INFO] :   
       [INFO] :   
       [ERROR] :  TiHTTPClient: (TiHttpClient-18) [197,169439] 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) [1,169440] Error parsing XML
       [ERROR] :  XMLModule: org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@3800959)
       [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) [1,169441] Error parsing XML
       [ERROR] :  TiHTTPClient: org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@3800959)
       [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)
       [WARN] :   TiBlob: (main) [0,169441] getNativePath not supported for non-file blob types.
       [WARN] :   TiBlob: (main) [0,169441] getFile not supported for non-file blob types.
       [INFO] :   Err: {"source":{"connected":false,"status":401,"bubbleParent":true,"password":"e2c6592a-c12f-4cba-87d9-d27156648296","autoRedirect":true,"tlsVersion":3,"allResponseHeaders":"null:HTTP/1.1 401 Access Denied\nArr-Disable-Session-Affinity:True\nCache-Control:no-cache\nContent-Length:58\nContent-Type:text/html\nDate:Wed, 05 Oct 2016 16:27:26 GMT\nExpires:-1\nPragma:no-cache\nServer:Microsoft-IIS/8.0\nWWW-Authenticate:Basic realm=\"Login with a user name of httpwatch and a different password each time\"\nX-Android-Received-Millis:1475684848305\nX-Android-Response-Source:NETWORK 401\nX-Android-Selected-Protocol:http/1.1\nX-Android-Sent-Millis:1475684846633\nX-AspNet-Version:4.0.30319\nX-Powered-By:ASP.NET\n","autoEncodeUrl":true,"username":"httpwatch","responseXML":null,"statusText":"Access Denied","apiName":"Ti.Network.HTTPClient","validatesSecureCertificate":false,"readyState":3,"domain":null,"responseText":"You do not have permission to view this directory or page.","responseData":{"height":0,"bubbleParent":true,"type":2,"mimeType":"text/html","apiName":"Ti.Blob","nativePath":null,"file":null,"text":"You do not have permission to view this directory or page.","length":58,"width":0},"location":"http://www.httpwatch.com/httpgallery/authentication/authenticatedimage/","connectionType":"GET","_events":{"disposehandle":{}}},"error":"401 : Access Denied","code":401,"success":false}
       [INFO] :   
       [INFO] :   
       [ERROR] :  TiHTTPClient: (TiHttpClient-16) [1235,170676] 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) [2,170678] Error parsing XML
       [ERROR] :  XMLModule: org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@433491e)
       [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) [1,170679] Error parsing XML
       [ERROR] :  TiHTTPClient: org.xml.sax.SAXParseException: Unexpected token (position:TEXT You do not have ...@1:59 in java.io.InputStreamReader@433491e)
       [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)
       [WARN] :   TiBlob: (main) [0,170679] getNativePath not supported for non-file blob types.
       [WARN] :   TiBlob: (main) [0,170679] getFile not supported for non-file blob types.
       [INFO] :   Err: {"source":{"connected":false,"status":401,"bubbleParent":true,"password":"203d3098-0700-4a36-8de5-1bfe540e2b88","autoRedirect":true,"tlsVersion":3,"allResponseHeaders":"null:HTTP/1.1 401 Access Denied\nArr-Disable-Session-Affinity:True\nCache-Control:no-cache\nContent-Length:58\nContent-Type:text/html\nDate:Wed, 05 Oct 2016 16:27:29 GMT\nExpires:-1\nPragma:no-cache\nServer:Microsoft-IIS/8.0\nWWW-Authenticate:Basic realm=\"Login with a user name of httpwatch and a different password each time\"\nX-Android-Received-Millis:1475684849542\nX-Android-Response-Source:NETWORK 401\nX-Android-Selected-Protocol:http/1.1\nX-Android-Sent-Millis:1475684849169\nX-AspNet-Version:4.0.30319\nX-Powered-By:ASP.NET\n","autoEncodeUrl":true,"username":"httpwatch","responseXML":null,"statusText":"Access Denied","apiName":"Ti.Network.HTTPClient","validatesSecureCertificate":false,"readyState":3,"domain":null,"responseText":"You do not have permission to view this directory or page.","responseData":{"height":0,"bubbleParent":true,"type":2,"mimeType":"text/html","apiName":"Ti.Blob","nativePath":null,"file":null,"text":"You do not have permission to view this directory or page.","length":58,"width":0},"location":"http://www.httpwatch.com/httpgallery/authentication/authenticatedimage/","connectionType":"GET","_events":{"disposehandle":{}}},"error":"401 : Access Denied","code":401,"success":false}
       [INFO] :   
       [INFO] :   
       
    I am testing on
       Operating System
         Name                        = Mac OS X
         Version                     = 10.11.6
         Architecture                = 64bit
         # CPUs                      = 4
         Memory                      = 8589934592
       Node.js
         Node.js Version             = 4.2.2
         npm Version                 = 2.14.7
       Titanium CLI
         CLI Version                 = 5.0.9
       Titanium SDK
         SDK Version                 = 5.5.1.GA
         Target Platform             = Android 6.0.0
       
    Thanks.

JSON Source