{ "id": "117597", "key": "TIMOB-16216", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": [], "resolution": null, "resolutiondate": null, "created": "2013-07-25T15:36:26.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:04:20.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "It looks like a platform error, XML APIs are returning new proxies every time. It should cache the nodes that are returned. \r\n\r\nThe following code reproduces the issue with attached file \"nodes.xml\": you can see an error occurred in:\r\n\r\n{code:javascript}valueOf(testRun, attr.ownerElement).shouldBe(node);{code}\r\nwith error\r\n\r\n[INFO][TiAPI ( 319)] error occured , should be: '[object Element]', was: '[object Element]'\r\n\r\n\r\n\r\n\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : \"#FFF\"\r\n});\r\nwin.open();\r\nvar shouldBe = function(obj,expected) {\r\n if (obj != expected) {\r\n\t\talert(\"error occured see Ti.API.info\")\r\n\t\tTi.API.info( \"error occured , should be: '\" + expected + \"', was: '\" + this.obj + \"'\");\r\n\t\t}\r\n\t else\r\n\t {\t\t\r\n\t alert(\"no error\");\r\n\t\t\tTi.API.info(\"success\");\r\n\t\t\t}\r\n};\r\nthis.apiXmlAttr = function() {\r\n\tvar file = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'nodes.xml');\r\n\tvar xmltext = file.read().text;\r\n\tvar doc = Ti.XML.parseString(xmltext);\r\n\tvar scriptList = doc.documentElement.getElementsByTagName(\"script\");\r\n var node = doc.getElementsByTagName(\"node\").item(0);\r\n var attr = node.attributes.item(0);\r\n shouldBe(attr.ownerElement,node);\r\n\t// OCCURS ERROR\r\n\t};\r\napiXmlAttr();\r\n{code}", "attachment": [ { "id": "41263", "filename": "console.txt", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-02T06:25:48.000+0000", "size": 36582, "mimeType": "text/plain" }, { "id": "41104", "filename": "nodes.xml", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-29T10:26:59.000+0000", "size": 622, "mimeType": "text/xml" } ], "flagged": false, "summary": "Android: XML APIs are returning new proxies every time", "creator": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio, build: 3.0.2.201302191606\r\nTitanium SDK version: 3.1.1 \r\nDevice: Samsung galaxy s duos Android version: 4.0.4\r\nWindows 8", "comment": { "comments": [ { "id": "263166", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Shameer,\n\nPlease change the test case to be runnable - e.g. the cData variable isn't defined.\n\nThanks.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-25T17:44:57.000+0000", "updated": "2013-07-25T17:44:57.000+0000" }, { "id": "263519", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Did you run it? testSource is undefined now. I changed it to load the local XML file, but I don't see anything being logged.\n\nPlease provide steps to reproduce.\n\nThanks.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-26T22:48:31.000+0000", "updated": "2013-07-26T22:48:31.000+0000" }, { "id": "263617", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The Issue still occurs.You can reproduce the issue with the updated code (given) using nodes.xml file.\r\n\r\nThank you", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-29T10:28:53.000+0000", "updated": "2013-07-31T19:06:19.000+0000" }, { "id": "263795", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please can you explain how this:\n{quote}XML APIs are returning new proxies every time. It should cache the nodes that are returned.{quote}\nIs related to the test case you provided, which indicates that Android is simply not returning any informative exceptions.\n\nIs the lack of throwing exceptions due to it not \"returning new proxies every time\"?", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-29T22:43:12.000+0000", "updated": "2013-07-29T22:43:12.000+0000" }, { "id": "264649", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have updated java script code with simplified test case and You can see that the problem exist with \r\nvalueOf(testRun, attr.ownerElement).shouldBe(node);\r\n\r\nie, failed to compare 'attr.ownerElement' with 'node' . \r\n\r\n[INFO][TiAPI ( 319)] error occured , should be: '[object Element]', was: '[object Element]'\r\n\r\n(I have already attached console file )", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-02T06:16:28.000+0000", "updated": "2013-08-02T06:26:53.000+0000" }, { "id": "271685", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello Shameer Jan,\r\n\r\nPlease check your XML format and add more details for testing. Please explain, why you are thinking this is a bug? \r\n\r\nThanks \r\n", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2013-09-18T06:52:00.000+0000", "updated": "2013-09-18T06:52:00.000+0000" }, { "id": "271687", "author": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Mostafizur Rahman,\n\n I have already checked xml format and tried with other files, still exist errors.", "updateAuthor": { "name": "shameerj", "key": "shameerj", "displayName": "Shameer Jan", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-18T07:16:17.000+0000", "updated": "2013-09-18T07:16:17.000+0000" }, { "id": "288567", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening this ticket and moving it to engineering as I can reproduce this issue on Android platform. It is, at least, a parity issue because provided test case works fine on iOS platform but not on Android platform.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-17T04:12:47.000+0000", "updated": "2014-01-17T04:12:47.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }