[GH-ISSUE #430] QuickBooks Connection Error: CredStore - performQuery - Error copying matching creds. #279

Closed
opened 2026-03-03 16:47:20 +03:00 by kerem · 2 comments
Owner

Originally created by @CheeJustin on GitHub (Jan 12, 2018).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/430

Description:

I'm trying to maintain a connection to QuickBooks, but I keep getting this error whenever I try to make a request using startAuthorizedRequest() after about an hour of inactivity. I can't seem to figure out what's causing this issue as I'm able to renew the authorization token with the refreshToken through the developer portal, but not in the app.

CredStore - performQuery - Error copying matching creds.  Error=-25300, query={
    class = inet;
    "m_Limit" = "m_LimitAll";
    ptcl = htps;
    "r_Attributes" = 1;
    sdmn = Intuit;
    srvr = "oauth.platform.intuit.com";
    sync = syna;
}
requestError[Error Domain=NSURLErrorDomain Code=401 "" UserInfo={Response-Body={"error":"invalid_client"}, NSErrorFailingURLKey=https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer, Response-Headers={
    "Cache-Control" = "no-cache, no-store";
    Connection = "keep-alive";
    "Content-Length" = 26;
    "Content-Type" = "application/json;charset=UTF-8";
    Date = "Fri, 12 Jan 2018 21:51:09 GMT";
    "Keep-Alive" = "timeout=5";
    Pragma = "no-cache";
    Server = nginx;
    "Strict-Transport-Security" = "max-age=15552000";
    "Www-Authenticate" = "Basic realm=\"Intuit\"";
    "intuit_tid" = "6042862c-7cfe-a163-b9f6-faed5e8a79d1";
}, OAuthSwiftError.response=<NSHTTPURLResponse: 0x60800042a360> { URL: https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer } { Status Code: 401, Headers {
    "Cache-Control" =     (
        "no-cache, no-store"
    );
    Connection =     (
        "keep-alive"
    );
    "Content-Length" =     (
        26
    );
    "Content-Type" =     (
        "application/json;charset=UTF-8"
    );
    Date =     (
        "Fri, 12 Jan 2018 21:51:09 GMT"
    );
    "Keep-Alive" =     (
        "timeout=5"
    );
    Pragma =     (
        "no-cache"
    );
    Server =     (
        nginx
    );
    "Strict-Transport-Security" =     (
        "max-age=15552000"
    );
    "Www-Authenticate" =     (
        "Basic realm=\"Intuit\""
    );
    "intuit_tid" =     (
        "6042862c-7cfe-a163-b9f6-faed5e8a79d1"
    );
} }, OAuthSwiftError.response.data=<7b226572 726f7222 3a22696e 76616c69 645f636c 69656e74 227d>, NSLocalizedDescription=}]

OAuth Provider (Twitter, Github, ..):

OAuth Version:

  • Version 1
  • Version 2

OS (Please fill the version) :

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

Installation method:

  • Carthage
  • CocoaPods
  • Manually

Library version:

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

Xcode version:

  • 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.)

  • objective c

Originally created by @CheeJustin on GitHub (Jan 12, 2018). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/430 ### Description: I'm trying to maintain a connection to **QuickBooks**, but I keep getting this error whenever I try to make a request using `startAuthorizedRequest()` after about an hour of inactivity. I can't seem to figure out what's causing this issue as I'm able to renew the authorization token with the refreshToken through the developer portal, but not in the app. ``` CredStore - performQuery - Error copying matching creds. Error=-25300, query={ class = inet; "m_Limit" = "m_LimitAll"; ptcl = htps; "r_Attributes" = 1; sdmn = Intuit; srvr = "oauth.platform.intuit.com"; sync = syna; } requestError[Error Domain=NSURLErrorDomain Code=401 "" UserInfo={Response-Body={"error":"invalid_client"}, NSErrorFailingURLKey=https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer, Response-Headers={ "Cache-Control" = "no-cache, no-store"; Connection = "keep-alive"; "Content-Length" = 26; "Content-Type" = "application/json;charset=UTF-8"; Date = "Fri, 12 Jan 2018 21:51:09 GMT"; "Keep-Alive" = "timeout=5"; Pragma = "no-cache"; Server = nginx; "Strict-Transport-Security" = "max-age=15552000"; "Www-Authenticate" = "Basic realm=\"Intuit\""; "intuit_tid" = "6042862c-7cfe-a163-b9f6-faed5e8a79d1"; }, OAuthSwiftError.response=<NSHTTPURLResponse: 0x60800042a360> { URL: https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer } { Status Code: 401, Headers { "Cache-Control" = ( "no-cache, no-store" ); Connection = ( "keep-alive" ); "Content-Length" = ( 26 ); "Content-Type" = ( "application/json;charset=UTF-8" ); Date = ( "Fri, 12 Jan 2018 21:51:09 GMT" ); "Keep-Alive" = ( "timeout=5" ); Pragma = ( "no-cache" ); Server = ( nginx ); "Strict-Transport-Security" = ( "max-age=15552000" ); "Www-Authenticate" = ( "Basic realm=\"Intuit\"" ); "intuit_tid" = ( "6042862c-7cfe-a163-b9f6-faed5e8a79d1" ); } }, OAuthSwiftError.response.data=<7b226572 726f7222 3a22696e 76616c69 645f636c 69656e74 227d>, NSLocalizedDescription=}] ``` ### OAuth Provider (Twitter, Github, ..): ### OAuth Version: - [ ] Version 1 - [x] Version 2 ### OS (Please fill the version) : - [x] iOS : - [ ] OSX : - [ ] TVOS : - [ ] WatchOS : ### Installation method: - [ ] Carthage - [x] 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.) - [ ] objective c
kerem closed this issue 2026-03-03 16:47:20 +03:00
Author
Owner

@phimage commented on GitHub (Jan 13, 2018):

did you try
https://stackoverflow.com/questions/46099940/credstore-perform-query-error

then the error seems to be
https://developer.apple.com/documentation/security/errsecitemnotfound

please write in issue and title the oauth provider

<!-- gh-comment-id:357469691 --> @phimage commented on GitHub (Jan 13, 2018): did you try https://stackoverflow.com/questions/46099940/credstore-perform-query-error then the error seems to be https://developer.apple.com/documentation/security/errsecitemnotfound please write in issue and title the oauth provider
Author
Owner

@CheeJustin commented on GitHub (Jan 15, 2018):

@phimage

Wouldn't that solution require me to know the user's password and username?

My end goal is to have the user log in once, and have the session persist until the user logs out of my app.

<!-- gh-comment-id:357751498 --> @CheeJustin commented on GitHub (Jan 15, 2018): @phimage Wouldn't that solution require me to know the user's password and username? My end goal is to have the user log in once, and have the session persist until the user logs out of my app.
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#279
No description provided.