[GH-ISSUE #416] TCP I/O connection error: TIC Read Status [11:0x0]: 1:57 #265

Closed
opened 2026-03-03 16:47:13 +03:00 by kerem · 3 comments
Owner

Originally created by @shanehartman on GitHub (Oct 25, 2017).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/416

Description:

OAuth Provider (Twitter, Github, ..):

OAuth Version:

  • [ x] Version 1
  • Version 2

OS (Please fill the version) :

  • iOS :
  • OSX :
  • TVOS :
  • WatchOS :

Installation method:

  • [x ] Carthage
  • CocoaPods
  • Manually

Library version:

  • head
  • [ x] v1.2 (Swift 4.0)
  • v1.0.0
  • v0.6
  • other: (Please fill in the version you are using.)

Xcode version:

  • [x ] 9.0 (Swift 4.0)
  • 9.0 (Swift 3.2)
  • 8.x (Swift 3.x)
  • 8.0 (Swift 2.3)
  • 7.3.1
  • other: (Please fill in the version you are using.)

Prior to upgrading to Swift 4 / XCode 9 my code was running just fine. Now I get an error in the console (TIC Read Status [11:0x0]: 1:57). There are no other errors. The authorization and redirect appear to be working fine but I can't be sure because the error I'm getting isn't descriptive. Below is my code. There's a stack overflow post but it isn't very helpful and there isn't much other information out there to help troubleshoot this.

oauthswift = OAuth1Swift(
            consumerKey:    "xxxx",
            consumerSecret: "xxxx",
            requestTokenUrl: "https://api.twitter.com/oauth/request_token",
            authorizeUrl:    "https://api.twitter.com/oauth/authorize",
            accessTokenUrl:  "https://api.twitter.com/oauth/access_token"
        )
        guard let oauth = oauthswift else {
            print("oauth not available")
            return
        }
        let handle = oauth.authorize(
            withCallbackURL: URL(string: "oauth-swift://oauth-callback/twitter")!,
            success: { credential, response, parameters in
                print(credential.oauthToken)
                print(credential.oauthTokenSecret)
                print(parameters["user_id"])
                oauth.client.post("https://stream.twitter.com/1.1/statuses/filter.json?track=Trump", success: { (OAuthSwiftResponse) in
                    print("success")
                    DispatchQueue.main.async {
                        self.didReceive(data: OAuthSwiftResponse.data)
                    }
                }, failure: { (OAuthSwiftError) in
                    print(OAuthSwiftError.localizedDescription + " errorPost")
                })
        },
            failure: { error in
                print(error.localizedDescription + " errorAuth")
        })
    }

After letting my code run for a long time it looks like it ultimately returns a request error:

Task <91C9022F-7490-486C-A5A3-00C77513724E>.<1> finished with error - code: -1001
The operation couldn’t be completed. (OAuthSwiftError error -11.)

Originally created by @shanehartman on GitHub (Oct 25, 2017). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/416 ### Description: ### OAuth Provider (Twitter, Github, ..): ### OAuth Version: - [ x] Version 1 - [ ] Version 2 ### OS (Please fill the version) : - [x] iOS : - [ ] OSX : - [ ] TVOS : - [ ] WatchOS : ### Installation method: - [x ] Carthage - [ ] CocoaPods - [ ] Manually ### Library version: - [ ] head - [ x] v1.2 (Swift 4.0) - [ ] v1.0.0 - [ ] v0.6 - [ ] other: (Please fill in the version you are using.) ### Xcode version: - [x ] 9.0 (Swift 4.0) - [ ] 9.0 (Swift 3.2) - [ ] 8.x (Swift 3.x) - [ ] 8.0 (Swift 2.3) - [ ] 7.3.1 - [ ] other: (Please fill in the version you are using.) Prior to upgrading to Swift 4 / XCode 9 my code was running just fine. Now I get an error in the console (TIC Read Status [11:0x0]: 1:57). There are no other errors. The authorization and redirect appear to be working fine but I can't be sure because the error I'm getting isn't descriptive. Below is my code. There's a stack overflow [post](https://stackoverflow.com/questions/46352735/what-is-tic-read-status-157-in-ios11-xcode-9) but it isn't very helpful and there isn't much other information out there to help troubleshoot this. ``` oauthswift = OAuth1Swift( consumerKey: "xxxx", consumerSecret: "xxxx", requestTokenUrl: "https://api.twitter.com/oauth/request_token", authorizeUrl: "https://api.twitter.com/oauth/authorize", accessTokenUrl: "https://api.twitter.com/oauth/access_token" ) guard let oauth = oauthswift else { print("oauth not available") return } let handle = oauth.authorize( withCallbackURL: URL(string: "oauth-swift://oauth-callback/twitter")!, success: { credential, response, parameters in print(credential.oauthToken) print(credential.oauthTokenSecret) print(parameters["user_id"]) oauth.client.post("https://stream.twitter.com/1.1/statuses/filter.json?track=Trump", success: { (OAuthSwiftResponse) in print("success") DispatchQueue.main.async { self.didReceive(data: OAuthSwiftResponse.data) } }, failure: { (OAuthSwiftError) in print(OAuthSwiftError.localizedDescription + " errorPost") }) }, failure: { error in print(error.localizedDescription + " errorAuth") }) } ``` After letting my code run for a long time it looks like it ultimately returns a request error: Task <91C9022F-7490-486C-A5A3-00C77513724E>.<1> finished with error - code: -1001 The operation couldn’t be completed. (OAuthSwiftError error -11.)
kerem closed this issue 2026-03-03 16:47:13 +03:00
Author
Owner

@nmrsmn commented on GitHub (Nov 2, 2017):

I've got the same problem, except I'm getting OAuthSwiftError -10. Also I didn't use Crathage but cocoapods

<!-- gh-comment-id:341432284 --> @nmrsmn commented on GitHub (Nov 2, 2017): I've got the same problem, except I'm getting OAuthSwiftError -10. Also I didn't use Crathage but cocoapods
Author
Owner

@phimage commented on GitHub (Nov 2, 2017):

@nmrsmn OAuthSwiftError -10 > retain error; You do not keep a reference to your OAuthSwift object (in your controller for instance)

<!-- gh-comment-id:341451913 --> @phimage commented on GitHub (Nov 2, 2017): @nmrsmn OAuthSwiftError -10 > retain error; You do not keep a reference to your `OAuthSwift` object (in your controller for instance)
Author
Owner

@kylebrowning commented on GitHub (Feb 16, 2018):

This is related to XCode, not OAuthSwift.....

<!-- gh-comment-id:366332792 --> @kylebrowning commented on GitHub (Feb 16, 2018): This is related to XCode, not OAuthSwift.....
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#265
No description provided.