Cut the Clutter: Test Ignore Files Feature - sign up to become a beta tester here.

Forum Discussion

Omri1984's avatar
Omri1984
Explorer | Level 4
4 years ago

Urgent - Create Folder Returning null

hello ,my company (Cloudsfder) are doing data migration for customer from goolge derive to dropbox , 5 TB ,

we are getting weird behavior when creating some of the folders- the request just returning null,

and if i retry sometimes it is work and sometimes still getting null,

 

this is very  weird 

please Help

8 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    4 years ago

    I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:

    • the name and version number of the platform and SDK/library you are using, if any
    • the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
    • the full text of any error or unexpected output
  • Omri1984's avatar
    Omri1984
    Explorer | Level 4
    4 years ago

    Official Dropbox .Net v2 SDK

     

    Dropbox.Api.4.7.0\lib\net45\Dropbox.Api.dll

     

    Method: /files/create_folder_v2

    app key :jbei6w7fwpgrzgq

    app key business : li4q7wb8ayguxmy

     

    the steps are only call create folder,

    but we are migrating 5 Tb so we are making many request -maybe we hit a rate limit? but no response only null. 

    not event an error just a null response

    Thanks omri

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    4 years ago

    I see you're using v4.7.0 of the Dropbox .NET SDK, which is relatively old now. We recommend updating to the latest version, currently v6.16.0.

     

    In any case, you mentioned you're using /files/create_folder_v2. That's the API route itself, which would correspond to a native method in the SDK, such as CreateFolderV2Async.

     

    Please share the actual code and show whatever result/response you are getting so we can look into it and try to reproduce the issue. For instance, if you're inspecting the actual HTTPS response, please show the whole thing, including headers, or if you're using a native method in the SDK like mentioned above, please show what type and value it is returning or raising. Thanks!

  • Omri1984's avatar
    Omri1984
    Explorer | Level 4
    4 years ago

    Client.AsMember(request.AsMember).Files.CreateFolderV2Async(prefix + name)

     

    this is the actual request from the SDK I am using.

    and I am not getting any response only null, that is why this is so weird 

     

     

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    4 years ago

    Can you clarify what you mean when you say you are only getting "null"? Is that the value being returned by the CreateFolderV2Async method itself, or is the method raising an exception?

     

    Also, the code you shared here does not show you retrieving the return value, nor handling any exceptions. Additionally, CreateFolderV2Async is an async method, but you don't seem to be awaiting it or checking the result, at least in the code you shared here. And, what is the type "request" object in this code?

     

    Please share the full relevant code and output so we can understand the issue in context in order to investigate and offer help.

  • Omri1984's avatar
    Omri1984
    Explorer | Level 4
    4 years ago

    now it is clear for me i miss somthing ,

    we are getting 

    too_many_write_operations/.

     

    what is the rate limit for writes?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    4 years ago

    If there are multiple changes at the same time in the same account or shared folder (or more accurately, "namespace"), you can run in to this 'too_many_write_operations' error, which is "lock contention". That's not explicit rate limiting, but rather a result of how Dropbox works on the back-end. This is a technical inability to make a modification in the account or shared folder at the time of the API call. This error indicates that there was simultaneous activity in the account or shared/team folder preventing your app from making the state-modifying call (e.g., adding, editing, moving, copying, sharing, or deleting files/folders) it is attempting. The simultaneous activity could be coming from your app itself, or elsewhere, e.g., from the user's desktop client. It can come from the same user, or another member of a shared folder. You can find more information about lock contention here.

     

    The app should be written to automatically handle this error when it occurs, but to help avoid this error to begin with, you should avoid making multiple concurrent state modifications in the same namespace and use batch endpoints where possible, such as CreateFolderBatchAsync. That won't guarantee that you won't run in to this error though, as contention can still come from other sources, so you should also implement error handling and automatic retrying as needed.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,037 PostsLatest Activity: 23 hours ago
413 Following

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 or Facebook.

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!