cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The operation couldn’t be completed. (dropbox.com error 1000.)

The operation couldn’t be completed. (dropbox.com error 1000.)

Javier B.12
New member | Level 1

I am developing an app that uses Dropbox SDK to download files from user dropbox account.

I am able to list contents and contentMetadata, but when i try to download them i am always getting the following error:

DropboxSDK: error making request to /1/files/dropbox//SuiteJuridica/navigationBar-start.png - (1000) Error Domain=dropbox.com Code=1000 "The operation couldn’t be completed. (dropbox.com error 1000.)"

I have also developed other app from scratch using the same app credentials and i am able to download the very same file from the same account.

After looking into DBRequest errors error 1000 means Generic error, so that i cannot go further with the causes. Find attached a fragment of code used to download the content from my app:

 

NSString *api = item.name;

        

        NSString *apiToSend=@"/SuiteJuridica";

        

        //apiToSend = [apiToSend stringByAppendingString:[NSString stringWithFormat:@"/%@",api]];

        

        NSLog(@"the api is :%@", apiToSend);

        

        NSString *filename = [api lastPathComponent];

        NSString *destPath = [apiToSend stringByAppendingPathComponent:filename];

        destPath=[@"/" stringByAppendingString:destPath];

        

        NSLog(@"dst path : %@", destPath);

        NSLog(@"file name : %@", filename);

        

        /*NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSDownloadsDirectory, NSUserDomainMask, YES);

         NSString *documentPath = [searchPaths objectAtIndex:0];

         */

        NSString *tmpDir = NSTemporaryDirectory();

        NSString *tmpFileName = [tmpDir stringByAppendingPathComponent:filename];

        NSLog(@"temporary directory, %@", tmpDir);

        

        [[self restClient] loadFile:destPath intoPath:tmpFileName];

 

Thanks in advance for any help

 

 

7 Replies 7

Greg-DB
Dropbox Staff

It looks like you have a double slash in the URL for the API call:

dropbox//SuiteJuridica

Can you try fixing that and let me know if it doesn't help?

Javier B.12
New member | Level 1

Hi Gregory, i am afraid it returns the same error:

 [WARNING] DropboxSDK: error making request to /1/files/dropbox/SuiteJuridica/navigationBar-start.png - (1000) Error Domain=dropbox.com Code=1000 "(null)" UserInfo={path=/SuiteJuridica/navigationBar-start.png, destinationPath=/private/var/mobile/Containers/Data/Application/586632A8-0A53-48D6-9474-495C44033875/tmp/navigationBar-start.png}

2015-11-30 09:33:02.480 El Derecho 2.0[252:67525] There was an error loading the file: Error Domain=dropbox.com Code=1000 "(null)" UserInfo={path=/SuiteJuridica/navigationBar-start.png, destinationPath=/private/var/mobile/Containers/Data/Application/586632A8-0A53-48D6-9474-495C44033875/tmp/navigationBar-start.png}

 

Any idea?

 

Thanks a lot for your help

Greg-DB
Dropbox Staff

Looking more closely at your code, it seems like you may have the parameters to loadFile reversed. The definition is:

/* Loads the file contents at the given root/path and stores the result into destinationPath */
- (void)loadFile:(NSString *)path intoPath:(NSString *)destinationPath;

That is, path is the local path, and destinationPath is the desired remote path in Dropbox, but your code seems to have these reversed. (Edit, nevermind, I believe I read this wrong.)

Javier B.12
New member | Level 1

Hi Gregory.

 

If i change the order of loadFile method i get the following answer:

 

 [WARNING] DropboxSDK: error making request to /1/files/dropbox/private/var/mobile/Containers/Data/Application/FFCCB518-DBAC-4BB6-B92F-88FE30BADBDC/tmp/Comenzar.pdf - (404) File not found

 

However , after that call i try to download the content with old code and i receive again the 1000 error:

DropboxSDK: error making request to /1/files/dropbox/Suite Jurídica/Prueba/Comenzar.pdf - (1000) Error Domain=dropbox.com Code=1000 "(null)" UserInfo={path=/Suite Jurídica/Prueba/Comenzar.pdf, destinationPath=/var/mobile/Containers/Data/Application/FFCCB518-DBAC-4BB6-B92F-88FE30BADBDC/Library/Caches/CFS/dropbox/66703823/userdata/Suite Jurídica/Prueba/Comenzar.pdf}

 

I think there should be something in our app that throws this error but i have double checked the configuration and the dummy app configuration where it works as expected and both of them are pretty the same.

Thanks a lot

Greg-DB
Dropbox Staff

The new code gives us a more useful error, telling us that there's nothing at "/private/var/mobile/Containers/Data/Application/FFCCB518-DBAC-4BB6-B92F-88FE30BADBDC/tmp/Comenzar.pdf" in the Dropbox account, which isn't surprising, since that looks like a local path. Make sure you're using and formatting the right paths.

If you're still having trouble, perhaps you can share the log output so we can get a better idea of the values of each parameter?

Javier B.12
New member | Level 1

Hi Gregory.

 

I don't think the issue is located in parameters order, let me explain why.

In our dummy application we set up the following parameters:

2015-12-02 09:24:00.881 DbTestUpload[569:234495] the api is :/Suite Jurídica/nueva
2015-12-02 09:24:00.881 DbTestUpload[569:234495] dst path : //Suite Jurídica/nueva/2010_196117.pdf
2015-12-02 09:24:00.881 DbTestUpload[569:234495] file name : 2010_196117.pdf
2015-12-02 09:24:00.882 DbTestUpload[569:234495] temporary directory, /private/var/mobile/Containers/Data/Application/92572AFB-A152-4375-AB64-73E48BCB6202/tmp/

And it downloads the file as expected.

But in our live application (which is currently in the app store with an old implementation and old sdk) we set up the following parameters:

2015-12-02 10:01:02.375 El Derecho 2.0[615:242613] the api is :/Suite Jurídica/nueva
2015-12-02 10:01:02.375 El Derecho 2.0[615:242613] dst path : //Suite Jurídica/nueva/2010_196117.pdf
2015-12-02 10:01:02.376 El Derecho 2.0[615:242613] file name : 2010_196117.pdf
2015-12-02 10:01:02.376 El Derecho 2.0[615:242613] temporary directory, /private/var/mobile/Containers/Data/Application/C535D2D8-EE86-4464-A727-ACA5D8B2426C/tmp/

As you can check they are pretty the same, only changes the application id to store the tmp file, but in this case it returns:

[WARNING] DropboxSDK: error making request to /1/files/dropbox//Suite Jurídica/nueva/2010_196117.pdf - (1000) Error Domain=dropbox.com Code=1000 "(null)" UserInfo={path=//Suite Jurídica/nueva/2010_196117.pdf, destinationPath=/private/var/mobile/Containers/Data/Application/8D201BEA-80CA-4C95-A4BB-CB7F99623D90/tmp/2010_196117.pdf}

I am wondering whether it could be possible to log those requests that work properly in order yo check the url we are trying to surf or something like that.

Thanks a lot

Greg-DB
Dropbox Staff

We may be able to look into this more specifically for you. Please open an API ticket so we can do so:

https://www.dropbox.com/developers/contact

Make sure to include:

- the app name or key for the app having the problem

- the version number of the SDK you're using

- the exact code that produces the issue

- the exact output/error received, including the logged values, as above

Thanks in advance! 

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Javier B.12 New member | Level 1
What do Dropbox user levels mean?