Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSURLErrorDomainCode=-999 error #149

Closed
skojima123 opened this issue Jan 19, 2016 · 3 comments
Closed

NSURLErrorDomainCode=-999 error #149

skojima123 opened this issue Jan 19, 2016 · 3 comments

Comments

@skojima123
Copy link

@bhariharan This is related to #143

We've upgraded the SDK to 4.0.2 but we still see the NSURLErrorDomainCode=-999 error.

I now suspect if it has to do with refresh token flow....my hypothesis is that the app should obtain a new access token, but it can't so it eventually throws the NSURLErrorDomainCode error.

2016-01-19 09:22:19.385 APP[1722:740701] [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}]

2016-01-19 09:22:19.385 APP[1722:740701] what is refresh_token:

2016-01-19 09:22:19.385 APP 1722:740701] {"access_token":"*******_","instance_url":"https://abc.cs5.my.salesforce.com","refresh_token":"**__","id":"_***"}

2016-01-19 09:22:19.385 PasonaMyPage[1722:740701] oauthPlugin is true

2016-01-19 09:22:21.431 APP[1722:740701] TIMING com.salesforce.oauth:authenticate: 2053ms

2016-01-19 09:22:21.432 APP[1722:740701] refresh Token With Plugin.....

2016-01-19 09:22:21.432 APP 1722:740701] {"userId":"******","loginUrl":"https://abc.cs5.force.com","refreshToken":"**_****_","clientId":"**_***_","orgId":"**_********_","accessToken":"**_***_","userAgent":"SalesforceMobileSDK/4.0.2 iPhone OS/9.2 (iPhone) PasonaMyPage/0.0.1 Hybrid uid**_* Mozilla/5.0 (iPhone; CPU iPhone OS 9_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13C75","instanceUrl":"https://abc.cs5.my.salesforce.com"}APP

2016-01-19 09:22:21.476 APP[1722:740701] Resetting plugins due to page load.

2016-01-19 09:22:21:488 APP 1722:740701] ERROR|SFHybridViewController|Error while attempting to load web page: Error Domain=NSURLErrorDomain Code=-999 "(null)" UserInfo={NSErrorFailingURLStringKey=https://abc.cs5.my.salesforce.com/visualforce/session?url=/apexpages/utils/ping.apexp&autoPrefixVFDomain=true, NSErrorFailingURLKey=https://abc.cs5.my.salesforce.com/visualforce/session?url=/apexpages/utils/ping.apexp&autoPrefixVFDomain=true}

@skojima123
Copy link
Author

I have been troubleshooting last couple of days and I now believe that the error is a byproduct of a bug in forceng.js. I've fixed that bug in forceng.js, and even though I still see the NSURLErrorDomain error, the screen no longer gets stuck at a white screen. I'll close the issue ticket.

@khawkins
Copy link
Contributor

Sorry for the late response. For future reference, the -999 error for a UIWebView is somewhat misnamed. It occurs when a request is canceled before it completes, usually if the web view is directed to go somewhere else before the initial request completes. It's fairly rare that it accounts for legitimate issues. It's usually better for understanding what's happening in the app at the time of an error.

@skojima123
Copy link
Author

@khawkins
thx for the further explanation. the bug I faced on forceng.js is this. I've just sent a pull request to @ccoenraets
ccoenraets/forceng#14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants