Forum Discussion

Mark L.45's avatar
Mark L.45
Collaborator | Level 9
10 years ago

nil cursor never returned

Using this call 

https://api.dropboxapi.com/2/sharing/list_shared_links

Getting a cursor back cause I had many many links; was working well, until this evening when it stopped working and now just loops, returning the same cursor again and again.

Tried revoking my share?

Tried deleting all the links, have only 15 now?

Tried restarting everything?

Nothing works? project has come to a standstill tonight... it not my code, its the dropbox server? too many links perhaps?

Can someone check your end?

 

 

8 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    10 years ago

    Mark, can you share a sample response or two that's giving you trouble? Thanks in advance! 

  • Mark L.45's avatar
    Mark L.45
    Collaborator | Level 9
    10 years ago

    Sure, this is what I get returned, again and again and again.

     

    Body: Optional({"links": [{".tag": "file", "url": "https://www.dropbox.com/s/v2a989i8yfmmmvw/acme2048A.001.png?dl=0", "id": "id:piyP0EHNIGAAAAAAAAAAAQ", "name": "acme2048A.001.png", "path_lower": "/slidestack/acme2048a/acme2048a.001.png", "link_permissions": {"resolved_visibility": {".tag": "public"}, "requested_visibility": {".tag": "public"}, "can_revoke": true}, "client_modified": "2016-05-19T18:39:07Z", "server_modified": "2016-05-19T18:39:08Z", "rev": "1848bb52c3", "size": 62002}], "has_more": true, "cursor": "eyJwcm9nIjogIjE0NjM2ODQ4NzEiLCAic2lnIjogIkFaTTRTLUJ6ajE1Q1U2aUluRVJ6dUdjSXlWTkplVDdjYXd3Ty1BQW55bHdReVEifQ"})

    The time shown here 18:39 is roughly the time it broke I suspect. My code resubmits list sharing links with this cursor and gets back the same cursor, we never move ahead?

    Just tried it again this morning, now 06:27 so almost 12 hours later and it behaves the same way.

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

    Thanks, that's helpful! We're looking into it.

    I can't offer a timeline for a fix right now, so you may want to detect this scenario (e.g., based on the repeated cursor and has_more=true) to work around it for now.

  • Mark L.45's avatar
    Mark L.45
    Collaborator | Level 9
    10 years ago

    Maybe a clue, was testing an app I written that uses shares; I had created around 800+ @ that point, changed the code yesterday morning to work around it, going to try it this morning perhaps, maybe put in your fix Gregory, a good suggestion. 

  • test s.'s avatar
    test s.
    New member | Level 1
    10 years ago

    I started seeing this in my application. Can you please provide a timeline/date for this fix. 

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

    No update or timeline for this right now.

  • Mark L.45's avatar
    Mark L.45
    Collaborator | Level 9
    10 years ago

    Again seeing this feature. Wrote a PERL script that gets around it, using Greg's suggestion.

    #!/usr/bin/perl

    use JSON;

    use Data::Dumper;

     

    $preheat = `curl -X POST https://api.dropboxapi.com/2/sharing/list_shared_links  --header "Authorization: Bearer ab-YourAUTH"  --header "Content-Type: application/json"  --data "{}"`;

    $pcursor = $cursor = ";

     

    do {

    $pcursor = $cursor;

    $text = decode_json($preheat);

    print  Dumper($text);

    $cursor = $text->{'cursor'};

    #print "[$pcursor] [$cursor]\n";

    if ($cursor ne $pcursor) {

    $paras = "\\\"cursor\\\":\\\"$cursor\\\";

    $cmd = "curl -X POST https://api.dropboxapi.com/2/sharing/list_shared_links  --header \"Authorization: Bearer ab-YourAUTH\"  --header \"Content-Type: application/json\"  --data \"{$paras}\";

    $preheat = `$cmd`;

    } else {

    $cursor = ";

    }

    } until ($cursor eq ");

About Dropbox API Support & Feedback

Node avatar for 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!