{ "id": "170172", "key": "TIMOB-25533", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-10-23T17:53:20.000+0000", "created": "2017-10-30T01:32:58.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "TiHTTPClient", "android", "java", "java.net.SocketTimeoutException" ], "versions": [ { "id": "19957", "description": "", "name": "Release 7.1.0", "archived": false, "released": true, "releaseDate": "2018-03-14" } ], "issuelinks": [], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-10-25T14:01:21.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "I got an app that send post json objects synchronous via recursive function, \r\nOnce an object is sent I wait for the response before sending another, but Im getting timedout errors:\r\n\r\n{code:java}\r\n[INFO] to server: {\"params\":{\"venta\":{\"ven_fecha\":\"2017-10-29 19:15:57\",\"ven_usuario\":7,\"ven_cliente\":279,\"ven_salida\":71,\"ven_ruta\":1,\"ven_localidad\":1,\"ven_total\":316,\"ven_pagado\":316,\"ven_factura\":0,\"ven_tipo\":1,\"ven_estatus\":0,\"apa_monto\":0,\"ven_descuento\":\"\",\"Detalles\":[{\"vpr_venta\":3,\"vpr_salida\":71,\"vpr_producto\":77,\"vpr_precio_oficial\":121,\"vpr_precio_venta\":121,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":121,\"vpr_descripcion\":\"BONAFONT 24/600ML\",\"vpr_costo\":82.42},{\"vpr_venta\":3,\"vpr_salida\":71,\"vpr_producto\":79,\"vpr_precio_oficial\":88,\"vpr_precio_venta\":88,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":88,\"vpr_descripcion\":\"BONAFONT 12/1LT\",\"vpr_costo\":59.04},{\"vpr_venta\":3,\"vpr_salida\":71,\"vpr_producto\":80,\"vpr_precio_oficial\":107,\"vpr_precio_venta\":107,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":107,\"vpr_descripcion\":\"BONAFONT 12/1.5 LTS\",\"vpr_costo\":71.96}]},\"usuario\":\"marcelo\",\"clave\":\"m1\"},\"metodo\":\"subirVentas\",\"url\":\"http://bebimex.com/sw/servidor/mobil.php\"}\r\n[INFO] art: Background partial concurrent mark sweep GC freed 115194(6MB) AllocSpace objects, 67(1340KB) LOS objects, 40%% free, 14MB/23MB, paused 563us total 109.330ms\r\n[ERROR] TiHTTPClient: (TiHttpClient-7) [11182,220758] HTTP Error (java.net.SocketTimeoutException): timeout\r\n[ERROR] TiHTTPClient: java.net.SocketTimeoutException: timeout\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.Okio$3.newTimeoutException(Okio.java:212)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.AsyncTimeout.exit(AsyncTimeout.java:261)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:215)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:306)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:300)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:196)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:191)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:80)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:907)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:783)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:463)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:405)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:521)\r\n[ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1224)\r\n[ERROR] TiHTTPClient: at java.lang.Thread.run(Thread.java:761)\r\n[ERROR] TiHTTPClient: Caused by: java.net.SocketException: Socket operation on non-socket\r\n[ERROR] TiHTTPClient: at java.net.SocketInputStream.socketRead0(Native Method)\r\n[ERROR] TiHTTPClient: at java.net.SocketInputStream.read(SocketInputStream.java:151)\r\n[ERROR] TiHTTPClient: at java.net.SocketInputStream.read(SocketInputStream.java:120)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.Okio$2.read(Okio.java:136)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:211)\r\n[ERROR] TiHTTPClient: ... 12 more\r\n[INFO] status 0\r\n\r\n\r\n{code}\r\n", "attachment": [ { "id": "63609", "filename": "app.tar.gz", "author": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-16T05:46:49.000+0000", "size": 9297776, "mimeType": "application/gzip" } ], "flagged": false, "summary": "Android: Allow HTTPClient to send request in onload", "creator": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Manjaro 17\r\nTitanum SDK 6.1.2.GA and 6.1.0.GA\r\nNode 6.11.4\r\nJava SDK 1.8\r\nCLI 5.0.14\r\nHyperloop 2.2.1", "closedSprints": [ { "id": 1058, "state": "closed", "name": "2018 Sprint 16 SDK", "startDate": "2018-07-29T22:26:06.486Z", "endDate": "2018-08-12T22:26:00.000Z", "completeDate": "2018-08-13T17:38:16.757Z", "originBoardId": 114 }, { "id": 1028, "state": "closed", "name": "2018 Sprint 09 SDK", "startDate": "2018-04-22T22:53:08.928Z", "endDate": "2018-05-06T22:53:00.000Z", "completeDate": "2018-05-07T00:02:15.883Z", "originBoardId": 114 }, { "id": 1065, "state": "closed", "name": "2016 Sprint 17 SDK", "startDate": "2018-08-13T17:39:36.846Z", "endDate": "2018-08-27T17:39:00.000Z", "completeDate": "2018-08-29T16:10:57.013Z", "originBoardId": 114 }, { "id": 1034, "state": "closed", "name": "2018 Sprint 10 SDK", "startDate": "2018-05-07T00:03:21.636Z", "endDate": "2018-05-21T00:03:00.000Z", "completeDate": "2018-05-20T20:54:58.928Z", "originBoardId": 114 }, { "id": 1035, "state": "closed", "name": "2018 Sprint 11 SDK", "startDate": "2018-05-20T20:57:43.542Z", "endDate": "2018-06-03T20:57:00.000Z", "completeDate": "2018-06-04T15:13:14.425Z", "originBoardId": 114 }, { "id": 1070, "state": "closed", "name": "2018 Sprint 18 SDK", "startDate": "2018-08-26T16:14:35.297Z", "endDate": "2018-09-09T16:14:00.000Z", "completeDate": "2018-09-11T20:59:21.495Z", "originBoardId": 114 }, { "id": 1039, "state": "closed", "name": "2018 Sprint 12 SDK", "startDate": "2018-06-03T15:22:23.401Z", "endDate": "2018-06-17T15:22:00.000Z", "completeDate": "2018-06-18T20:45:36.363Z", "originBoardId": 114 }, { "id": 1008, "state": "closed", "name": "2018 Sprint 06 SDK", "startDate": "2018-03-11T22:18:04.396Z", "endDate": "2018-03-25T22:18:00.000Z", "completeDate": "2018-03-25T21:52:36.683Z", "originBoardId": 216 }, { "id": 1073, "state": "closed", "name": "2018 Sprint 19 SDK", "startDate": "2018-09-09T21:02:56.422Z", "endDate": "2018-09-23T21:02:00.000Z", "completeDate": "2018-09-23T22:28:10.932Z", "originBoardId": 114 }, { "id": 1045, "state": "closed", "name": "2018 Sprint 13 SDK", "startDate": "2018-06-17T20:47:13.621Z", "endDate": "2018-07-01T20:47:00.000Z", "completeDate": "2018-07-02T18:40:05.029Z", "originBoardId": 114 }, { "id": 1078, "state": "closed", "name": "2018 Sprint 20 SDK", "startDate": "2018-09-23T16:57:58.349Z", "endDate": "2018-10-07T16:57:00.000Z", "completeDate": "2018-10-07T23:31:40.476Z", "originBoardId": 114 }, { "id": 1018, "state": "closed", "name": "2018 Sprint 07 SDK", "startDate": "2018-03-25T21:59:36.637Z", "endDate": "2018-04-08T21:59:00.000Z", "completeDate": "2018-04-08T17:55:14.467Z", "originBoardId": 114 }, { "id": 1050, "state": "closed", "name": "2018 Sprint 14 SDK", "startDate": "2018-07-01T18:40:57.193Z", "endDate": "2018-07-15T18:40:00.000Z", "completeDate": "2018-07-16T03:27:08.720Z", "originBoardId": 114 }, { "id": 1084, "state": "closed", "name": "2018 Sprint 21", "startDate": "2018-10-07T23:32:40.560Z", "endDate": "2018-10-21T23:32:00.000Z", "completeDate": "2018-10-21T23:19:05.460Z", "originBoardId": 114 }, { "id": 1021, "state": "closed", "name": "2018 Sprint 08 SDK", "startDate": "2018-04-08T17:57:36.122Z", "endDate": "2018-04-22T17:57:00.000Z", "completeDate": "2018-04-22T22:51:19.120Z", "originBoardId": 114 }, { "id": 1053, "state": "closed", "name": "2018 Sprint 15 SDK", "startDate": "2018-07-15T21:52:05.453Z", "endDate": "2018-07-29T21:52:00.000Z", "completeDate": "2018-07-29T22:25:11.723Z", "originBoardId": 114 }, { "id": 1088, "state": "closed", "name": "2018 Sprint 22", "startDate": "2018-10-21T23:20:52.653Z", "endDate": "2018-11-04T23:20:00.000Z", "completeDate": "2018-11-04T23:29:59.423Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "429816", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~knd_rt@hotmail.com],\r\n\r\nThanks for sharing with us. Can you please provide a sample test case to reproduce this issue on our end?", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-10-30T11:07:45.000+0000", "updated": "2017-10-30T11:07:45.000+0000" }, { "id": "430124", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~knd_rt@hotmail.com],
\r\nJust passing a followup here.Are you able to get that sorted out?  Please let us know if you need more help with this issue.\r\nRegards
\r\nAxway Appcelerator Support", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-11-05T06:07:34.000+0000", "updated": "2017-11-05T06:07:34.000+0000" }, { "id": "430133", "author": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is actually the method I export to handle all post request, In some cases it works perfect but sometimes some request just get in the limbo. This file is in my lib folder and required in my controllers via: var http = require('http.js'); and used like this: \r\n{code:java}\r\nhttp.post(server, function(res){\r\n // handle response\r\n})\r\n{code}\r\n\r\n\r\n{code:java}\r\nexports.post = function(args, callback){\r\n var url= args.url;\r\n var httpObj = Ti.Network.createHTTPClient({\r\n // function called when the response data is available\r\n onload : function(e) {\r\n // Ti.API.info(\"response \" + e);\r\n Ti.API.info(\"response json\" + JSON.stringify(e));\r\n if(this.status===200){\r\n Ti.API.info(\"Received text: \" + this.responseText);\r\n callback(JSON.parse(this.responseText));\r\n }\r\n else{\r\n \r\n callback({result: false, msj:this.status });\r\n }\r\n\r\n },\r\n // function called when an error occurs, including a timeout\r\n onerror : function(e) {\r\n Ti.API.debug(\"error: \", e.error);\r\n Ti.API.debug(\"error json: \", JSON.stringify(e));\r\n Ti.API.info(\"status \"+this.status);\r\n // Ti.API.info(\"error \" + e.toString);\r\n\r\n callback({result: false, msj:e.error });\r\n },\r\n timeout : 7000 // in milliseconds\r\n });\r\n // Prepare the connection.\r\n httpObj.open(\"POST\", url);\r\n httpObj.setRequestHeader('Content-Type', 'application/json');\r\n httpObj.setRequestHeader('charset', 'utf-8');\r\n // Send the request.\r\n httpObj.send(JSON.stringify({\r\n method:args.metodo,\r\n params:args.params,\r\n id:'bebimex'\r\n })\r\n );\r\n\r\n}\r\n{code}\r\n", "updateAuthor": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-05T22:34:43.000+0000", "updated": "2017-11-05T22:37:03.000+0000" }, { "id": "430141", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~knd_rt@hotmail.com], \r\nWe are unable to reproduce the issue on HUAWEI GR3 2017 device using the latest SDK 6.3.0.GA Please create a full test project and test steps to test the issue. \r\n\r\nThanks", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-11-06T05:22:28.000+0000", "updated": "2017-11-06T05:22:28.000+0000" }, { "id": "430452", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello [~knd_rt@hotmail.com], Please get back to us with a full reproducible sample code and guide to follow to reproduce the issue in our environment. Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-11-11T19:47:17.000+0000", "updated": "2017-11-11T19:47:17.000+0000" }, { "id": "430642", "author": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It is complicated to generate since theres is a lot of details, the server is php and is using ZEND as json parser(encode / decode). I run with -l trace and got this: \r\n\r\n{code:java}\r\n[INFO] entramos a post {\"params\":{\"usuario\":\"marcelo\",\"clave\":\"m1\"},\"metodo\":\"hola\",\"url\":\"http://bebimex.com/sw/servidor/mobil.php\"}\r\n[WARN] System: ClassLoader referenced unknown path: /system/framework/tcmclient.jar\r\n[DEBUG] NetworkSecurityConfig: No Network Security Config specified, using platform default\r\n[INFO] case 1, readyState = 1\r\n[INFO] case 2, readyState = 2\r\n[INFO] case 3, readyState = 3\r\n[INFO] case 4, readyState = 4\r\n[INFO] Received text: {\"result\":1,\"id\":\"bebimex\"}\r\n[INFO] entramos a post {\"params\":{\"venta\":{\"ven_fecha\":\"2017-11-14 17:07:33\",\"ven_usuario\":7,\"ven_cliente\":279,\"ven_salida\":105,\"ven_ruta\":1,\"ven_localidad\":1,\"ven_total\":473,\"ven_pagado\":473,\"ven_factura\":0,\"ven_tipo\":1,\"ven_estatus\":0,\"apa_monto\":0,\"ven_descuento\":\"\",\"Detalles\":[{\"vpr_venta\":1,\"vpr_salida\":105,\"vpr_producto\":84,\"vpr_precio_oficial\":180,\"vpr_precio_venta\":148,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":148,\"vpr_descripcion\":\"LEVITE 24/600 ML PIÑA COCO\",\"vpr_costo\":123},{\"vpr_venta\":1,\"vpr_salida\":105,\"vpr_producto\":85,\"vpr_precio_oficial\":180,\"vpr_precio_venta\":180,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":180,\"vpr_descripcion\":\"LEVITE 24/600 ML JAMAICA\",\"vpr_costo\":123},{\"vpr_venta\":1,\"vpr_salida\":105,\"vpr_producto\":89,\"vpr_precio_oficial\":145,\"vpr_precio_venta\":145,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":145,\"vpr_descripcion\":\"LEVITE 12/1.5 LT PIÑA COCO\",\"vpr_costo\":96.6}]},\"usuario\":\"marcelo\",\"clave\":\"m1\"},\"metodo\":\"subirVentasooo\",\"url\":\"http://bebimex.com/sw/servidor/mobil.php\"}\r\n[DEBUG] HTTPClient: The persistent handle is disposed.\r\n[INFO] case 1, readyState = 1\r\n[INFO] onsendstream called, readyState = 1\r\n[INFO] onsendstream called, readyState = 1\r\n[ERROR] TiHTTPClient: (TiHttpClient-2) [10917,301032] HTTP Error (java.io.IOException): unexpected end of stream on Connection{bebimex.com:80, proxy=DIRECT hostAddress=66.7.199.50 cipherSuite=none protocol=http/1.1} (recycle count=1) \r\n[ERROR] TiHTTPClient: java.io.IOException: unexpected end of stream on Connection{bebimex.com:80, proxy=DIRECT hostAddress=66.7.199.50 cipherSuite=none protocol=http/1.1} (recycle count=1) \r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:210)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:80)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:907)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:783)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:463)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:405)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:521)\r\n[ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1224)\r\n[ERROR] TiHTTPClient: at java.lang.Thread.run(Thread.java:761)\r\n[ERROR] TiHTTPClient: Caused by: java.io.EOFException: \\n not found: size=0 content=...\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:200)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:191)\r\n[ERROR] TiHTTPClient: ... 8 more\r\n[INFO] res:{\"result\":false,\"msj\":\"valio unexpected end of stream on Connection{bebimex.com:80, proxy=DIRECT hostAddress=66.7.199.50 cipherSuite=none protocol=http/1.1} (recycle count=1)\"}\r\n\r\n{code}\r\n", "updateAuthor": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-15T02:50:15.000+0000", "updated": "2017-11-15T02:50:15.000+0000" }, { "id": "430643", "author": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "body": "why is this happening?: \r\n{code:java}\r\n[DEBUG] HTTPClient: The persistent handle is disposed.\r\n{code}\r\n", "updateAuthor": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-15T02:50:45.000+0000", "updated": "2017-11-15T02:50:45.000+0000" }, { "id": "430692", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~knd_rt@hotmail.com], \r\nWe are investigating this.Can you please test this on latest SDK and let us know the results.\r\nThanks", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-11-15T08:36:28.000+0000", "updated": "2017-11-15T08:36:28.000+0000" }, { "id": "430796", "author": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I created a test project using latest SDK with JSON data I need to upload to server, I tested and got same errors:\r\n\r\n{code:java}\r\nINFO] case 1, readyState = 1\r\n[INFO] onsendstream called, readyState = 1\r\n[INFO] onsendstream called, readyState = 1\r\n[INFO] APSAnalyticsService: Send already in progress, skipping intent\r\n[ERROR] TiHTTPClient: (TiHttpClient-2) [51129,56562] HTTP Error (java.net.SocketTimeoutException): timeout\r\n[ERROR] TiHTTPClient: java.net.SocketTimeoutException: timeout\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.Okio$3.newTimeoutException(Okio.java:212)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.AsyncTimeout.exit(AsyncTimeout.java:261)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:215)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:306)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:300)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:196)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:191)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:80)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:907)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:783)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:463)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:405)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:521)\r\n[ERROR] TiHTTPClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1241)\r\n[ERROR] TiHTTPClient: at java.lang.Thread.run(Thread.java:761)\r\n[ERROR] TiHTTPClient: Caused by: java.net.SocketException: Socket closed\r\n[ERROR] TiHTTPClient: at java.net.SocketInputStream.socketRead0(Native Method)\r\n[ERROR] TiHTTPClient: at java.net.SocketInputStream.read(SocketInputStream.java:151)\r\n[ERROR] TiHTTPClient: at java.net.SocketInputStream.read(SocketInputStream.java:120)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.Okio$2.read(Okio.java:136)\r\n[ERROR] TiHTTPClient: at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:211)\r\n[ERROR] TiHTTPClient: ... 12 more\r\n\r\n{code}\r\n", "updateAuthor": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-16T05:47:03.000+0000", "updated": "2017-11-16T05:47:03.000+0000" }, { "id": "430802", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello,\r\n\r\nI have tested the issue and unable to reproduce the issue using SDK 6.3.0.GA. Please check the callback function used in the *http.js* file(onload function) and make sure there is no syntax error. Please share your appc info here.\r\n\r\n*Test Environment:*\r\nAppcelerator Command-Line Interface, version 6.3.0\r\nMac OS X 10.12.6\r\n Architecture 64bit\r\n CPUs 4\r\n Memory 8589934592\r\nAxway Appcelerator Studio, build: 4.10.0.201709271713\r\nAppcelerator Command-Line Interface, version 6.2.4,\r\nSDK Version = SDK 6.3.0.GA \r\nNode.js Version = 4.7.0\r\n npm Version = 2.15.11\r\nAndroid Device: HUAWEI GR3 2017\r\n\r\n*Test Steps:*\r\n1. Open Studio\r\n2. Run the project using the sample code provided\r\n3. Click the label *send http post json* and no http error found on our end\r\n\r\n*Output:*\r\n\r\nConsole logs: \r\n{code}\r\n[INFO] : ACS Login Results for environment `development`:\r\n[INFO] : [object Object]\r\n[WARN] : TiVerify: (Timer-0) [4997,4997] Verifying module licenses...\r\n[INFO] : TiVerify: (Timer-0) [1027,6024] Succesfully verified module licenses\r\n[INFO] : hwaps: JNI_OnLoad\r\n[INFO] : entramos a post {\"params\":{\"venta\":{\"ven_fecha\":\"2017-11-15 22:46:13\",\"ven_usuario\":7,\"ven_cliente\":279,\"ven_salida\":105,\"ven_ruta\":1,\"ven_localidad\":1,\"ven_total\":440,\"ven_pagado\":440,\"ven_factura\":0,\"ven_tipo\":1,\"ven_estatus\":0,\"apa_monto\":0,\"ven_descuento\":\"\",\"Detalles\":[{\"vpr_venta\":4,\"vpr_salida\":105,\"vpr_producto\":85,\"vpr_precio_oficial\":180,\"vpr_precio_venta\":180,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":180,\"vpr_descripcion\":\"LEVITE 24/600 ML JAMAICA\",\"vpr_costo\":123},{\"vpr_venta\":4,\"vpr_salida\":105,\"vpr_producto\":89,\"vpr_precio_oficial\":145,\"vpr_precio_venta\":145,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":145,\"vpr_descripcion\":\"LEVITE 12/1.5 LT PIÑA COCO\",\"vpr_costo\":96.6},{\"vpr_venta\":4,\"vpr_salida\":105,\"vpr_producto\":94,\"vpr_precio_oficial\":115,\"vpr_precio_venta\":115,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":115,\"vpr_descripcion\":\"JUIZZY 12/1LT NARANJA\",\"vpr_costo\":81.2}]},\"usuario\":\"marcelo\",\"clave\":\"m1\"},\"metodo\":\"subirVentas\",\"url\":\"http://bebimex.com/sw/servidor/mobil.php\"}\r\n[INFO] : case 1, readyState = 1\r\n[INFO] : entramos a post {\"params\":{\"venta\":{\"ven_fecha\":\"2017-11-15 22:46:13\",\"ven_usuario\":7,\"ven_cliente\":279,\"ven_salida\":105,\"ven_ruta\":1,\"ven_localidad\":1,\"ven_total\":440,\"ven_pagado\":440,\"ven_factura\":0,\"ven_tipo\":1,\"ven_estatus\":0,\"apa_monto\":0,\"ven_descuento\":\"\",\"Detalles\":[{\"vpr_venta\":4,\"vpr_salida\":105,\"vpr_producto\":85,\"vpr_precio_oficial\":180,\"vpr_precio_venta\":180,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":180,\"vpr_descripcion\":\"LEVITE 24/600 ML JAMAICA\",\"vpr_costo\":123},{\"vpr_venta\":4,\"vpr_salida\":105,\"vpr_producto\":89,\"vpr_precio_oficial\":145,\"vpr_precio_venta\":145,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":145,\"vpr_descripcion\":\"LEVITE 12/1.5 LT PIÑA COCO\",\"vpr_costo\":96.6},{\"vpr_venta\":4,\"vpr_salida\":105,\"vpr_producto\":94,\"vpr_precio_oficial\":115,\"vpr_precio_venta\":115,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":115,\"vpr_descripcion\":\"JUIZZY 12/1LT NARANJA\",\"vpr_costo\":81.2}]},\"usuario\":\"marcelo\",\"clave\":\"m1\"},\"metodo\":\"subirVentas\",\"url\":\"http://bebimex.com/sw/servidor/mobil.php\"}\r\n[INFO] : case 1, readyState = 1\r\n[INFO] : onsendstream called, readyState = 1\r\n[INFO] : onsendstream called, readyState = 1\r\n[INFO] : onsendstream called, readyState = 1\r\n[INFO] : onsendstream called, readyState = 1\r\n[INFO] : case 3, readyState = 3\r\n[INFO] : case 3, readyState = 3\r\n[INFO] : case 4, readyState = 4\r\n[INFO] : Received text: {\"result\":702,\"id\":\"bebimex\"}\r\n[INFO] : res:{\"result\":702,\"id\":\"bebimex\"}\r\n[INFO] : entramos a post {\"params\":{\"venta\":{\"ven_fecha\":\"2017-11-14 17:08:15\",\"ven_usuario\":7,\"ven_cliente\":279,\"ven_salida\":105,\"ven_ruta\":1,\"ven_localidad\":1,\"ven_total\":783,\"ven_pagado\":783,\"ven_factura\":0,\"ven_tipo\":1,\"ven_estatus\":0,\"apa_monto\":0,\"ven_descuento\":\"\",\"Detalles\":[{\"vpr_venta\":3,\"vpr_salida\":105,\"vpr_producto\":79,\"vpr_precio_oficial\":88,\"vpr_precio_venta\":88,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":88,\"vpr_descripcion\":\"BONAFONT 12/1LT\",\"vpr_costo\":59.04},{\"vpr_venta\":3,\"vpr_salida\":105,\"vpr_producto\":80,\"vpr_precio_oficial\":107,\"vpr_precio_venta\":107,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":107,\"vpr_descripcion\":\"BONAFONT 12/1.5 LTS\",\"vpr_costo\":71.96},{\"vpr_venta\":3,\"vpr_salida\":105,\"vpr_producto\":84,\"vpr_precio_oficial\":180,\"vpr_precio_venta\":148,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":148,\"vpr_descripcion\":\"LEVITE 24/600 ML PIÑA COCO\",\"vpr_costo\":123},{\"vpr_venta\":3,\"vpr_salida\":105,\"vpr_producto\":85,\"vpr_precio_oficial\":180,\"vpr_precio_venta\":180,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":180,\"vpr_descripcion\":\"LEVITE 24/600 ML JAMAICA\",\"vpr_costo\":123},{\"vpr_venta\":3,\"vpr_salida\":105,\"vpr_producto\":89,\"vpr_precio_oficial\":145,\"vpr_precio_venta\":145,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":145,\"vpr_descripcion\":\"LEVITE 12/1.5 LT PIÑA COCO\",\"vpr_costo\":96.6},{\"vpr_venta\":3,\"vpr_salida\":105,\"vpr_producto\":94,\"vpr_precio_oficial\":115,\"vpr_precio_venta\":115,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":115,\"vpr_descripcion\":\"JUIZZY 12/1LT NARANJA\",\"vpr_costo\":81.2}]}},\"metodo\":\"subirVentas\",\"url\":\"http://bebimex.com/sw/servidor/mobil.php\"}\r\n[INFO] : case 4, readyState = 4\r\n[INFO] : case 4, readyState = 4\r\n[INFO] : case 1, readyState = 1\r\n[INFO] : case 4, readyState = 4\r\n[INFO] : Received text: {\"result\":701,\"id\":\"bebimex\"}\r\n[INFO] : res:{\"result\":701,\"id\":\"bebimex\"}\r\n[INFO] : entramos a post {\"params\":{\"venta\":{\"ven_fecha\":\"2017-11-14 17:07:51\",\"ven_usuario\":7,\"ven_cliente\":279,\"ven_salida\":105,\"ven_ruta\":1,\"ven_localidad\":1,\"ven_total\":337,\"ven_pagado\":337,\"ven_factura\":0,\"ven_tipo\":1,\"ven_estatus\":0,\"apa_monto\":0,\"ven_descuento\":\"\",\"Detalles\":[{\"vpr_venta\":2,\"vpr_salida\":105,\"vpr_producto\":80,\"vpr_precio_oficial\":107,\"vpr_precio_venta\":107,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":107,\"vpr_descripcion\":\"BONAFONT 12/1.5 LTS\",\"vpr_costo\":71.96},{\"vpr_venta\":2,\"vpr_salida\":105,\"vpr_producto\":94,\"vpr_precio_oficial\":115,\"vpr_precio_venta\":115,\"vpr_IVA\":0,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":115,\"vpr_descripcion\":\"JUIZZY 12/1LT NARANJA\",\"vpr_costo\":81.2},{\"vpr_venta\":2,\"vpr_salida\":105,\"vpr_producto\":96,\"vpr_precio_oficial\":115,\"vpr_precio_venta\":115,\"vpr_IVA\":1,\"vpr_hectolitros\":0,\"vpr_cantidad\":1,\"vpr_devolucion\":0,\"vpr_estatus\":0,\"vpr_importe\":115,\"vpr_descripcion\":\"JUGO KIDS 24/300ML UVA\",\"vpr_costo\":78.92}]}},\"metodo\":\"subirVentas\",\"url\":\"http://bebimex.com/sw/servidor/mobil.php\"}\r\n[INFO] : case 1, readyState = 1\r\n[INFO] : onsendstream called, readyState = 1\r\n[INFO] : onsendstream called, readyState = 1\r\n[INFO] : onsendstream called, readyState = 1\r\n[INFO] : onsendstream called, readyState = 1\r\n[INFO] : onsendstream called, readyState = 1\r\n[INFO] : case 3, readyState = 3\r\n[INFO] : case 4, readyState = 4\r\n[INFO] : case 4, readyState = 4\r\n{code}\r\n\r\n\r\nBest", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-11-16T10:51:14.000+0000", "updated": "2017-11-16T10:51:14.000+0000" }, { "id": "430899", "author": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I checked the server and something is not right, the sample proyect should send 4 json objects, and only 2 got inserted, : \r\n{code:java}\r\n Received text: {\"result\":701,\"id\":\"bebimex\"}\r\n Received text: {\"result\":702,\"id\":\"bebimex\"}\r\n{code}\r\nAlso it is supposed to only send one json and wait for the response before sending another, and your log shows async sent.\r\n\r\nAPPC INFO:\r\nOperating System\r\n Name = Manjaro Linux\r\n Version = 17.0.6-EOL\r\n Architecture = 64bit\r\n # CPUs = 2\r\n Memory = 7.6GB\r\n\r\nNode.js\r\n Node.js Version = 6.11.5\r\n npm Version = 5.5.1\r\n\r\nAppcelerator CLI\r\n Installer = 4.2.9\r\n Core Package = 6.3.0\r\n\r\nTitanium CLI\r\n CLI Version = 5.0.14\r\n node-appc Version = 0.2.41\r\n\r\nTitanium SDKs\r\n 6.3.0.GA\r\n Version = 6.3.0\r\n Install Location = /home/knd/.titanium/mobilesdk/linux/6.3.0.GA\r\n Platforms = android, mobileweb\r\n node-appc Version = 0.2.43\r\n 6.2.2.GA\r\n Version = 6.2.2\r\n Install Location = /home/knd/.titanium/mobilesdk/linux/6.2.2.GA\r\n Platforms = android, mobileweb\r\n node-appc Version = 0.2.43\r\n 6.1.2.GA\r\n Version = 6.1.2\r\n Install Location = /home/knd/.titanium/mobilesdk/linux/6.1.2.GA\r\n Platforms = android, mobileweb\r\n node-appc Version = 0.2.43\r\n 6.1.0.GA\r\n Version = 6.1.0\r\n Install Location = /home/knd/.titanium/mobilesdk/linux/6.1.0.GA\r\n Platforms = android, mobileweb\r\n node-appc Version = 0.2.43\r\n\r\n\r\nJava Development Kit\r\n Version = 1.8.0_152\r\n Java Home = /lib/jvm/java-8-jdk\r\n", "updateAuthor": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-11-17T04:11:43.000+0000", "updated": "2017-11-17T04:12:19.000+0000" }, { "id": "435023", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/9893", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-28T19:36:38.000+0000", "updated": "2018-02-28T19:36:38.000+0000" }, { "id": "435445", "author": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I used jquery .ajax in a webview as a workaround to send the json objects", "updateAuthor": { "name": "knd_rt@hotmail.com", "key": "knd_rt@hotmail.com", "displayName": "knd_rt@hotmail.com", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-03-10T06:09:06.000+0000", "updated": "2018-03-10T06:09:06.000+0000" }, { "id": "437549", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Passed.\r\nWaiting for merge to get enabled.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-05-09T22:51:14.000+0000", "updated": "2018-05-09T22:51:14.000+0000" }, { "id": "442878", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR Merged.", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-23T17:53:15.000+0000", "updated": "2018-10-23T17:53:15.000+0000" }, { "id": "442939", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket* Verified fix in SDK Version {{7.5.0.v20181025051112}}.\r\n\r\ntest and other information can be fount at:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/9893", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-25T14:01:13.000+0000", "updated": "2018-10-25T14:01:13.000+0000" } ], "maxResults": 16, "total": 16, "startAt": 0 } } }