dropbox-sdk-obj-c icon indicating copy to clipboard operation
dropbox-sdk-obj-c copied to clipboard

Batch download randomly failing

Open guidedways opened this issue 6 years ago • 2 comments

This was an issue reported perhaps a year ago and was fixed. I've recently moved to the batch upload / download APIs and am now seeing the following. The reliability of sync nosedived in the app after the reset switch, and I can now see the logs riddled with these:

Error Domain=NSCocoaErrorDomain Code=4 "“620836A0-98B4-402F-9ACD-10A67AB1D308” couldn’t be moved to “tmp” because either the former doesn’t exist, or the folder containing the latter doesn’t exist." UserInfo={NSSourceFilePathErrorKey=/Users/<user>/Library/Developer/CoreSimulator/Devices/3EB61F50-E618-45B1-878C-A36F11EC9BA8/data/Containers/Data/Application/2EF3A736-65AE-446D-957A-C5AEDB5195E7/tmp/620836A0-98B4-402F-9ACD-10A67AB1D308, NSUserStringVariant=(
    Move
), NSDestinationFilePath=/Users/<user>/Library/Developer/CoreSimulator/Devices/3EB61F50-E618-45B1-878C-A36F11EC9BA8/data/Containers/Data/Application/2EF3A736-65AE-446D-957A-C5AEDB5195E7/tmp/o_u_k_8a3b7f1395ab4a59821ef8948c6d834fstarred_p__i__d_.col.gz, NSFilePath=/Users/<user>/Library/Developer/CoreSimulator/Devices/3EB61F50-E618-45B1-878C-A36F11EC9BA8/data/Containers/Data/Application/2EF3A736-65AE-446D-957A-C5AEDB5195E7/tmp/620836A0-98B4-402F-9ACD-10A67AB1D308, NSUnderlyingError=0x600003010900 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

I'm using v3.9.1 of the library

guidedways avatar Sep 25 '18 12:09 guidedways

In file DBDelegate.m changing this:

tmpOutputPath = [tmpDirPath stringByAppendingPathComponent:[NSUUID UUID].UUIDString];

to the following fixed these errors for me:

tmpOutputPath = [[tmpDirPath stringByAppendingPathComponent:[NSUUID UUID].UUIDString] stringByAppendingPathExtension:@"tmp"];

It's as if a file without an extension is failing for some reason.

guidedways avatar Sep 25 '18 14:09 guidedways

Can you share the code to reproduce this issue? Thanks in advance!

greg-db avatar Sep 25 '18 17:09 greg-db