{ "id": "168528", "key": "TIMOB-25056", "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": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" } ], "resolution": null, "resolutiondate": null, "created": "2017-06-20T16:36:03.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [], "issuelinks": [ { "id": "55535", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "168933", "key": "TIMOB-24954", "fields": { "summary": "Android 7: ImageView with an array of images does not work using ti SDK 6.1.1.GA", "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": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-02-12T11:28:48.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "When using Ti.Media.showCamera on Android 7.0 with Ti SDK 6.1.0 the camera app will crash after the user takes a photo and either taps Retry or presses the back button. It's very easy to reproduce by running the method Ti.Media.showCamera(options).\r\n\r\nBelow is the exception and seems to be caused by the new TiFileProvider\r\n\r\n[ERROR] DatabaseUtils: Writing exception to parcel\r\n[ERROR] DatabaseUtils: java.lang.UnsupportedOperationException: No external deletions\r\n[ERROR] DatabaseUtils: \tat org.appcelerator.titanium.io.TiFileProvider.delete(TiFileProvider.java:45)\r\n[ERROR] DatabaseUtils: \tat android.content.ContentProvider$Transport.delete(ContentProvider.java:344)\r\n[ERROR] DatabaseUtils: \tat android.content.ContentProviderNative.onTransact(ContentProviderNative.java:206)\r\n[ERROR] DatabaseUtils: \tat android.os.Binder.execTransact(Binder.java:573)", "attachment": [], "flagged": false, "summary": "On Android 7.0 Ti.Media.showCamera crashes after taking photo and tapping Retry or pressing back button", "creator": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "environment": "Android 7.0 running Ti SDK 6.1.0", "comment": { "comments": [ { "id": "422402", "author": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "body": "The specific device we are seeing this issue on is Samsung S7 running Android 7.0.", "updateAuthor": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "created": "2017-06-20T21:22:16.000+0000", "updated": "2017-06-20T21:22:16.000+0000" }, { "id": "422411", "author": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "body": "Here is a better stack trace:\r\n\r\n06-20 18:03:38.643 17691 17703 E DatabaseUtils: Writing exception to parcel\r\n06-20 18:03:38.643 17691 17703 E DatabaseUtils: java.lang.UnsupportedOperationException: No external deletions\r\n06-20 18:03:38.643 17691 17703 E DatabaseUtils: \tat org.appcelerator.titanium.io.TiFileProvider.delete(TiFileProvider.java:45)\r\n06-20 18:03:38.643 17691 17703 E DatabaseUtils: \tat android.content.ContentProvider$Transport.delete(ContentProvider.java:344)\r\n06-20 18:03:38.643 17691 17703 E DatabaseUtils: \tat android.content.ContentProviderNative.onTransact(ContentProviderNative.java:206)\r\n06-20 18:03:38.643 17691 17703 E DatabaseUtils: \tat android.os.Binder.execTransact(Binder.java:573)\r\n06-20 18:03:38.644 18280 22759 I SA : [OCP] Cursor is not null\r\n06-20 18:03:38.644 25323 25323 D AndroidRuntime: Shutting down VM\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: FATAL EXCEPTION: main\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: Process: com.sec.android.app.camera, PID: 25323\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2001, result=0, data=Intent { launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 }(has extras) }} to activity {com.sec.android.app.camera/com.sec.android.app.camera.Camera}: java.lang.UnsupportedOperationException: No external deletions\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat android.app.ActivityThread.deliverResults(ActivityThread.java:4525)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat android.app.ActivityThread.handleSendResult(ActivityThread.java:4568)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat android.app.ActivityThread.-wrap22(ActivityThread.java)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:1706)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat android.os.Handler.dispatchMessage(Handler.java:102)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat android.os.Looper.loop(Looper.java:154)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat android.app.ActivityThread.main(ActivityThread.java:6688)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat java.lang.reflect.Method.invoke(Native Method)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: Caused by: java.lang.UnsupportedOperationException: No external deletions\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:167)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat android.content.ContentProviderProxy.delete(ContentProviderNative.java:544)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat android.content.ContentResolver.delete(ContentResolver.java:1377)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat com.sec.android.app.camera.Camera.onActivityResult(Camera.java:5153)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat android.app.Activity.dispatchActivityResult(Activity.java:7226)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \tat android.app.ActivityThread.deliverResults(ActivityThread.java:4521)\r\n06-20 18:03:38.645 25323 25323 E AndroidRuntime: \t... 9 more", "updateAuthor": { "name": "btknorr", "key": "btknorr", "displayName": "Brian Knorr", "active": true, "timeZone": "America/Chicago" }, "created": "2017-06-20T22:08:27.000+0000", "updated": "2017-06-20T22:11:01.000+0000" }, { "id": "425258", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm unable to reproduce using this test case:\r\n{code:js}\r\nvar win = Titanium.UI.createWindow({layout: 'vertical'}),\r\n openCamera = Ti.UI.createButton({title: 'OPEN CAMERA', width: Ti.UI.FILL, height: '40dp'}),\r\n preview = Ti.UI.createImageView({backgroundColor: 'red', height: Ti.UI.FILL, width: Ti.UI.FILL});\r\n\r\nfunction showCamera() {\r\n if (Ti.Media.hasCameraPermissions()) {\r\n Ti.Media.showCamera({\r\n success: function(e) {\r\n preview.image = e.media;\r\n Ti.Media.hideCamera();\r\n },\r\n cancel: function() {\r\n Ti.API.info('canceled');\r\n },\r\n error: function(e) {\r\n Ti.API.info('error: ' + JSON.stringify(e, null, ' '));\r\n },\r\n mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO]\r\n });\r\n } else {\r\n Ti.Media.requestCameraPermissions(function(e) {\r\n if (e.success) {\r\n showCamera();\r\n }\r\n });\r\n }\r\n}\r\n\r\nopenCamera.addEventListener('click', function() {\r\n showCamera();\r\n});\r\n\r\nwin.add(openCamera);\r\nwin.add(preview);\r\n\r\nwin.open();\r\n{code}\r\n\r\nCould you provide a test case that reproduces this issue?", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-08-02T12:57:56.000+0000", "updated": "2017-08-02T12:57:56.000+0000" }, { "id": "425309", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "hey [~gmathews] per customer: just generate a new Alloy project and add these lines of code in the app/controllers/index.js file:\r\n{code:js}\r\nvar showCamera = function() {\r\nTi.Media.showCamera({\r\nmediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO],\r\nsuccess: function() {},\r\ncancel: function() {},\r\nerror: function() {}\r\n});\r\n};\r\n\r\nif (Ti.Media.hasCameraPermissions()) {\r\nshowCamera();\r\n} else {\r\nTi.Media.requestCameraPermissions(function(result) {\r\nif (result.success) {\r\nshowCamera();\r\n}\r\n});\r\n}\r\n{code}", "updateAuthor": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-08-02T18:40:15.000+0000", "updated": "2017-08-02T18:40:15.000+0000" }, { "id": "427508", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~vvazquezmontero] Tested the case above, I cannot reproduce the issue. Pressing {{Retry}} or navigating back works as expected.", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-01T14:12:17.000+0000", "updated": "2017-09-01T14:12:17.000+0000" }, { "id": "427653", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~lchoudhary] Please try this one and see if you can reproduce.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-06T20:57:02.000+0000", "updated": "2017-09-06T20:57:02.000+0000" }, { "id": "428035", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~lchoudhary] Do we have any update on this ticket? ", "updateAuthor": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-09-18T18:26:00.000+0000", "updated": "2017-09-18T18:26:00.000+0000" }, { "id": "429723", "author": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Lokesh Choudhary, I have also faced this error on Nokia 5 - Android OS 7.1.2 today morning. I ran many many tests but could not find anything on console. When app crashes, it doesn't even prints on console, not even in Trace Console mode. There's just nothing printed on console.\r\n\r\nAs per tests I ran, I can surely say 1 thing that since I was not able to see any log on console, it's pretty much sure that no callback is called at all. neither success, nor cancel, nor error callback.\r\n\r\nI had two camera apps installed, one is device's inbuilt camera & other a 3rd party app. I noticed something very weird that after clearing the Default Camera app, showCamera() method shows a list to chose camera & if I chose camera A for very first time, app crashes even after pressing back button without capturing photo.\r\n\r\nNext time I choose Camera A again, & it doesn't crash. But if I chose Camera B after Camera A, it crashes without any callback called.\r\n\r\nSo, it's sure that switching between camera apps crashes the app, be it inbuilt camera app or any other 3rd party app. You guys really need to figure this out since the camera feature is not working at all in Android 7 or +", "updateAuthor": { "name": "prashant_saini", "key": "prashant_saini", "displayName": "Prashant Saini", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-10-27T05:34:50.000+0000", "updated": "2017-10-27T05:36:14.000+0000" }, { "id": "434190", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~lchoudhary] this ticket can be closed ", "updateAuthor": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-07T19:51:10.000+0000", "updated": "2018-02-07T19:51:10.000+0000" }, { "id": "434199", "author": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~lchoudhary] we are good to close original servicenow ticket is closed ", "updateAuthor": { "name": "vvazquezmontero", "key": "vvazquezmontero", "displayName": "Victor Vazquez Montero", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-02-07T21:52:51.000+0000", "updated": "2018-02-07T21:52:51.000+0000" } ], "maxResults": 18, "total": 18, "startAt": 0 } } }