{ "id": "152319", "key": "TIMOB-19784", "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": [ { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" }, { "id": "16996", "name": "Release 5.0.3", "archived": false, "released": true, "releaseDate": "2017-02-06" }, { "id": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-10-27T20:02:45.000+0000", "created": "2015-10-26T03:52:11.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android" ], "versions": [ { "id": "16778", "description": "Release 5.0.1", "name": "Release 5.0.1", "archived": false, "released": true, "releaseDate": "2015-09-25" }, { "id": "16904", "description": "Release 5.0.2", "name": "Release 5.0.2", "archived": true, "released": true, "releaseDate": "2015-10-01" }, { "id": "16925", "description": "WatchKit Support--all going into 5.0 now", "name": "Release 5.0.0", "archived": true, "released": true, "releaseDate": "2015-09-16" } ], "issuelinks": [ { "id": "49453", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "151673", "key": "TIMOB-19661", "fields": { "summary": "Android: 5.0.0 GA SDK HTTPClient Fails to POST Form Data with File Correctly", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "49613", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "152600", "key": "TIMOB-19847", "fields": { "summary": "Image won't upload from Android to ArrowDB using API 5.0+", "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" } }, "priority": { "name": "None", "id": "6" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2015-11-20T04:32:16.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": "This is working correctly in SDK 4.1.0.GA.\r\n\r\nUsing 5.0.2.GA and the code below:\r\n\r\n{code}\r\nCloud.Files.create({\r\n name: 'my_file_1234567',\r\n file: theFile\r\n}, function (e) { \r\n if (e.success) {\r\n // do stuff here\r\n } else {\r\n Ti.API.info(JSON.stringify(e));\r\n }\r\n});\r\n{code}\r\n\r\nProduces error:-\r\n{code}\r\n10-25 23:47:33.283 29748 29833 E TiHTTPClient: (TiHttpClient-3) [85523,88494] HTTP Error (java.io.IOException): 400 : Bad Request\r\n10-25 23:47:33.283 29748 29833 E TiHTTPClient: java.io.IOException: 400 : Bad Request\r\n10-25 23:47:33.283 29748 29833 E TiHTTPClient: \tat ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1213)\r\n10-25 23:47:33.283 29748 29833 E TiHTTPClient: \tat java.lang.Thread.run(Thread.java:818)\r\n10-25 23:47:33.285 29748 29761 I TiAPI : {\"success\":false,\"error\":true,\"code\":400,\"message\":\"Invalid name\"}\r\n10-25 23:47:33.285 29748 29761 I ALERT : (KrollRuntimeThread) [3,88497] {\"success\":false,\"error\":true,\"code\":400,\"message\":\"Invalid name\"}\r\n{code}\r\n\r\nTicket created based on information from: https://community.appcelerator.com/topic/3825/cloud-files-create-error-invalid-name/", "attachment": [], "flagged": false, "summary": "Android: Cloud Files Create Error \"Invalid Name\"", "creator": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "subtasks": [], "reporter": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "environment": null, "closedSprints": [ { "id": 517, "state": "closed", "name": "2015 Sprint 22 SDK", "startDate": "2015-10-24T00:30:42.059Z", "endDate": "2015-11-07T01:30:00.000Z", "completeDate": "2015-11-09T02:37:29.441Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "367745", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Place file in `resources/mytestfile.txt`\r\nCode to reproduce error:-\r\n{code}\r\n// this sets the background color of the master UIView (when there are no windows/tab groups on it)\r\nTitanium.UI.setBackgroundColor('#000');\r\n\r\nvar win = Titanium.UI.createWindow({ \r\n title:'Tab 1',\r\n backgroundColor:'#fff'\r\n});\r\n\r\n\r\nvar button = Titanium.UI.createButton({\r\n\ttitle:'Press to Upload'\r\n});\r\n\r\nwin.add(button);\r\nvar ACS = require('ti.cloud');\r\n \r\nbutton.addEventListener('click', function(e) {\r\n\t\r\n\tACS.Files.create({\r\n name: 'mytestfile.txt',\r\n file: Ti.Filesystem.getFile(\"mytestfile.txt\")\r\n }, function (e) {\r\n if (e.success) {\r\n alert(\"success\");\r\n } else {\r\n Ti.API.info(JSON.stringify(e));\r\n alert(JSON.stringify(e));\r\n }\r\n });\r\n});\r\n\r\nwin.open();\r\n\r\n\r\n// added during app creation. this will automatically login to\r\n// ACS for your application and then fire an event (see below)\r\n// when connected or errored. if you do not use ACS in your\r\n// application as a client, you should remove this block\r\n(function(){\r\nvar env = Ti.App.deployType.toLowerCase() === 'production' ? 'production' : 'development',\r\n username = Ti.App.Properties.getString('acs-username-'+env),\r\n password = Ti.App.Properties.getString('acs-password-'+env);\r\n\r\n// if not configured, just return\r\nif (!env || !username || !password) { return; }\r\n/**\r\n * Appcelerator Cloud (ACS) Admin User Login Logic\r\n *\r\n * fires login.success with the user as argument on success\r\n * fires login.failed with the result as argument on error\r\n */\r\nACS.Users.login({\r\n\tlogin:username,\r\n\tpassword:password,\r\n}, function(result){\r\n\tif (env==='development') {\r\n\t\tTi.API.info('ACS Login Results for environment `'+env+'`:');\r\n\t\tTi.API.info(result);\r\n\t} else {\r\n\t\talert(\"prod\");\r\n\t}\r\n\tif (result && result.success && result.users && result.users.length){\r\n\t\tTi.App.fireEvent('login.success',result.users[0],env);\r\n\t} else {\r\n\t\tTi.App.fireEvent('login.failed',result,env);\r\n\t}\r\n});\r\n\r\n})();\r\n\r\n{code}", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-10-26T04:05:36.000+0000", "updated": "2015-10-26T04:06:50.000+0000" }, { "id": "367940", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Master PR: https://github.com/appcelerator/titanium_mobile/pull/7350\r\n5_1_X PR: https://github.com/appcelerator/titanium_mobile/pull/7351\r\n5_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/7352", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-10-27T06:51:06.000+0000", "updated": "2015-10-27T07:02:20.000+0000" }, { "id": "368158", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix.\r\nWe do not see any error & it returns a success. Checked with the code in the PR.\r\n\r\nClosing.\r\n\r\nEnvironment:\r\nAppc Studio : 4.4.0.201510231805\r\nTi SDK : 5.1.0.v20151028061258, 5.0.3.v20151028061300, 5.2.0.v20151028081229\r\nTi CLI : 5.0.5\r\nAlloy : 1.7.18\r\nMAC Yosemite : 10.10.5\r\nAppc NPM : 4.2.1-6\r\nAppc CLI : 5.1.0-38\r\nNode: v0.10.37\r\nNexus 6 : Android 6.0", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-10-28T18:33:55.000+0000", "updated": "2015-10-28T18:39:41.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }