Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12992] Android: Ti.Network.HttpClient JSON response text is truncated

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionInvalid
Resolution Date2013-03-30T06:42:12.000+0000
Affected Version/sRelease 3.0.0, Release 3.0.2
Fix Version/s2013 Sprint 07 API, 2013 Sprint 07
ComponentsAndroid
LabelssupportTeam, triage
ReporterRupesh Sharma
AssigneeVishal Duggal
Created2013-03-07T12:21:18.000+0000
Updated2017-03-29T22:36:46.000+0000

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

FileDateSize
app.js2013-03-07T12:21:18.000+00001586
media.js2013-03-07T12:21:18.000+00001718

Comments

  1. Rupesh Sharma 2013-03-07

    "Note to Self" http://support-admin.appcelerator.com/display/APP-768133
  2. Ingo Muschenetz 2013-03-14

    Is this true for all calls, or just the one in particular shown in the sample?
  3. Eric Merriman 2013-03-14

    Using sample code above: verified does not occur with iOS verified occurs on Android with sample code, and changed the video ID in some tests: Droid 1 - 2.2.3 Nexus 4 - 4.2 Droid 3 - 2.3.4 Results differed slightly by OS, but common error: 03-14 15:32:21.531 1886 1894 E V8Exception: Exception occurred at app.js:23: Uncaught TypeError: Cannot read property '0' of undefined Droid 3 returned some JSON:
       03-14 15:41:09.109  2072  2080 D TiAPI   :  vdrld: Resulting JSON was: "{\"signed_in_username\": \"\", \"result\": \"ok\", \"content\": {\"subscribe_xsrf_token\": \"\", \"allow_comments\": true, \"ptracking\": \"\\/\\/www.youtube.com\\/ptracking?ptk=youtube_none\\u0026pltype=contentugc\\u0026video_id=AO2GwKAfEqY\", \"pyv_ping_url\": null, \"next_url\": \"\\/results?search=related\\u0026q=\\u0026p=2\\u0026v=AO2GwKAfEqY\\u0026ps=12\", \"related_videos\": [{\"watch_link\": \"\\/watch?feature=fvwrel\\u0026v=xHrSTrtyOyU\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/xHrSTrtyOyU\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=vX7T-Q0rIiZI80HoJ8VkSGipwKA\", \"encrypted_id\": \"xHrSTrtyOyU\", \"playability\": \"NO_PREFETCH\", \"view_count\": \"2,837\", \"public_name\": \"dermTVdotcom\", \"related_feature\": \"fvwrel\", \"thumbnail_info\": {\"thumb_width\": 120, \"width\": 128, \"url\": \"http:\\/\\/i.ytimg.com\\/vt?cids=xHrSTrtyOyU,0w2Lo_nYRPs,XbqBwaPeQLE,jrqRP7B8G1o,1xVsO9MyRC4,D6mHxyLguhQ,TdSToUqzZ3E,--EpUAsphkw,Qz9D_ikSo84,PgJlVwbFVhA,Y-FPQiYXTmM,fDwigwLwd5A,iza6-Ovkjxg\\u0026w=120\\u0026h=72\\u0026sigh=5AWKPGxeiw7yGCqqM4fM180UtLE\", \"stitched\": 1, \"height\": 1040, \"thumb_height\": 72, \"posx\": 0, \"posy\": 0}, \"duration\": \"3:13\", \"title\": \"DermTV - Skin Cancer Self Examinations [DermTV.com Epi #189]\"}, {\"watch_link\": \"\\/watch?feature=relmfu\\u0026v=0w2Lo_nYRPs\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/0w2Lo_nYRPs\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=-pq48K-Vkbjd48VQ49gszuOlogY\", \"encrypted_id\": \"0w2Lo_nYRPs\", \"playability\": \"NO_PREFETCH\", \"view_count\": \"29\", \"public_name\": \"UMHealthSystem\", \"related_feature\": \"relmfu\", \"thumbnail_info\": {\"thumb_width\": 120, \"width\": 128, \"url\": \"http:\\/\\/i.ytimg.com\\/vt?cids=xHrSTrtyOyU,0w2Lo_nYRPs,XbqBwaPeQLE,jrqRP7B8G1o,1xVsO9MyRC4,D6mHxyLguhQ,TdSToUqzZ3E,--EpUAsphkw,Qz9D_ikSo84,PgJlVwbFVhA,Y-FPQiYXTmM,fDwigwLwd5A,iza6-Ovkjxg\\u0026w=120\\u0026h=72\\u0026sigh=5AWKPGxeiw7yGCqqM4fM180UtLE\", \"stitched\": 1, \"height\": 1040, \"thumb_height\": 72, \"posx\": 0, \"posy\": 80}, \"duration\": \"59:17\", \"title\": \"Lung Transplant Education\"}, {\"watch_link\": \"\\/watch?feature=relmfu\\u0026v=XbqBwaPeQLE\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/XbqBwaPeQLE\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=auwm1KHHnQkoTo81yQNiE16bu4Y\", \"encrypted_id\": \"XbqBwaPeQLE\", \"playability\": \"NO_PREFETCH\", \"view_count\": \"32\", \"public_name\": \"UMHealthSystem\", \"related_feature\": \"relmfu\", \"thumbnail_info\": {\"thumb_width\": 120, \"width\": 128, \"url\": \"http:\\/\\/i.ytimg.com\\/vt?cids=xHrSTrtyOyU,0w2Lo_nYRPs,XbqBwaPeQLE,jrqRP7B8G1o,1xVsO9MyRC4,D6mHxyLguhQ,TdSToUqzZ3E,--EpUAsphkw,Qz9D_ikSo84,PgJlVwbFVhA,Y-FPQiYXTmM,fDwigwLwd5A,iza6-Ovkjxg\\u0026w=120\\u0026h=72\\u0026sigh=5AWKPGxeiw7yGCqqM4fM180UtLE\", \"stitched\": 1, \"height\": 1040, \"thumb_height\": 72, \"posx\": 0, \"posy\": 160}, \"duration\": \"36:52\", \"title\": \"Kidney and Pancreas Transplant Education\"}, {\"watch_link\": \"\\/watch?feature=relmfu\\u0026v=jrqRP7B8G1o\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/jrqRP7B8G1o\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=KUl1uPb7v3hKVdn-62Jn_V17Ufg\", \"encrypted_id\": \"jrqRP7B8G1o\", \"playability\": \"NO_PREFETCH\", \"view_count\": \"25\", \"public_name\": \"UMHealthSystem\", \"related_feature\": \"relmfu\", \"thumbnail_info\": {\"thumb_width\": 120, \"width\": 128, \"url\": \"http:\\/\\/i.ytimg.com\\/vt?cids=xHrSTrtyOyU,0w2Lo_nYRPs,XbqBwaPeQLE,jrqRP7B8G1o,1xVsO9MyRC4,D6mHxyLguhQ,TdSToUqzZ3E,--EpUAsphkw,Qz9D_ikSo84,PgJlVwbFVhA,Y-FPQiYXTmM,fDwigwLwd5A,iza6-Ovkjxg\\u0026w=120\\u0026h=72\\u0026sigh=5AWKPGxeiw7yGCqqM4fM180UtLE\", \"stitched\": 1, \"height\": 1040, \"thumb_height\": 72, \"posx\": 0, \"posy\": 240}, \"duration\": \"21:33\", \"title\": \"Kidney Donor Education\"}, {\"watch_link\": \"\\/watch?feature=relmfu\\u0026v=1xVsO9MyRC4\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/1xVsO9MyRC4\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=wgCGITIi6Ds9WSgWwKWCf
       
    Nexus 4:
       
       D/TiAPI   ( 6712):  vdrld: Resulting JSON was: "{\"content\": {\"video\": {\"likes_num\": 3, \"user_image_url\": \"\\/\\/i3.ytimg.com\\/i\\/fp5MBK2IC90Bdm5IQUJvYw\\/1.jpg?v=712528\", \"comment_count\": 4, \"thumbnail_info\": null, \"length_seconds\": 151, \"encrypted_id\": \"AO2GwKAfEqY\", \"dislikes_num\": 1, \"public_name\": \"UMHealthSystem\", \"description\": \"Dr. Michael Sabel from the University of Michigan Multidisciplinary Melanoma Clinic talks about melanoma and the importance of skin cancer self-exam especially for those who are at a high risk for skin cancer. Dr. Sabel introduces the University of Michigan's new Mobile App: UMSkinCheck which helps you complete a self-exam. For more information visit: www.uofmhealth.org\\/umskincheck\", \"longform\": false, \"playability\": \"PLAY_OK\", \"hq_stream_url\": \"\", \"watch_link\": \"\\/watch?v=AO2GwKAfEqY\", \"stream_url\": \"rtsp:\\/\\/v3.cache5.c.youtube.com\\/CjYLENy73wIaLQmmEh-gwIbtABMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYMSgo5ekx5ShUQw=\\/0\\/0\\/0\\/video.3gp\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/AO2GwKAfEqY\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=GSHLS-pOgF89vQ6_hl86j1QeTf0\", \"player_type\": \"rtsp\", \"duration\": \"2:31\", \"view_count\": \"2,573\", \"time_created_text\": \"May 17, 2012\", \"profile_url\": \"\\/user\\/UMHealthSystem\", \"title\": \"Introducing UMSkinCheck, a Mobile Skin Check App from the University of Michigan\"}, \"ptracking\": \"\\/\\/www.youtube.com\\/ptracking?ptk=youtube_none\\u0026pltype=contentugc\\u0026video_id=AO2GwKAfEqY\", \"subscribe_xsrf_token\": \"\", \"subscription_state\": {\"is_subscribed\": false, \"subscribe_url\": {\"url\": \"\\/channel_post?action_subscribe=1\\u0026feature=watch\", \"channel_id\": \"UCfp5MBK2IC90Bdm5IQUJvYw\"}, \"show_button\": true}, \"branding\": null, \"pyv_ping_url\": null, \"sentiment_xsrf_token\": \"\", \"next_url\": \"\\/results?search=related\\u0026q=\\u0026p=2\\u0026v=AO2GwKAfEqY\\u0026ps=12\", \"allow_comments\": true, \"related_videos\": [{\"thumbnail_info\": {\"thumb_height\": 72, \"height\": 1040, \"width\": 128, \"thumb_width\": 120, \"posx\": 0, \"posy\": 0, \"url\": \"http:\\/\\/i.ytimg.com\\/vt?cids=xHrSTrtyOyU,0w2Lo_nYRPs,XbqBwaPeQLE,jrqRP7B8G1o,1xVsO9MyRC4,D6mHxyLguhQ,TdSToUqzZ3E,--EpUAsphkw,Qz9D_ikSo84,PgJlVwbFVhA,Y-FPQiYXTmM,fDwigwLwd5A,iza6-Ovkjxg\\u0026w=120\\u0026h=72\\u0026sigh=5AWKPGxeiw7yGCqqM4fM180UtLE\", \"stitched\": 1}, \"encrypted_id\": \"xHrSTrtyOyU\", \"playability\": \"NO_PREFETCH\", \"public_name\": \"dermTVdotcom\", \"watch_link\": \"\\/watch?feature=fvwrel\\u0026v=xHrSTrtyOyU\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/xHrSTrtyOyU\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=vX7T-Q0rIiZI80HoJ8VkSGipwKA\", \"duration\": \"3:13\", \"related_feature\": \"fvwrel\", \"view_count\": \"2,837\", \"title\": \"DermTV - Skin Cancer Self Examinations [DermTV.com Epi #189]\"}, {\"thumbnail_info\": {\"thumb_height\": 72, \"height\": 1040, \"width\": 128, \"thumb_width\": 120, \"posx\": 0, \"posy\": 80, \"url\": \"http:\\/\\/i.ytimg.com\\/vt?cids=xHrSTrtyOyU,0w2Lo_nYRPs,XbqBwaPeQLE,jrqRP7B8G1o,1xVsO9MyRC4,D6mHxyLguhQ,TdSToUqzZ3E,--EpUAsphkw,Qz9D_ikSo84,PgJlVwbFVhA,Y-FPQiYXTmM,fDwigwLwd5A,iza6-Ovkjxg\\u0026w=120\\u0026h=72\\u0026sigh=5AWKPGxeiw7yGCqqM4fM180UtLE\", \"stitched\": 1}, \"encrypted_id\": \"0w2Lo_nYRPs\", \"playability\": \"NO_PREFETCH\", \"public_name\": \"UMHealthSystem\", \"watch_link\": \"\\/watch?feature=relmfu\\u0026v=0w2Lo_nYRPs\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/0w2Lo_nYRPs\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=-pq48K-Vkbjd48VQ49gszuOlogY\", \"duration\": \"59:17\", \"related_feature\": \"relmfu\", \"view_count\": \"29\", \"title\": \"Lung Transplant Education\"}, {\"thumbnail_info\": {\"thumb_height\": 72, \"height\": 1040, \"width\": 128, \"thumb_width\": 120, \"posx\": 0, \"posy\": 160, \"url\": \"http:\\/\\/i.ytimg.com\\/vt?cids=xHrSTrtyOyU,0w2Lo_nYRPs,XbqBwaPeQLE,jrqRP7B8G1o,1xVsO9MyRC4,D6mHxyLguhQ,TdSToUqzZ3E,--EpUAsphkw,Qz9D_ikSo84,PgJlVwbFVhA,Y-FPQiYXTmM,fDwigwLwd5A,iza6-
       E/V8Exception( 6712): Exception occurred at app.js:23: Uncaught TypeError: Cannot read property '0' of undefined
       E/XMLModule( 6712): (KrollRuntimeThread) [5609,5609] Error parsing XML
       E/XMLModule( 6712): org.xml.sax.SAXParseException: Unexpected token (position:TEXT )]}'{"content": ...@1:12450 in java.io.InputStreamReader@41ea5948) 
       E/XMLModule( 6712): 	at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:146)
       E/XMLModule( 6712): 	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107)
       E/XMLModule( 6712): 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)
       E/XMLModule( 6712): 	at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:647)
       E/XMLModule( 6712): 	at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:93)
       E/XMLModule( 6712): 	at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)
       E/XMLModule( 6712): 	at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:69)
       E/XMLModule( 6712): 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:993)
       E/XMLModule( 6712): 	at android.os.Handler.dispatchMessage(Handler.java:95)
       E/XMLModule( 6712): 	at android.os.Looper.loop(Looper.java:137)
       E/XMLModule( 6712): 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
       E/TiHttpClient( 6712): (KrollRuntimeThread) [3,5612] Error parsing XML
       E/TiHttpClient( 6712): org.xml.sax.SAXParseException: Unexpected token (position:TEXT )]}'{"content": ...@1:12450 in java.io.InputStreamReader@41ea5948) 
       E/TiHttpClient( 6712): 	at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:146)
       E/TiHttpClient( 6712): 	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107)
       E/TiHttpClient( 6712): 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)
       E/TiHttpClient( 6712): 	at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:647)
       E/TiHttpClient( 6712): 	at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:93)
       E/TiHttpClient( 6712): 	at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)
       E/TiHttpClient( 6712): 	at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:69)
       E/TiHttpClient( 6712): 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:993)
       E/TiHttpClient( 6712): 	at android.os.Handler.dispatchMessage(Handler.java:95)
       E/TiHttpClient( 6712): 	at android.os.Looper.loop(Looper.java:137)
       E/TiHttpClient( 6712): 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
       
    Droid 1:
       D/TiAPI   ( 1780):  vdrld: Resulting JSON was: "{\"build_id\": 1363281751, \"build_signature\": \"en:900824,902000,906938,908529,912806,913605,919512,920201,926403,929602,929901,930101,930603,930803,930807,931202,931203,931401\", \"signed_in_username\": \"\", \"result\": \"ok\", \"content\": {\"next_url\": \"\\/results?search=related\\u0026q=\\u0026p=2\\u0026ps=12\\u0026v=QYCJ8EvkGCs\", \"ptracking\": \"\\/\\/www.youtube.com\\/ptracking?video_id=QYCJ8EvkGCs\\u0026pltype=contentugc\\u0026ptk=youtube_multi\", \"video\": {\"public_name\": \"zmzhong7\", \"longform\": false, \"description\": \" \", \"encrypted_id\": \"QYCJ8EvkGCs\", \"stream_url\": \"rtsp:\\/\\/v7.cache5.c.youtube.com\\/CjYLENy73wIaLQkrGORL8ImAQRMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYOiJ_4bm3JOhUQw=\\/0\\/0\\/0\\/video.3gp\", \"watch_link\": \"\\/watch?v=QYCJ8EvkGCs\", \"player_type\": \"rtsp\", \"playability\": \"PLAY_OK\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/QYCJ8EvkGCs\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=SfB0KoGCWe1oTmfkdjhe1VsgqaY\", \"dislikes_num\": 9, \"likes_num\": 390, \"comment_count\": 31, \"thumbnail_info\": null, \"title\": \"One Thing Remains [Lyrics] - Kristian Stanfill\", \"view_count\": \"70,477\", \"duration\": \"5:58\", \"profile_url\": \"\\/user\\/zmzhong7\", \"time_created_text\": \"Aug  9, 2012\", \"hq_stream_url\": \"\", \"user_image_url\": \"\\/\\/s.ytimg.com\\/yts\\/img\\/silhouette32-vflu0yzhs.png\", \"length_seconds\": 358}, \"sentiment_xsrf_token\": \"\", \"related_videos\": [{\"public_name\": \"TheBrentsfilms\", \"encrypted_id\": \"GoYgi0sdOqc\", \"watch_link\": \"\\/watch?feature=fvwrel\\u0026v=GoYgi0sdOqc\", \"playability\": \"NO_PREFETCH\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/GoYgi0sdOqc\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=NZoVvZELc6zUYm9u6pFbkcMGrIY\", \"related_feature\": \"fvwrel\", \"thumbnail_info\": {\"thumb_width\": 120, \"url\": \"http:\\/\\/i.ytimg.com\\/vt?cids=GoYgi0sdOqc,y_VR-zwp2KA,lOmkDx2bzic,-oOJd7nsorY,NATl1SrW6RQ,ktfrruF4-No,SZ-fghqc8Oo,GoYgi0sdOqc,5ZheM2XcDCc,BRh5DnZ_-40,h1Lu5udXEZI,6g4HXXHi2R4\\u0026w=120\\u0026h=72\\u0026sigh=ntEFXiPrvpDgLrfpjZlkAdWhKY8\", \"thumb_height\": 72, \"height\": 960, \"width\": 128, \"stitched\": 1, \"posy\": 560, \"posx\": 0}, \"title\": \"Kristian Stanfill - One Thing Remains (Radio Version)\", \"view_count\": \"148,303\", \"duration\": \"4:00\"}, {\"public_name\": \"MattStone714\", \"encrypted_id\": \"y_VR-zwp2KA\", \"watch_link\": \"\\/watch?feature=related\\u0026v=y_VR-zwp2KA\", \"playability\": \"NO_PREFETCH\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/y_VR-zwp2KA\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=0Rek6rGINajL2VSOz7LoSIoO6CQ\", \"related_feature\": \"related\", \"thumbnail_info\": {\"thumb_width\": 120, \"url\": \"http:\\/\\/i.ytimg.com\\/vt?cids=GoYgi0sdOqc,y_VR-zwp2KA,lOmkDx2bzic,-oOJd7nsorY,NATl1SrW6RQ,ktfrruF4-No,SZ-fghqc8Oo,GoYgi0sdOqc,5ZheM2XcDCc,BRh5DnZ_-40,h1Lu5udXEZI,6g4HXXHi2R4\\u0026w=120\\u0026h=72\\u0026sigh=ntEFXiPrvpDgLrfpjZlkAdWhKY8\", \"thumb_height\": 72, \"height\": 960, \"width\": 128, \"stitched\": 1, \"posy\": 80, \"posx\": 0}, \"title\": \"Phillips, Craig \\u0026 Dean - Great I Am (Lyrics)\", \"view_count\": \"294,682\", \"duration\": \"4:30\"}, {\"public_name\": \"elliott9697\", \"encrypted_id\": \"lOmkDx2bzic\", \"watch_link\": \"\\/watch?feature=related\\u0026v=lOmkDx2bzic\", \"playability\": \"NO_PREFETCH\", \"thumbnail_for_watch\": \"http:\\/\\/i.ytimg.com\\/vi\\/lOmkDx2bzic\\/hqdefault.jpg?w=320\\u0026h=192\\u0026sigh=Go2lZSOSsC8G3sblXSnWfr6xz4o\", \"related_feature\": \"related\", \"thumbnail_info\": {\"thumb_width\": 120, \"url\": \"http:\\/\\/i.ytimg.com\\/vt?cids=GoYgi0sdOqc,y_VR-zwp2KA,lOmkDx2bzic,-oOJd7nsorY,NATl1SrW6RQ,ktfrruF4-No,SZ-fghqc8Oo,GoYgi0sdOqc,5ZheM2XcDCc,BRh5DnZ_-40,h1Lu5udXEZI,6g4HXXHi2R4\\u0026w=120\\u0026h=72\\u0026sigh=ntEFXiPrvpDgLrfpjZlkAdWhKY8\", \"thumb_height\": 72, \"height\": 960, \"width\": 128, \"stitched\": 1, \"posy\": 160, \"posx\": 0}, \"title\": \"This One Thing Remains - Kristian Stanfill (lyrics)\", \"view_count\": \"3
       E/V8Exception( 1780): Exception occurred at app.js:23: Uncaught TypeError: Cannot read property '0' of undefined
       
  4. Vishal Duggal 2013-03-29

    Looks like user error. The function is defined without arguments (undefined) which is being accessed. Can you replace the setTimeout block with this code and retest
       setTimeout(function() {
       	vdrld(videoID, function(arguments) {
       		Ti.API.debug('The resulting URL from vdrld was: ' + arguments[0]);
       		var videoPlayer = media.createYouTubePlayer({
       			src: arguments[0],
       			fullscreen: false,
       			width: 320,
       			height: 240,
       		});
       		win1.add(videoPlayer);
       		videoPlayer.play();
       	});
       }, 5000);
       
  5. Vishal Duggal 2013-03-29

    Resolving as invalid. If it is not user error, please reopen.
  6. Vishal Duggal 2013-03-29

    Not a user error
  7. Vishal Duggal 2013-03-30

    The response is not truncated. It just seems so because DDMS won't print out more than 4096 characters to output at a time. If you chunk the response while writing you can see all of it. What is actually happening is that the responses being received are completely different From my debugging here are the video nodes of content that I am getting
       IOS VIDEO NODE IS {"fmt_stream_map":[{"fallback_host":"tc.v8.cache7.c.youtube.com","quality":"medium","type":"video/mp4; codecs=\"avc1.42001E, mp4a.40.2\"","itag":"18","url":"http://r17---sn-4g57lnez.c.youtube.com/videoplayback?cp=U0hVSVZPTl9OSkNONV9OSVJEOlNuSUJETkhqOFVJ&sver=3&newshard=yes&ms=au&mt=1364619008&expire=1364640390&mv=u&ipbits=8&id=00ed86c0a01f12a6&itag=18&app=youtube_mobile&signature=203002884F707FD735BDED09E4382C4C981EF003.02E2200A0FD03132BE3172B1D15A9EAF36A6160C&ip=38.110.144.252&key=yt1&dnc=1&fexp=906080,913565,914054,916611,932000,906383,902000,919512,929903,931202,900821,900823,931203,931401,908529,930807,919373,930803,906836,920201,929602,930101,930603,926403,900824,910223&yms=WqJZDLHn7PM&el=watch&sparams=cp,id,ip,ipbits,itag,ratebypass,source,upn,expire&upn=y4l9mNVhvmk&ratebypass=yes&source=youtube"},{"fallback_host":"tc.v9.cache8.c.youtube.com","quality":"small","type":"video/3gpp; codecs=\"mp4v.20.3, mp4a.40.2\"","itag":"36","url":"http://r17---sn-4g57lnez.c.youtube.com/videoplayback?cp=U0hVSVZPTl9OSkNONV9OSVJEOlNuSUJETkhqOFVJ&sver=3&newshard=yes&ms=au&mt=1364619008&expire=1364640390&mv=u&ipbits=8&id=00ed86c0a01f12a6&itag=36&app=youtube_mobile&signature=5CD6E1692C5805B02CA52985DA00172C984F00F5.C738E8A2E7226D994D0089FEE2D97DBFC38E5B7C&ip=38.110.144.252&key=yt1&dnc=1&fexp=906080,913565,914054,916611,932000,906383,902000,919512,929903,931202,900821,900823,931203,931401,908529,930807,919373,930803,906836,920201,929602,930101,930603,926403,900824,910223&yms=WqJZDLHn7PM&el=watch&sparams=cp,id,ip,ipbits,itag,ratebypass,source,upn,expire&upn=y4l9mNVhvmk&ratebypass=yes&source=youtube"}],"time_created_text":"May 17, 2012","public_name":"UMHealthSystem","view_count":"2,616","comment_count":4,"likes_num":3,"player_type":"html5fs","playability":"PLAY_OK","length_seconds":151,"user_image_url":"//i3.ytimg.com/i/fp5MBK2IC90Bdm5IQUJvYw/1.jpg?v=712528","thumbnail_info":null,"watch_link":"/watch?v=AO2GwKAfEqY","title":"Introducing UMSkinCheck, a Mobile Skin Check App from the University of Michigan","duration":"2:31","description":"Dr. Michael Sabel from the University of Michigan Multidisciplinary Melanoma Clinic talks about melanoma and the importance of skin cancer self-exam especially for those who are at a high risk for skin cancer. Dr. Sabel introduces the University of Michigan's new Mobile App: UMSkinCheck which helps you complete a self-exam. For more information visit: www.uofmhealth.org/umskincheck","thumbnail_for_watch":"http://i.ytimg.com/vi/AO2GwKAfEqY/hqdefault.jpg?w=320&h=192&sigh=GSHLS-pOgF89vQ6_hl86j1QeTf0","encrypted_id":"AO2GwKAfEqY","dislikes_num":1,"longform":false,"profile_url":"/user/UMHealthSystem"}
       
       
       ANDROID VIDEO NODE IS {"watch_link":"/watch?v=AO2GwKAfEqY","likes_num":3,"public_name":"UMHealthSystem","time_created_text":"May 17, 2012","comment_count":4,"thumbnail_for_watch":"http://i.ytimg.com/vi/AO2GwKAfEqY/hqdefault.jpg?w=320&h=192&sigh=GSHLS-pOgF89vQ6_hl86j1QeTf0","stream_url":"rtsp://v3.cache5.c.youtube.com/CjYLENy73wIaLQmmEh-gwIbtABMYDSANFEIJbXYtZ29vZ2xlSARSBXdhdGNoYL3czfXA8purUQw=/0/0/0/video.3gp","dislikes_num":1,"player_type":"rtsp","title":"Introducing UMSkinCheck, a Mobile Skin Check App from the University of Michigan","duration":"2:31","description":"Dr. Michael Sabel from the University of Michigan Multidisciplinary Melanoma Clinic talks about melanoma and the importance of skin cancer self-exam especially for those who are at a high risk for skin cancer. Dr. Sabel introduces the University of Michigan's new Mobile App: UMSkinCheck which helps you complete a self-exam. For more information visit: www.uofmhealth.org/umskincheck","longform":false,"profile_url":"/user/UMHealthSystem","user_image_url":"//i3.ytimg.com/i/fp5MBK2IC90Bdm5IQUJvYw/1.jpg?v=712528","playability":"PLAY_OK","length_seconds":151,"thumbnail_info":null,"hq_stream_url":"","encrypted_id":"AO2GwKAfEqY","view_count":"2,616"}
       
       
       
       
    The response on android has no fmt_stream_map property in the video node which explains the error thrown. No idea what parameters control the response from the server. Either ways the bug filed in this ticket is invalid. Response is not truncated and JSON is parsed correctly. Going to mark this as invalid.
  8. kent hao 2013-06-22

    in iOS simulator, it also happens, i query ACS by HttpClient, the response text is truncated, so i can not parse it to object. // url [INFO]:https://api.cloud.appcelerator.com/v1/photos/query.json?key=appkey&page=1&per_page=50&where={"tags_array":{"$in":["51c48e33cde8cd0b25062b75","51c2c9892cf68f0ad308d423","51c2924b66b7ae0ae209b18c","51c0525fc1b9a60ad306a57d","51c04d1a66b7ae0ae20633f7"]}} // cut response [INFO] : { [INFO] : "meta": { [INFO] : "code": 200, [INFO] : "status": "ok", [INFO] : "method_name": "queryPhoto", [INFO] : "page": 1, [INFO] : "per_page": 50, [INFO] : "total_pages": 1, [INFO] : "total_results": 9 [INFO] : }, [INFO] : "response": { [INFO] : "photos": [ [INFO] : { [INFO] : "id": "51c052962408fd0aee000a37", [INFO] : "filename": "1f9a85f0.jpeg", [INFO] : "size": 4861117, [INFO] : "md5": "4778a3899f82abdd93d14e96a32bccda", [INFO] : "created_at": "2013-06-18T12:29:11+0000", [INFO] : "updated_at": "2013-06-18T12:29:19+0000", [INFO] : "processed": true, [INFO] : "user": { [INFO] : "id": "51bef7922408fd0aff000644", [INFO] : "first_name": "Jack", [INFO] : "last_name": "Jack", [INFO] : "created_at": "2013-06-17T11:48:35+0000", [INFO] : "updated_at": "2013-06-20T01:40:49+0000", [INFO] : "external_accounts": [ [INFO] : ], [INFO] : "confirmed_at": "2013-06-17T11:48:35+0000", [INFO] : "email": "jack@a.a", [INFO] : "admin": "false", [INFO] : "photo": { [INFO] : "id": "51bef7922408fd0aee000645", [INFO] : "filename": "20999c80.jpeg", [INFO] : "size": 4350073, [INFO] : "md5": "e262dfa4e9b19a3db4efb7f5c6cbbc38", [INFO] : "created_at": "2013-06-17T11:48:35+0000", [INFO] : "updated_at": "2013-06-17T11:48:39+0000", [INFO] : "processed": true, [INFO] : "urls": { [INFO] : "original": "http://storage.cloud.appcelerator.com/r7C550RQ3joq3v1TAJ8PKqN8uiy226On/photos/bc/38/51bef7932408fd0aff000646/20999c80_original.jpeg", [INFO] : "avatar": "http://storage.cloud.appcelerator.com/r7C550RQ3joq3v1TAJ8PKqN8uiy226On/photos/bc/38/51bef7932408fd0aff000646/20999c80_avatar.jpeg" [INFO] : }, [INFO] : "content_type": "image/jpeg" [INFO] : } [INFO] : }, [INFO] : "tags": [ [INFO] : "51c0525fc1b9a60ad306a57d" [INFO] : ], [INFO] : "urls": { [INFO] : "thumb": "http://storage.clo // here, the response is cut
  9. Lee Morris 2017-03-29

    Closing ticket as invalid.

JSON Source