Forum Discussion

PaulOuch's avatar
PaulOuch
Explorer | Level 3
5 years ago

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

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

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    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?

    • PaulOuch1's avatar
      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…

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        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?

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 16 hours ago
351 Following

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!