{ "id": "146945", "key": "TIMOB-18838", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" }, { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-05-08T18:27:32.000+0000", "created": "2015-04-15T12:52:01.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "acs", "photo", "regression", "upload" ], "versions": [ { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2015-05-16T18:42: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": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "Photos returned a 500\r\n\r\n{code}\r\n[INFO] [iphone, 8.1, undefined] {\r\n \"success\": false,\r\n \"error\": true,\r\n \"code\": 500,\r\n \"message\": \"Internal server error. The Appcelerator Cloud Services Team has just been notified of this problem.\"\r\n}\r\n{code}\r\n\r\nPlease have a look at it.", "attachment": [], "flagged": false, "summary": "ACS Photo uploads fail with 500 error", "creator": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 398, "state": "closed", "name": "2015 Sprint 09 SDK", "startDate": "2015-04-25T00:00:00.000Z", "endDate": "2015-05-09T00:00:00.000Z", "completeDate": "2015-05-11T14:11:17.028Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "349700", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Could you include the parameters/URL used for this return to happen? And does it always reproduce?\r\n\r\nCC [~mgadiya]", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-04-15T17:27:02.000+0000", "updated": "2015-04-15T17:27:24.000+0000" }, { "id": "349704", "author": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "body": "I can confirm, that this only happens compiled with 4.0.0.Beta2. SDK 3.5.1.GA works as expected.\r\n\r\nThis ist my code:\r\n\r\n{code}\r\nCloud.onsendstream = function (e) {\r\n progressBar.value = e.progress;\r\n};\r\n\r\nCloud.Photos.create({\r\n photo: image,\r\n 'photo_sync_sizes[]': 'square_75',\r\n 'photo_sync_sizes[]': 'small_240',\r\n 'photo_sync_sizes[]': 'medium_500'\r\n}, function (e) {\r\n Cloud.onsendstream = Cloud.ondatastream = null;\r\n Ti.App.indicator.hide();\r\n if (e.success) {\r\n var photo = e.photos[0];\r\n self.fireEvent('upload.image.success', {\r\n url: photo.urls.original\r\n });\r\n } else {\r\n console.log(e);\r\n self.fireEvent('upload.image.error', {});\r\n }\r\n});\r\n{code}\r\n\r\nWorking environment:\r\n{code}\r\nOperating System\r\n Name = Mac OS X\r\n Version = 10.10.3\r\n Architecture = 64bit\r\n # CPUs = 8\r\n Memory = 17179869184\r\n\r\nNode.js\r\n Node.js Version = 0.10.38\r\n npm Version = 1.4.28\r\n\r\nTitanium CLI\r\n CLI Version = 3.4.2\r\n\r\nTitanium SDK\r\n SDK Version = 3.5.1.GA\r\n SDK Path = /Volumes/Data/Users/sebastian/Library/Application Support/Titanium/mobilesdk/osx/3.5.1.GA\r\n Target Platform = iphone\r\n{code}\r\n\r\nUsing latest ti.cloud 3.2.8", "updateAuthor": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-04-15T17:57:33.000+0000", "updated": "2015-04-15T18:21:15.000+0000" }, { "id": "349802", "author": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~fokkezb] can you reproduce this?", "updateAuthor": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-04-16T08:17:44.000+0000", "updated": "2015-04-16T08:17:44.000+0000" }, { "id": "349804", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I will let that up to [~rtlechuga] if you don't mind ;)", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-04-16T08:25:24.000+0000", "updated": "2015-04-16T08:25:24.000+0000" }, { "id": "349807", "author": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "body": "Of course :-)\r\nThank you", "updateAuthor": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-04-16T08:31:12.000+0000", "updated": "2015-04-16T08:31:12.000+0000" }, { "id": "349916", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Problem can be reproduced on SDK 4.0.0 Bate2, and works well on SDK 3.5.1 as customer mentioned.\r\n\r\nTest Case:\r\n{code:title=app.js}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:\"white\"\r\n});\r\n\r\nvar Cloud = require(\"ti.cloud\");\r\n\r\nCloud.Users.login({\r\n login: ,\r\n password: \r\n}, function (e) {\r\n if (e.success) {\r\n var user = e.users[0];\r\n Ti.API.info('Success:\\n' +\r\n 'id: ' + user.id + '\\n' +\r\n 'sessionId: ' + Cloud.sessionId + '\\n' +\r\n 'first name: ' + user.first_name + '\\n' +\r\n 'last name: ' + user.last_name);\r\n upload();\r\n } else {\r\n alert('Error:\\n' +\r\n ((e.error && e.message) || JSON.stringify(e)));\r\n }\r\n});\r\n\r\nfunction upload(e) {\r\n\tCloud.Photos.create({\r\n \tphoto: Titanium.Filesystem.getFile('1.jpg')\r\n\t}, function (e) {\r\n \tif (e.success) {\r\n \tvar photo = e.photos[0];\r\n \tTi.API.info('Success:\\n' +\r\n \t'id: ' + photo.id + '\\n' +\r\n \t'filename: ' + photo.filename + '\\n' +\r\n \t'size: ' + photo.size,\r\n \t'updated_at: ' + photo.updated_at);\r\n \t} else {\r\n \tTi.API.info('Error:\\n' + JSON.stringify(e));\r\n \t}\r\n\t});\r\n}\r\n\r\n\r\nwin.open();\r\n{code}\r\n\r\nAlso I tried Curl command with REST API, It works well.\r\n{code:title=REST API}\r\nAppc-MBP:~ shuoliang$ curl -b cookies.txt -c cookies.txt -F \"file=@1.jpg\" \"https://api.cloud.appcelerator.com/v1/photos/create.json?ey=8uupo7jRs0vwJP6qCDPvzckmmtNNnZE3&pretty_json=true\"\r\n{\r\n \"meta\": {\r\n \"code\": 200,\r\n \"status\": \"ok\",\r\n \"method_name\": \"createPhoto\"\r\n },\r\n \"response\": {\r\n \"photos\": [\r\n {\r\n \"id\": \"55305d95da00eeadda00094c\",\r\n \"filename\": \"1.jpg\",\r\n \"size\": 75005,\r\n \"md5\": \"d30e5da6d6aef073e7b06b980f40090c\",\r\n \"created_at\": \"2015-04-17T01:10:45+0000\",\r\n \"updated_at\": \"2015-04-17T01:10:45+0000\",\r\n \"processed\": false,\r\n \"content_type\": \"image/jpeg\",\r\n \"user_id\": \"55305794442599bbd8c525cc\"\r\n }\r\n ]\r\n }\r\n}\r\n{code}\r\n\r\nSo I believe this is the problem from SDK. ", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2015-04-17T01:13:17.000+0000", "updated": "2015-04-17T01:13:17.000+0000" }, { "id": "350030", "author": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "body": "Any news for that? I think this is really urgent for all developer who are using ACS", "updateAuthor": { "name": "benutzername", "key": "benutzername", "displayName": "Sebastian Klaus", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-04-18T16:07:39.000+0000", "updated": "2015-04-18T16:08:18.000+0000" }, { "id": "350031", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thank you for the bump. We will fix.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-04-18T16:13:02.000+0000", "updated": "2015-04-18T16:13:02.000+0000" }, { "id": "351962", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am able to reproduce this today, using:\r\n\r\nMacOS 10.10.3\r\nStudio 4.0.0.201505070727\r\nTi SDK 4.0.0.v20150507131012\r\nAppc NPM 0.3.55\r\nAppc CLI 0.2.280\r\nTi CLI 4.0.0-beta8\r\nAlloy 1.6.0-beta4\r\nNode v0.10.37", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-05-07T21:21:56.000+0000", "updated": "2015-05-07T21:21:56.000+0000" }, { "id": "351963", "author": { "name": "mgadiya", "key": "mgadiya", "displayName": "Mukesh Gadiya", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~wkong] , [~ewieber] ran into similar problem and I looked up the logs on api node and this is showed up:\r\n\r\n{code}\r\nStarted POST \"/v1/photos/create.json?key=nLu8hACXPzfMdRPDBNP23ENDkfcqiqZ4&_session_id=PSx4ZylgHMBwO7ZI4_9ZzLLN_-Y\" for 38.110.144.252 at 2015-05-07 21:24:20 +0000\r\nMONGODB (0.9ms) acs_api['action_dispatch_session_mongoid_store_sessions'].find({:_id=>\"PSx4ZylgHMBwO7ZI4_9ZzLLN_-Y\"}).limit(-1)\r\n\r\nNoMethodError (undefined method `rewind' for #):\r\n config/initializers/SessionCookieMiddelware.rb:52:in `call'\r\n\r\n{code}\r\n\r\nI think we may have possible ACS issue here. ", "updateAuthor": { "name": "mgadiya", "key": "mgadiya", "displayName": "Mukesh Gadiya", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-07T21:27:47.000+0000", "updated": "2015-05-07T21:27:47.000+0000" }, { "id": "351996", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm seeing this issue uploading photos to a destination other than ACS, only in the 4.0.0.x Ti SDK on iOS. Works on Android. I don't think this is an ACS issue. Looking into it more now. First error I see is:\r\n\r\n{code}\r\nError when matching URL mapping [/(*)/(*)?/(*)?(.(*))?]:Invalid media type \"charset=\"utf-8\"\": does not contain '/'\r\n{code}", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-08T05:42:50.000+0000", "updated": "2015-05-08T05:43:29.000+0000" }, { "id": "352031", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Pulls pending\r\n\r\nAPSHTTPClient - https://github.com/appcelerator/APSHTTPClient/pull/24\r\n\r\nTitanium Mobile\r\nmaster - https://github.com/appcelerator/titanium_mobile/pull/6828\r\n4_0_X - https://github.com/appcelerator/titanium_mobile/pull/6829", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-05-08T14:52:19.000+0000", "updated": "2015-05-08T14:52:19.000+0000" }, { "id": "352059", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Booyah. Thank you, All!", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-05-08T19:21:01.000+0000", "updated": "2015-05-08T19:21:01.000+0000" }, { "id": "352719", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified using:\r\n\r\nMac OSX 10.10.3\r\nTitanium SDK build: 4.0.0.v20150515213410\r\nAppc CLI (NPM): 0.3.56\r\nAppc CLI (Registry): 0.2.287\r\n\r\nUsing the code attached by Shuo, when uploading a photo to ACS the upload is now successful.\r\n\r\nClosing ticket", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-05-16T18:42:00.000+0000", "updated": "2015-05-16T18:42:00.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }