cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Whether you are transferring a single drive, a team or an entire organization, Movebot's cloud migration tool has been built to make your Dropbox migration simple - learn all about it 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: 

getting Error Domain=NSURLErrorDomain Code=-1005 after list folder in iOS Swift

getting Error Domain=NSURLErrorDomain Code=-1005 after list folder in iOS Swift

PaulOuch
Explorer | Level 3

I get the error below when I am trying to list folder. Please help

 

Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=53, NSUnderlyingError=0x2801227f0 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x282ba1440 [0x200643870]>{length = 28, capacity = 28, bytes = 0x1c1e01bb000000002620010060230007 ... a27d430700000000}, _kCFStreamErrorCodeKey=53, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <44CCC422-ED84-49FE-AE0E-44CECCE694F1>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <44CCC422-ED84-49FE-AE0E-44CECCE694F1>.<2>" ), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=https://api.dropbox.com/2/files/list_folder, NSErrorFailingURLKey=https://api.dropbox.com/2/files/list_folder, _kCFStreamErrorDomainKey=1}

 

This error occurs on iPhone 6S, 8 BUT NOT on iPhone X (I have not tried on any other device), all are on iOS 13

3 Replies 3

Re: getting Error Domain=NSURLErrorDomain Code=-1005 after list folder in iOS Swift

Greg-DB
Dropboxer

That error is coming from the local network client, and seems to indicate an issue with the network connection. Especially since this doesn't happen on all devices, it looks like it may be caused by the network connections on those affected devices. Is there anything on those network connections that may be interfering with the calls to api.dropboxapi.com? E.g., any proxy, firewall, etc.? Are the devices able to access the Internet otherwise?

Re: getting Error Domain=NSURLErrorDomain Code=-1005 after list folder in iOS Swift

PaulOuch1
New member | Level 2

Strange, this issue only occurs in a specific use case:

1/ launching of the app

2/ checking the existence of a specific folder (it’s at this step that the issue occurs)

3/ if not, creation of this folder (creation ok or “folder already exists” but no error -1005)

The app then makes lots of requests (to Dropbox or to a specific back-end) without problem

 

My device is connected to WiFi on an Internet ADSL router. My local network is very good, no proxy or FW…

Re: getting Error Domain=NSURLErrorDomain Code=-1005 after list folder in iOS Swift

Greg-DB
Dropboxer

I see, thanks for the information. That is certainly unexpected, as you're able to make calls later in the process, especially since the calls for checking for a folder go to the same Dropbox hostname as the ones for creating new folders.

 

Does the app do anything different for the first call? E.g., is it perhaps running before some other setup completes, or is the Dropbox client object handled different?

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    PaulOuch1 New member | Level 2
What do Dropbox user levels mean?
Need more support?