We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Mark R.5
9 years agoHelpful | Level 5
Obj-C V2 disk error after uploadUrl
If I try to backup up my database file using the uploadUrl method, when I next try to access the database using Core Data I get the following error:
CoreData: error: -executeRequest: encountered exception = I/O error for database at /var/mobile/Containers/Data/Application/2B4358FA-A339-49B0-8F7E-6D04CE21C7F7/Documents/SpendingTracker.sqlite. SQLite error code:6922, 'disk I/O error' with userInfo = {
NSFilePath = "/var/mobile/Containers/Data/Application/2B4358FA-A339-49B0-8F7E-6D04CE21C7F7/Documents/SpendingTracker.sqlite";
NSSQLiteErrorDomain = 6922;
}
The Dropbox Sync SDK used to have a 'shouldSteal' option when loading. According to the documentation this would cause the file to be copied before uploading. I did this myself by making a temp copy, uploading that and then deleting it afterwards. The problem then went away, but it would be good if the framework handled it for you, or the issue was documented.
4 Replies
- Greg-DB9 years ago
Dropbox Community Moderator
Thanks for the post! I'm glad to hear you were able to work around this issue, though I'm not sure I understand exactly what the issue was. When using uploadUrl, the SDK should upload the data from whatever URL you supply, but as far as I'm aware it shouldn't then affect the local file, e.g., in a way to cause an error like this.
Is that the entirety of the output you got when you ran in to that issue? - Mark R.59 years agoHelpful | Level 5
I will give you as much info as I can. First off I upload the file using a method like this:
[client uploadUrl:@"/File.sqlite" mode:[[[DBFILESWriteMode alloc] initWithOverwrite] autorelease] autorename:@NO clientModified:nil mute:@YES inputUrl:inputUrl];
Then, when I next do a
[NSFetchedResultsController performFetch:]
against the database, I get the following error:
2017-03-31 15:53:59.022073 App[12260:3128970] [error] error: (6922) I/O error for database at /var/mobile/Containers/Data/Application/172114D0-4346-48F1-ACAE-23A76EC9C339/Documents/File.sqlite. SQLite error code:6922, 'disk I/O error' CoreData: error: (6922) I/O error for database at /var/mobile/Containers/Data/Application/172114D0-4346-48F1-ACAE-23A76EC9C339/Documents/App.sqlite. SQLite error code:6922, 'disk I/O error' 2017-03-31 15:56:29.270469 App[12260:3128970] [error] error: -executeRequest: encountered exception = I/O error for database at /var/mobile/Containers/Data/Application/172114D0-4346-48F1-ACAE-23A76EC9C339/Documents/File.sqlite. SQLite error code:6922, 'disk I/O error' with userInfo = { NSFilePath = "/var/mobile/Containers/Data/Application/172114D0-4346-48F1-ACAE-23A76EC9C339/Documents/File.sqlite"; NSSQLiteErrorDomain = 6922; } CoreData: error: -executeRequest: encountered exception = I/O error for database at /var/mobile/Containers/Data/Application/172114D0-4346-48F1-ACAE-23A76EC9C339/Documents/File.sqlite. SQLite error code:6922, 'disk I/O error' with userInfo = { NSFilePath = "/var/mobile/Containers/Data/Application/172114D0-4346-48F1-ACAE-23A76EC9C339/Documents/File.sqlite"; NSSQLiteErrorDomain = 6922; } - Greg-DB9 years ago
Dropbox Community Moderator
Thanks for the additional information! We'll take a look to see if we can figure out what's going on here. - Stephen C.149 years ago
Dropbox Staff
Hi Mark, thanks for bringing this up. Unfortunately, based on the SDK design, there isn't a great way for the SDK to expose file move errors to the end user, without seriously cluttering up the interface.
If your solution of manually moving the files to a temp location is feasible for you, then I'm inclined to hold off on adding this feature to the SDK itself, for the moment.
Sorry I can't be more helpful! Let us know if you run into any other issues, or have additional feedback for the SDK. Good luck!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!