cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Check out the Dropbox cheat sheet for getting started in 2021 here!

Discuss Dropbox Developer & API

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

ServerException on createSharedLinkWithSettings()

ServerException on createSharedLinkWithSettings()

Explorer | Level 3

Hi.

I am using the DropBox Core Java SDK from my Java application (v3.1.0 JARs).

In particular, I am uploading a certain number of small files (around 200 files, around 200 KB each), and for each file I am invoking the following code to get a public URL to the file:

============

DbxRequestConfig reqConfig = new DbxRequestConfig(CLIENT_IDENTIFIER);
DbxClientV2 client = new DbxClientV2(reqConfig, myAccessToken);
SharedLinkMetadata sharedLinkData = client.sharing().createSharedLinkWithSettings(pathInDropbox);
String shareablePreviewURL = sharedLinkData.getUrl();

============

 

For most files in my set, everything works fine. Just for 2/3 files out of 200, it is raising the following exception:

 

=============

com.dropbox.core.ServerException
at com.dropbox.core.DbxRequestUtil.unexpectedStatus(DbxRequestUtil.java:382)
at com.dropbox.core.v2.DbxRawClientV2$1.execute(DbxRawClientV2.java:154)
at com.dropbox.core.v2.DbxRawClientV2.executeRetriable(DbxRawClientV2.java:330)
at com.dropbox.core.v2.DbxRawClientV2.executeRetriableWithRefresh(DbxRawClientV2.java:351)
at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:137)
at com.dropbox.core.v2.sharing.DbxUserSharingRequests.createSharedLinkWithSettings(DbxUserSharingRequests.java:465)
at com.dropbox.core.v2.sharing.DbxUserSharingRequests.createSharedLinkWithSettings(DbxUserSharingRequests.java:495)

[...]

=============

 

If I apply a "retry" policy in my application code, then calling again the createSharedLinkWithSettings() will result in the following exception:

 

=============

com.dropbox.core.v2.sharing.CreateSharedLinkWithSettingsErrorException: Exception in 2/sharing/create_shared_link_with_settings: {".tag":"shared_link_already_exists","shared_link_already_exists":{".tag":"metadata","metadata":{".tag":"file","url":"https:confused face:/www.dropbox.com/s/j4hrqwqlqb331d4/00000107.dcm?dl=0","name":"00000107.dcm","link_permissions":..."}}}
at com.dropbox.core.v2.sharing.DbxUserSharingRequests.createSharedLinkWithSettings(DbxUserSharingRequests.java:474)
at com.dropbox.core.v2.sharing.DbxUserSharingRequests.createSharedLinkWithSettings(DbxUserSharingRequests.java:495)

[...]

=============

 

So, for a given file, the first call to createSharedLinkWithSettings() sometimes raises a ServerException, but then if retry again with the same Dropbox file it complains that "shared_link_already_exists".

 

What is happening? Please notice that the same application code has been working flawlessly for the last 12 months or more.

Also, please notice that the exception only happens for 2/3 files out of a set of 200 files.

 

Can you guess why these exception are happening in the last few days?

 

Thanks in advance and best regards,

 

Marco Sambin

10 Replies 10

Re: ServerException on createSharedLinkWithSettings()

Dropboxer

Thanks for the report. Can you use `DbxException.getRequestId` to get the request IDs for a few of these server errors and share the IDs here? That should help us track this down. Thanks in advance!

Re: ServerException on createSharedLinkWithSettings()

Explorer | Level 3

Hi Greg,

here are some request IDs failing with ServerException:

> I:anguished face: eb912690ee7217289f48215ef1fb37ec

> Related log:

*** DBX exception with file: [/SharedStudies/ShareOp_99995_1558602017099/00000056.dcm], requestI:anguished face: eb912690ee7217289f48215ef1fb37ec
com.dropbox.core.ServerException
at com.dropbox.core.DbxRequestUtil.unexpectedStatus(DbxRequestUtil.java:382)
at com.dropbox.core.v2.DbxRawClientV2$1.execute(DbxRawClientV2.java:154)
at com.dropbox.core.v2.DbxRawClientV2.executeRetriable(DbxRawClientV2.java:330)
at com.dropbox.core.v2.DbxRawClientV2.executeRetriableWithRefresh(DbxRawClientV2.java:351)
at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:137)
at com.dropbox.core.v2.sharing.DbxUserSharingRequests.createSharedLinkWithSettings(DbxUserSharingRequests.java:465)
at com.dropbox.core.v2.sharing.DbxUserSharingRequests.createSharedLinkWithSettings(DbxUserSharingRequests.java:495)

[...]

 

There are others like this, and again this happens for 2/3 uploads + createSharedLinkWithSettings() settings out of around 200.

 

Please let me know if you need other from my side in order to understand what's happening. It has been working fine for several months, before last 4-5 days or so.

 

I am looking forward to hearing from you.

Thanks and best regards,

 

Marco Sambin

 

Re: ServerException on createSharedLinkWithSettings()

Explorer | Level 3

Hi.

Here are other request IDs failing with ServerException, exactly as in my message above:

 

> I:anguished face: cc751ae733db4df9ab80c5ecadd7f7da

> I:anguished face: 790db6996f698d8fe2bf2c636ec058c2

 

Please let me know if it helps.

Best regards,

 

Marco

Re: ServerException on createSharedLinkWithSettings()

Dropboxer

Thanks for the helpful report, Marco. Sorry your integration stopped working fully.

I filed a bug with engineering and will update you when I hear back from them. 

Re: ServerException on createSharedLinkWithSettings()

Explorer | Level 3

Hi.

Do you have news about this issue?

I would like to restore full funcionality of my Dropbox-based service as soon as possible.

Regards,

 

Marco

Re: ServerException on createSharedLinkWithSettings()

Dropboxer

Hi, Marco. 

Unfortunately, I don't have an update for you at this time. It's been reported and is being looked at, but I don't have a timeline for a fix. 

As a workaround, please keep using the retry logic that you mentioned in your initial post.  

Re: ServerException on createSharedLinkWithSettings()

Dropboxer

Hi Marco!

Good news! It looks like a fix was implemented. 

Could you take a look and see whether you're still getting the error? 

Re: ServerException on createSharedLinkWithSettings()

Explorer | Level 3

Hi.

Thanks for getting back to me!

Unfortunately, the issue does not seem to be fixed.

I've just retried uploading my set of files and obtaining the public URLs for them, and again, I got 2 errors out of 208 uploaded files. See details below, also including the request IDs that are failing:

 

========

requestI:anguished face: feb3c32fd715ebc70f97f9bb25774ebd
com.dropbox.core.ServerException
at com.dropbox.core.DbxRequestUtil.unexpectedStatus(Unknown Source)
at com.dropbox.core.v2.DbxRawClientV2$1.execute(Unknown Source)
at com.dropbox.core.v2.DbxRawClientV2.executeRetriable(Unknown Source)
at com.dropbox.core.v2.DbxRawClientV2.executeRetriableWithRefresh(Unknown Source)
at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(Unknown Source)
at com.dropbox.core.v2.sharing.DbxUserSharingRequests.createSharedLinkWithSettings(Unknown Source)
at com.dropbox.core.v2.sharing.DbxUserSharingRequests.createSharedLinkWithSettings(Unknown Source)
at imageviewer.h.a.c.a(Unknown Source)
at imageviewer.h.bv.q(Unknown Source)
at imageviewer.h.bx.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)

 

*** getPermanentSharedLink() DBX exception with file: [/SharedStudies/ShareOp_99995_1559642700239/00000185.dcm], requestI:anguished face: 8489fc1104ee6ca5bd287e5af39793dd
com.dropbox.core.ServerException
at com.dropbox.core.DbxRequestUtil.unexpectedStatus(Unknown Source)
at com.dropbox.core.v2.DbxRawClientV2$1.execute(Unknown Source)
at com.dropbox.core.v2.DbxRawClientV2.executeRetriable(Unknown Source)
at com.dropbox.core.v2.DbxRawClientV2.executeRetriableWithRefresh(Unknown Source)
at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(Unknown Source)
at com.dropbox.core.v2.sharing.DbxUserSharingRequests.createSharedLinkWithSettings(Unknown Source)
at com.dropbox.core.v2.sharing.DbxUserSharingRequests.createSharedLinkWithSettings(Unknown Source)
at imageviewer.h.a.c.a(Unknown Source)
at imageviewer.h.bv.q(Unknown Source)
at imageviewer.h.bx.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)

========

 

Please let me know if you have further updates.

It seems to me this is an important issue, which may affect several Dropbox SDK users.

 

Best regards,

 

Marco Sambin

Re: ServerException on createSharedLinkWithSettings()

Dropboxer

Thanks for letting us know, and apologies for the trouble! We'll check on this again and follow up here once we have an update for you.

Polls
Are you starting new work habits this year?

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?