cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Re-linking using Obj-C SDK fails with network error

Re-linking using Obj-C SDK fails with network error

Mark R.5
Helpful | Level 5

I noticed this on my app, but it is also reliably reproducible using the DBRoulette sample app. Using SDK 6.3, iOS 15.4.1 and an iPhone Pro 12.

 

If you link to a Dropbox account, then unlink (this step may not actually be required) and then shortly afterward attempt to link to the same Dropbox account, the link fails with a network error. If you then try to link again it works fine, and if you wait a few minutes it also works. Suspect it may be an issue with re-using a stale network connection?

 

The issue occurs specifically when control is passed back to the app and it attempts to retrieve the token.

 

While not a very serious issue, re-linking is something that is often performed when troubleshooting issues with connectivity.

 

I can't attach the full log snippet as it marks this thread as Spam for some reason, but the main entries are listed below:

 

 

[connection] nw_read_request_report [C6] Receive failed with error "Software caused connection abort"
Task <01053FC1-6F47-4A0E-8C3D-1E80465C2987>.<5> HTTP load failed, 37/0 bytes (error code: -1005 [1:53])
Task <01053FC1-6F47-4A0E-8C3D-1E80465C2987>.<5> finished with error [-1005] Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=53, NSUnderlyingError=0x28225ca80 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={_kCFStreamErrorCodeKey=53, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <01053FC1-6F47-4A0E-8C3D-1E80465C2987>.<5>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <01053FC1-6F47-4A0E-8C3D-1E80465C2987>.<5>"
), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=https://api.dropbox.com/oauth2/token, NSErrorFailingURLKey=https://api.dropbox.com/oauth2/token, _kCFStreamErrorDomainKey=1}

 

3 Replies 3

Greg-DB
Dropbox Staff

Thanks for the report! I'll ask the team to look into it.

roosterzappa
New member | Level 2

I don't know what the official fix should look like, but you are welcome to use my workaround commit until then:

 

https://github.com/roostr/dropbox-sdk-obj-c/commit/d36413c958caf822ebfca513adf7587754109c19

Greg-DB
Dropbox Staff

@roosterzappa Thanks for sharing that!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    roosterzappa New member | Level 2
What do Dropbox user levels mean?