question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error "NSURLErrorDomain error -999" on iOS when using API in Cordova app

See original GitHub issue

I use the newest dropbox-sdk-js in my cordova app. I have troubles getting authenticated on iOS. On Android the API works properly and I can authenticate in my app, download/upload files. Everyting seems to work OK. I use the following code to authenticate:

var dropboxsdkclient = new Dropbox.Dropbox({ clientId: DROPBOX_APP_KEY });

dropboxsdkclient.authenticateWithCordova( 
	function(accessToken) {
	  $rootScope.dropboxaccesstoken = accessToken;
	  $scope.readfromfilefordropbox(sourcepath, remoteFileName, privateUpload);
    }, 
    function(error) {
	  console.log("failed DROPBOX authentication!");
	  $scope.showAlert();
    }
);

Unfortunately on iOS the inappbrowser appears on screen for a moment and then I’m getting the following xcode debug log error:

app[41978:580267] THREAD WARNING: ['InAppBrowser'] took '67.250244' ms. Plugin should use a background thread.
app[41978:580267] Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x7f8a68651070>.
app[41978:580391] WF: _userSettingsForUser : (null)
app[41978:580391] WF: _WebFilterIsActive returning: NO
app[41978:580267] webView:didFailLoadWithError - -999: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
app[41978:580267] webView:didFailLoadWithError - -999: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
app[41978:580267] failed DROPBOX authentication!
app[41978:580267] IAB.close() called but it was already closed.
app[41978:583091] Task <D57EA0DA-17B2-4F60-A2DB-7F275B0F3A40>.<0> HTTP load failed (error code: -999 [1:89])
app[41978:583091] Task <123ECEDE-EC7B-4B3F-B6C0-D3CD429B84FC>.<0> HTTP load failed (error code: -999 [1:89])
app[41978:583091] Task <6DC41B40-AB0B-43BD-A37F-8C80E5D833BC>.<0> HTTP load failed (error code: -999 [1:89])

I’m stuck and not quite sure what’s going on. I suppose the issue might be with iOS 11 or maybe the inappbrowser plguin version (2.0.2)? Could anybody help?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
greg-dbcommented, Jan 7, 2019

PR #228 to fix this is released as of v4.0.15.

1reaction
pran1990commented, Dec 16, 2018

Thanks for your (now merged) PR @destegabry !

Read more comments on GitHub >

github_iconTop Results From Across the Web

cordova - PhoneGap + iOS: NSURLErrorDomain error -999
I suspect your redirect is happening before a current webView load request has completed. Two typical ways to handle this...1) modify your init ......
Read more >
NSURLErrorDomain error -999, App s… - Apple Developer
I have created an ios app using Ionic framework. it runs well on browser. and also ionic Cordova emulate -l runs well. but...
Read more >
Error "NSURLErrorDomain error -999" on iOS when using API in ...
I use the newest dropbox-sdk-js in my cordova app. I have troubles getting authenticated on iOS. On Android the API works properly and...
Read more >
How do I resolve the error "NSURLErrorDomain - 999" when ...
While attempting to approve a Duo Push in the Duo Mobile app on an iOS device, you see the error message "NSURLErrorDomain-999".
Read more >
nsurlerrordomain error -999 iphone, how do i fix nsurlerrordomain ...
nsurlerrordomain error -999 cordova ... If you receive this error while using an iOS App, it may be due to you “stressing” the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found