{ "id": "152600", "key": "TIMOB-19847", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2015-11-03T06:48:21.000+0000", "created": "2015-11-03T04:39:29.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "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": "49613", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "152319", "key": "TIMOB-19784", "fields": { "summary": "Android: Cloud Files Create Error \"Invalid Name\"", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T23:08:06.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": "If you create a photo object in ArrowDB using an android device, the following error occurs when you try to upload with version 5.0+ of the Titanium API. The SAME CODE running 4.0 - < 5.0 works when uploading an image to Arrow DB. When using 5.0+, I get the following JSON error response after uploading an image:\r\n\r\n{\"success\" : false, \"error\" : true, \"code\" : 400, \"message\" : \"Failed to upload photo: Cannot serialize an object of class ActionDispatch::Http::UploadedFile in BSON.\"}\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "Image won't upload from Android to ArrowDB using API 5.0+", "creator": { "name": "raybelisle", "key": "raybelisle", "displayName": "Ray Belisle", "active": true, "timeZone": "America/Edmonton" }, "subtasks": [], "reporter": { "name": "raybelisle", "key": "raybelisle", "displayName": "Ray Belisle", "active": true, "timeZone": "America/Edmonton" }, "environment": null, "comment": { "comments": [ { "id": "368758", "author": { "name": "raybelisle", "key": "raybelisle", "displayName": "Ray Belisle", "active": true, "timeZone": "America/Edmonton" }, "body": "Code is as follows for a reproducible test case. Fails when I compile using 5.02GA but works when I use 4.11GA\r\n\r\nIndex.xml\r\n\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n\r\nIndex.js\r\n\r\nvar args = arguments[0] || {};\r\nvar Cloud = require('ti.cloud');\r\nvar user = null;\r\n\r\nfunction init() {\r\n\tCloud.Users.login({\r\n\t\tlogin : $.name.value,\r\n\t\tpassword : $.pass.value\r\n\t}, function(e) {\r\n\t\tif (e.success) {\r\n\t\t\tuser = e.users[0];\r\n\t\t\talert('Success:\\n' + 'id: ' + user.id + '\\n' + 'sessionId: ' + Cloud.sessionId + '\\n' + 'first name: ' + user.first_name + '\\n' + 'last name: ' + user.last_name);\r\n\t\t\talert(JSON.stringify(user));\r\n\t\t} else {\r\n\t\t\talert('Error:\\n' + ((e.error && e.message) || JSON.stringify(e)));\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction captureImage() {\r\n\tvar dlg = Titanium.UI.createAlertDialog({\r\n\t\tmessage : 'Please Select',\r\n\t\tbuttonNames : ['Take Photo', 'Photo Library']\r\n\t});\r\n\r\n\tdlg.addEventListener('click', function(ev) {\r\n\t\tif (ev.index == 0) {\r\n\r\n\t\t\tTi.Media.showCamera({\r\n\t\t\t\tshowControls : true,\r\n\t\t\t\tmediaTypes : Ti.Media.MEDIA_TYPE_PHOTO,\r\n\t\t\t\tautohide : true,\r\n\t\t\t\tallowEditing : false,\r\n\t\t\t\tsuccess : function(event) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar f = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, 'test.jpg');\r\n\t\t\t\t\tf.write(event.media);\r\n\r\n\t\t\t\t\t$.myimage.image = f.nativePath;\r\n\t\t\t\t\r\n\t\t\t\t},\r\n\t\t\t\tcancel : function() {\r\n\t\t\t\t},\r\n\t\t\t\terror : function(error) {\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else if (ev.index == 1) {// clicked \"No\"\r\n\t\t\tTi.Media.openPhotoGallery({\r\n\t\t\t\tmediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO],\r\n\t\t\t\tsuccess : function(event) {\r\n\t\t\t\t\tvar f = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, 'test.jpg');\r\n\t\t\t\t\tf.write(event.media);\r\n\r\n\t\t\t\t\t$.myimage.image = f.nativePath;\r\n\t\t\t\t},\r\n\t\t\t\tcancel : function() {\r\n\t\t\t\t},\r\n\t\t\t\terror : function(error) {\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}\r\n\r\n\t});\r\n\r\n\tdlg.show();\r\n\r\n}\r\n\r\nfunction createPhoto() {\r\n\tCloud.Photos.create({\r\n\t\tphoto : Titanium.Filesystem.getFile($.myimage.image),\r\n\r\n\t\tuser_id : user.id\r\n\r\n\t}, function(e) {\r\n\t\tif (e.success) {\r\n\t\t\tvar photo = e.photos[0];\r\n\t\t\talert('Success:\\n' + 'id: ' + photo.id + '\\n' + 'filename: ' + photo.filename + '\\n' + 'size: ' + photo.size, 'updated_at: ' + photo.updated_at);\r\n\r\n\t\t} else {\r\n\t\t\talert(JSON.stringify(e));\r\n\t\t}\r\n\t});\r\n}", "updateAuthor": { "name": "raybelisle", "key": "raybelisle", "displayName": "Ray Belisle", "active": true, "timeZone": "America/Edmonton" }, "created": "2015-11-03T04:42:50.000+0000", "updated": "2015-11-03T04:42:50.000+0000" }, { "id": "368764", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "[~raybelisle] Could you try running this on terminal to get an updated SDK\r\n`appc ti sdk install -d -b 5_0_X` Which contains 5.0.3 with the fixes.\r\n\r\nLet me know if it works for you.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-11-03T05:15:50.000+0000", "updated": "2015-11-03T05:18:09.000+0000" }, { "id": "368770", "author": { "name": "raybelisle", "key": "raybelisle", "displayName": "Ray Belisle", "active": true, "timeZone": "America/Edmonton" }, "body": "Yes, that works. Any idea when 5.03GA will be available? I would love to update to the latest SDK but would want it to be a tested version\r\n", "updateAuthor": { "name": "raybelisle", "key": "raybelisle", "displayName": "Ray Belisle", "active": true, "timeZone": "America/Edmonton" }, "created": "2015-11-03T06:40:21.000+0000", "updated": "2015-11-03T06:40:21.000+0000" }, { "id": "368773", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "5.0.3 is essentially 5.0.2.GA with the fixes particular to this issue. Right now what's lined up is 5.1.0.GA.\r\nhttps://community.appcelerator.com/topic/3897/sdk-5-1-0-beta-and-studio-4-4-0-beta-now-available\r\nSDK 5.1.0.Beta is now available. Next would be 5.1.0.GA.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-11-03T06:47:53.000+0000", "updated": "2015-11-03T06:47:53.000+0000" }, { "id": "368774", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "Resolving this issue as Duplicate of TIMOB-19784", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2015-11-03T06:48:45.000+0000", "updated": "2015-11-03T06:48:45.000+0000" }, { "id": "415214", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as duplicate as the relevant ticket is linked above.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T23:08:06.000+0000", "updated": "2017-03-22T23:08:06.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }