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: 

Objective C Console Errors Should I be worried?

Objective C Console Errors Should I be worried?

purringpgeon
Explorer | Level 4
Go to solution

Hello,

 

(First sorry for the new user name, it wouldn't allow me back in...)

 

I sucessfully upgraded my app to use API v2 Objective C - however when running from the simulator when checking if I have an active account I get the following errors in the log - but they don't seem to stop anything and I can't locate where they are occurring.

 

2017-01-05 13:50:46.148 AppName[11111:111111] You are linked: <DropboxClient: 0x600000245a90>

2017-01-05 13:50:46.179 AppName[11111:111111] App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

2017-01-05 13:50:46.196738 AppName[11111:111111] PAC Fetch failed with error [NSURLErrorDomain:-1022]

2017-01-05 13:50:46.197575 AppName[11111:111111] [] nw_proxy_resolver_create_parsed_array PAC evaluation error: NSURLErrorDomain: -1022

 

It seems to occur after this call

 

self.restClient.filesRoutes
1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Thanks for the additional information! I can't reproduce this issue using your code though, so it does seem there's something else going on.

 

I took a closer look at the output you shared, and the PAC/proxy messages cite error 1022, which is NSURLErrorAppTransportSecurityRequiresSecureConnection. That indicates it is the proxy attempt that's causing the App Transport Security failure.

 

The simulator uses your computers network connection, so I recommend checking the System Preferences > Network > Advanced > Proxies > Automatic Proxy Configuration for a Proxy Configuration File hosted on http://.

View solution in original post

6 Replies 6

Greg-DB
Dropbox Staff
Go to solution
The Dropbox API operates entirely over HTTPS, so it shouldn't trigger a message like that. Are you sure that's the only thing running when you get this?

purringpgeon
Explorer | Level 4
Go to solution

Yes - my app only uses dropbox to call out.  Everything else is 100% local.  I am not running anything else from the simulator (that I am aware of).

 

Even added this to my plist file:

 

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <false/>
    </dict>

It only seems to happen on that one call I noted above, I get the HTTP warning, and the other two errors.  But my app works just fine.  So I am confused.

Greg-DB
Dropbox Staff
Go to solution
The other output seems to indicate that you may be trying to use a proxy, configured via a pac file. Is the pac file hosted on HTTP?

Otherwise, can you share the rest of the code? What you shared was incomplete. I'll be happy to try to reproduce it.

purringpgeon
Explorer | Level 4
Go to solution

Hi Greg,

 

I don't know what a PAC file is 🙂 

 

Basically I am doing the following:

 

Check for existing back up - which consists of 4 files which is this call:

 

[[self.restClient.filesRoutes listFolder:@""]response:^(DBFILESListFolderResult * _Nullable result, DBFILESListFolderError * _Nullable routeError, DBRequestError * _Nullable error) {

When this lands in the response section - that's when I get those three messages.  I don't get them for:

 

 [[self.restClient.filesRoutes uploadData:@"/ServiceReport.sqlite"
                    mode:mode
                    autorename: NULL
                    clientModified:NULL
                    mute:NULL
                    inputData:sqllite]response:^(DBFILESFileMetadata * _Nullable result , DBFILESUploadError * _Nullable routeError, DBRequestError * _Nullable error) {

Or this one:

 

 [[self.restClient.filesRoutes downloadData:@"/ServiceReport.sqlite"]response:^(DBFILESFileMetadata * _Nullable result, DBFILESDownloadError * _Nullable downloaderror, DBRequestError * _Nullable error, NSData * _Nonnull fileData) {

 

I can post my entire controller here if you would like - other than the auth - which I think is pretty standard stuff. 

Greg-DB
Dropbox Staff
Go to solution

Thanks for the additional information! I can't reproduce this issue using your code though, so it does seem there's something else going on.

 

I took a closer look at the output you shared, and the PAC/proxy messages cite error 1022, which is NSURLErrorAppTransportSecurityRequiresSecureConnection. That indicates it is the proxy attempt that's causing the App Transport Security failure.

 

The simulator uses your computers network connection, so I recommend checking the System Preferences > Network > Advanced > Proxies > Automatic Proxy Configuration for a Proxy Configuration File hosted on http://.

purringpgeon
Explorer | Level 4
Go to solution

Well - I never would have seen that 🙂 - I had Auto Proxy Detection on.  Turned that off and the message went away.

 

Thanks!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    purringpgeon Explorer | Level 4
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?