{ "id": "144156", "key": "TIMOB-18505", "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": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2018-01-03T03:31:03.000+0000", "created": "2015-02-03T23:33:15.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-4.0.0" ], "versions": [ { "id": "16676", "description": "Release 3.4.1", "name": "Release 3.4.1", "archived": false, "released": true, "releaseDate": "2014-11-14" }, { "id": "16704", "description": "Release 3.5.0", "name": "Release 3.5.0", "archived": false, "released": true, "releaseDate": "2015-01-13" }, { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "issuelinks": [], "assignee": { "name": "mchen", "key": "mchen", "displayName": "Maggie Chen", "active": true, "timeZone": "Asia/Singapore" }, "updated": "2018-01-03T03:31:03.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" }, { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h5.Description\r\n\r\nWhen printing a text blob to a console in iOS the output is simply what was in the document you have read for example \r\n{code} \r\n[INFO] : This is not test text.\r\n{code}\r\n\r\nHowever when the same code is run on Android, a JSON structure is printed out containing the information, for example\r\n\r\n{code}\r\n[INFO] : {\"file\":{\"hidden\":false,\"nativePath\":\"file:///android_asset/Resources/test2.txt\",\"writable\":false,\"executable\":false,\"parent\":null,\"readonly\":true,\"directoryListing\":[],\"size\":22,\"apiName\":\"Ti.Proxy\",\"name\":\"test2.txt\",\"symbolicLink\":false,\"bubbleParent\":true},\"nativePath\":\"file:///android_asset/Resources/test2.txt\",\"height\":0,\"length\":22,\"width\":0,\"mimeType\":\"text/plain\",\"apiName\":\"Ti.Blob\",\"text\":\"This is not test text.\",\"type\":1,\"bubbleParent\":true}\r\n{code}\r\n\r\nThis *is not a regression.* As it occurs in previous versions of the SDK.\r\n\r\nh5.Steps To Reproduce\r\n\r\n1. Replace the app.js in an existing project with the attached app.js, add the file test.txt to the Resources folder\r\n\r\n2a. Run the app on an iOS device\r\n2b. Run the app on an Android device\r\n\r\nh5.Actual Result\r\n\r\n2a. The text from the document will be printed out in the console\r\n2b. A JSON structure representing the blob will be printed out in the console\r\n\r\nh5.Expected Result\r\n\r\nThe result should be the same, as there is both a toString method and a text to get the text of the document, it may make more sense to return the JSON structure.", "attachment": [ { "id": "53972", "filename": "app.js", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-02-03T23:33:15.000+0000", "size": 305, "mimeType": "text/javascript" }, { "id": "53971", "filename": "test.txt", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-02-03T23:33:15.000+0000", "size": 22, "mimeType": "text/plain" } ], "flagged": false, "summary": "Difference in output when printing a text Blob to the console in Android and iOS", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Mac OSX 10.10.2\r\nAppcelerator Studio, build: 3.4.1.201410281743\r\nTitanium SDK build: 3.4.1.GA, 3.5.0.GA, 4.0.0.v20150203133250\r\nTitanium CLI, build: 3.4.1\r\nAlloy: 1.5.1\r\nXcode 6.1.1, iPhone 6 (8.1)\r\nAndroid Build tools 21.1.1, Nexus 5 (5.0)", "comment": { "comments": [ { "id": "428246", "author": { "name": "mchen", "key": "mchen", "displayName": "Maggie Chen", "active": true, "timeZone": "Asia/Singapore" }, "body": "Please refer to the example in [http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Filesystem.File]\r\n\r\nThe text is returned as expected by using:\r\nconsole.log(blobText.text);\r\n\r\n\r\n", "updateAuthor": { "name": "mchen", "key": "mchen", "displayName": "Maggie Chen", "active": true, "timeZone": "Asia/Singapore" }, "created": "2017-09-21T14:26:35.000+0000", "updated": "2017-09-21T14:26:54.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }