{ "id": "172156", "key": "TIMOB-26347", "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": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-09-01T12:48:34.000+0000", "created": "2018-08-31T15:09:32.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2019-03-16T01:32:19.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Since 7.3.0.GA+ I'm seeing an error when calling setRemoteBackup(bool) on an individual File object. \"Could not configure remote backup: The file “mydatabase.db” couldn’t be opened.\" (Setting the flag on a folder works fine,)\r\n\r\nLooking at the code in TiFilesystemFileProxy.m around line 570, it appears that the object is setting the flag correctly (on the 'URL'), but then continues to treat the object as a folder, get the contents then output (not throw) an error if no contents are found. (Which a single file will always fail on).\r\n\r\nIt's not a fatal error, but the code just shouldn't have got that far to output the ERROR message.\r\n\r\nA quick fix would be to change the setRemoteBackup method to : \r\n\r\n{code:objc}\r\n- (void)setRemoteBackup:(id)value\r\n{\r\n ENSURE_TYPE(value, NSNumber);\r\n BOOL isExcluded = ![TiUtils boolValue:value def:YES];\r\n NSNumber *isDirectory;\r\n BOOL success = [[NSURL fileURLWithPath:[self path]] getResourceValue:&isDirectory forKey:NSURLIsDirectoryKey error:nil];\r\n if (success && [isDirectory boolValue]) {\r\n [self addSkipBackupAttributeToFolder:[NSURL fileURLWithPath:[self path]] withFlag:isExcluded];\r\n } else {\r\n [self addSkipBackupAttributeToItemAtURL:[NSURL fileURLWithPath:[self path]] withFlag:isExcluded];\r\n }\r\n}\r\n{code}\r\n\r\n\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "IOS: setRemoteBackup(flag) outputs an ERROR message when used on individual files. ", "creator": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "environment": null, "comment": { "comments": [ { "id": "441263", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I don't think this is 7.3.0+ only, because the method wasn't changed for 1+ year. I agree on the improvement, can you file a PR for that?", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-08-31T18:29:14.000+0000", "updated": "2018-08-31T18:29:14.000+0000" }, { "id": "441271", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/10302", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-01T12:12:52.000+0000", "updated": "2018-09-01T12:12:52.000+0000" }, { "id": "442070", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "*Closing ticket.* Verified fix in SDK version {{7.5.0.v20180925002114}}. setRemoteBackup(fla g) no longer outputs an ERROR message when used on individual files.\r\n\r\n*FR passed (Test steps)*\r\n# Created a new project using the sample code from https://github.com/appcelerator/alloy/tree/master/samples/apps/models/sql_preload\r\n# Ran the program\r\n# No longer saw the following error which could be seen in (7.4.0.GA)\r\n{code:java}\r\n[ERROR] : Could not configure remote backup: The file “fighters.sql” couldn’t be opened.\r\n{code}\r\n\r\n\r\n*Test Environment*\r\nAPPC Studio: 5.1.0.201808080937\r\niphone 6 (11.3)\r\nAPPC CLI: 7.0.7-master.1\r\nOperating System Name: Mac OS Mojave\r\nOperating System Version: 10.14\r\nNode.js Version: 8.9.1\r\nXcode 10.0", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-26T15:11:17.000+0000", "updated": "2018-09-26T15:11:38.000+0000" }, { "id": "442832", "author": { "name": "mr.jatinjoshi.mca@gmail.com", "key": "mr.jatinjoshi.mca@gmail.com", "displayName": "JATIN JOSHI", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I see the same error in my project compiled with SDK 7.4.1\r\n\r\nI cannot use 7.5.0 as GA version is not yet launched. I need to use stable one, being working for any enterprise.", "updateAuthor": { "name": "mr.jatinjoshi.mca@gmail.com", "key": "mr.jatinjoshi.mca@gmail.com", "displayName": "JATIN JOSHI", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-10-22T15:26:40.000+0000", "updated": "2018-10-22T15:26:40.000+0000" }, { "id": "442835", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~mr.jatinjoshi.mca@gmail.com] just do the change in the description under \"quick fix\" in your 7.4.1 folder. The file and place is described in the PR: https://github.com/appcelerator/titanium_mobile/pull/10302/files\r\nWorks fine for me", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-10-22T17:36:55.000+0000", "updated": "2018-10-22T17:36:55.000+0000" }, { "id": "446930", "author": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "body": "I am still having this issue when using 8.0.0.GA\r\n\r\n{code}\r\nCould not configure remote backup: The file “...” couldn’t be opened.\r\n{code}", "updateAuthor": { "name": "mdelmarter", "key": "mdelmarter", "displayName": "Matthew Delmarter", "active": true, "timeZone": "Pacific/Auckland" }, "created": "2019-03-16T01:32:19.000+0000", "updated": "2019-03-16T01:32:19.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }